sql: introduce UUID field type
This patch introduces UUID to SQL. UUID is now available as a new field type. Part of #5886 @TarantoolBot document Title: Field type UUID is now available in SQL The UUID field type is now available in SQL. This means that we can create spaces and indexes with UUID, use it in SELECT, UPDATE and DELETE. UUID can be accepted and returned by built-in functions and user-defined functions. According to the comparison rules, there will be no implicit casting in the comparison. This rule also applies to UUID values: if a value is not part of a SCALAR field, it cannot be compared to a value of any other type. If the value is in a SCALAR field, it can be compared to any other scalar value according to the comparison rules for a SCALAR field. In case a UUID value is used in an operation that is not a comparison, it can be implicitly converted to STRING or VARBINARY. If a STRING or VARBINARY value is used in an operation that is not a comparison, it can be implicitly converted to a UUID. UUID value can always be explicitly converted to STRING or VARBINARY. A STRING or VARBINARY value can be explicitly converted to a UUID if it conforms to the UUID standard.
Showing
- extra/mkkeywordhash.c 1 addition, 0 deletionsextra/mkkeywordhash.c
- src/box/sql/func.c 18 additions, 12 deletionssrc/box/sql/func.c
- src/box/sql/mem.c 187 additions, 15 deletionssrc/box/sql/mem.c
- src/box/sql/mem.h 24 additions, 5 deletionssrc/box/sql/mem.h
- src/box/sql/parse.y 1 addition, 0 deletionssrc/box/sql/parse.y
- src/box/sql/vdbe.c 12 additions, 3 deletionssrc/box/sql/vdbe.c
- test/sql-tap/CMakeLists.txt 1 addition, 0 deletionstest/sql-tap/CMakeLists.txt
- test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua 13 additions, 29 deletionstest/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
- test/sql-tap/gh-6024-funcs-return-bin.test.lua 4 additions, 4 deletionstest/sql-tap/gh-6024-funcs-return-bin.test.lua
- test/sql-tap/sql_uuid.c 46 additions, 0 deletionstest/sql-tap/sql_uuid.c
- test/sql-tap/uuid.test.lua 1294 additions, 0 deletionstest/sql-tap/uuid.test.lua
Loading
Please register or sign in to comment