-
Notifications
You must be signed in to change notification settings - Fork 43
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
The complete Tarantool DB data types list is missing #928
Comments
Re "But it lacks at least unsigned, any and number. (And by the way what's the difference between bin and varbinary?)": Actually number is not lacking, it is in the chart, and bin / varbinary explanation is immediately below that chart. |
@kyukhin let's discuss |
I still think we need a single complete list of types, not just a paragraph where all types are mentioned one way or another. The following table is most close to what I'm talking about: https://www.tarantool.io/en/doc/2.2/book/box/data_model/#indexed-field-types But it lacks at least 'map' (obviously because indices on maps are not supported ant the table is called 'Indexed field types'). And please, do make a single column with all possible values of 'type' field of box.space.format's parameter (don't split the list into two columns as in the example above) - it's crucial for intuitive comprehension. |
I think it makes sense to add more information about the NUMBER type in Lua. In essence, this type works like a DOUBLE in C. But, since we convert an integer of this type to INTEGER / UNSIGNED, we can encounter precision loss if the number is more than 2 ^ 52. For example:
|
AFAIS, 'number' type in space formats also accepts decimals. |
In my comment, I mean NUMBER in Lua, not NUMBER in Tarantool. NUMBER in Tarantool contains all numeric types. |
I agree w/ Peter here. I think we need to somehow re-group descriptions. |
Let me try to explain once more. User writes: box.space.test:format({{ name = "my_column", type = Please, let us give him a single list in the documentation to choose from. I suggest something like this (obviously, we don't have anything close to it now):
|
It looks like we don't have a single table where all Tarantool database types are enumerated. I think it's a basic must have thing.
We have this table:
https://www.tarantool.io/en/doc/2.2/book/box/data_model/#lua-vs-msgpack
But it lacks at least unsigned, any and number. (And by the way what's the difference between bin and varbinary?)
I also think there should be a column with verbal description of data types. E.g.:
double - a double precision floating point number (IEEE 64-bit floating point on most compilers?)
unsigned - an integer number in range from 0 to ... (depending on compiler?)
any - ...
...
Here is the hopefully full (?) list of types from Tarantool source:
The text was updated successfully, but these errors were encountered: