Brian Aker wrote:
Hi!
On Aug 27, 2008, at 7:52 PM, Jim Starkey wrote:
I'm dumping types right and left in Nimbus. It's good for the soul.
What size are all of your ints/did you allow the user to specify a
maximum width?
To me types serve the purpose of constraints, but I personally dislike
the SMALL/INT/BIG stuff.
Good question, but not a simple answer.
Nimbus, like Falcon, uses a data encoding based on actual value rather
than declaration. A small range of integers (-10 to 40) are encoded in
the actual type code. Other type codes handle integers from one to
eight bytes. So the value "18" has the same encoding whether the field
is a tiny int, small int, int, big int, or really big int this time I
mean it.
Internally, values are represented in a value object; integers are 16,
32, or 64 bits depending on need.
Somebody might want to specify a constraint on range for data integrity,
but the range isn't likely to be a power of two.
Interbase/Firebird (those clever fellows) has a field level constraint:
valid if <boolean expression>
I may just swallow my pride and adopt that.
The probability of a useful constraint that is an multiple of eight
power of two is so close to zero as to be meaningless.
On a different question, is Drizzle:
1. Condensate in a cloud
2. Your weather forecast
3. All of the above
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp