Repository navigation
Updates to value converter docs - #3020
Merged
Merged
Conversation
ajcvickers
force-pushed
the
BobsAndBits0112
branch
from
January 17, 2021 21:23
2ac0208 to
fe0d92f
Compare
roji
approved these changes
Jan 18, 2021
|
|
||
| ### Handle fixed-length database strings | ||
|
|
||
| The previous example did not need a value converter. However, a converter can be useful for fixed-length database string types like `char(20)` or `nchar(20)`. Fixed-length strings are padded to their full length whenever a value is inserted into the database. This means that a key value of "dotnet" will be read back from the database as "dotnet ". This will then not compare correctly with key values that are not padded. |
Member
There was a problem hiding this comment.
Suggested change
| The previous example did not need a value converter. However, a converter can be useful for fixed-length database string types like `char(20)` or `nchar(20)`. Fixed-length strings are padded to their full length whenever a value is inserted into the database. This means that a key value of "dotnet" will be read back from the database as "dotnet ". This will then not compare correctly with key values that are not padded. | |
| The previous example did not need a value converter. However, a converter can be useful for fixed-length database string types like `char(20)` or `nchar(20)`. Fixed-length strings are padded to their full length whenever a value is inserted into the database. This means that a key value of `dotnet` will be read back from the database as `dotnet `. This will then not compare correctly with key values that are not padded. |
Contributor
Author
There was a problem hiding this comment.
Are fences really appropriate here? These are actually string values, not, not language concepts or typpes.
Member
There was a problem hiding this comment.
That's true, but (a) the spaces don't really show, and (b) "dotnet" may get machine-translated (to who knows what)...
Contributor
Author
There was a problem hiding this comment.
Turns out we are not allowed trailing spaces in fences, so leaving as is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lots of examples!
Fixes #614
Fixes #784
Part of #685
Fixes #2252
Fixes #2415
Fixes #2456
Fixes #2824
Fixes #2979