-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a question - why are the lengths 30, 62, 126, instead of 31, 63, and 127 (and if there were a UInt2048, 255)? #29
Comments
After looking more at the code, I think it's really due to a bug in the code, the code is mixing bytes and nibbles. |
It doesn't though. |
OK. For fixed size strings, generally I haven't seen greater than 255 (and that's for old legacy database fields, where they liked to have fixed size fields for everything, i.e. |
I'd kind of like to add ShortString255 by default - given how frequently I've seen that in database schema |
Just a comment. I think if ppl want to use it, then I think we can create an easy to use macro as suggested before where the number at the end is not necessary. It will figure it out and homogenize it in an array for the user automatically. |
Fix issue #29, use bytes instead of nibbles
That's going to be one of my next steps (as I know @oxinabox wants it!) |
This has now been resolved by #31 |
I have a question - why are the lengths 30, 62, 126, instead of 31, 63, and 127 (and if there were a UInt2048, 255)?
The max size length (in bytes) for any of those is just one byte (2 nibbles).
Also, since characters are only encoded in 1 or more bytes, the length could be just expressed as bytes, unless you want to use an extra nibble to store other information about the short string (which might be useful).
Originally posted by @ScottPJones in #22 (comment)
The text was updated successfully, but these errors were encountered: