We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
space:format() is Tarantool way to define columns.
SQL:
CREATE TABLE customer ( customer_id INTEGER PRIMARY KEY, fullname VARCHAR NOT NULL, address VARCHAR NOT NULL, phone VARCHAR NOT NULL, vip BOOLEAN NOT NULL ); INSERT INTO customer VALUES(1, 'Mail.Ru', '125167, Leningradsky prospekt 39, bld. 79', '+7 (495) 725-63-57', true); INSERT 0 1 INSERT INTO customer VALUES(1, 123456, NULL, 12, 'string'); ERROR: invalid input syntax for type boolean: "string" LINE 1: INSERT INTO customer VALUES(1, 123456, NULL, 12, 'string');
Tarantool:
tarantool> box.schema.space.create('customers') tarantool> box.space.customers:create_index('primary', {parts = {1, 'integer'}}) tarantool> box.space.customers:format({ {name = 'customer_id', type = 'unsigned'}, {name='fullname', type='string'}, {name='address', type='string'}, {name='phone', type='string'}, {name='vip', type='boolean'} }) tarantool> box.space.customers:insert({1, 'Mail.Ru', '125167, Leningradsky prospekt 39, bld. 79', '+7 (495) 725-63-57', true}) --- - [1, 'Mail.Ru', '125167, Leningradsky prospekt 39, bld. 79', '+7 (495) 725-63-57', true] ... tarantool> box.space.customers:insert({1, 123456, nil, 12.11, 'string'}) --- - error: 'Tuple field 2 type does not match one required by operation: expected string' ...
The text was updated successfully, but these errors were encountered:
30ab6fd
tt replicaset
rs
status
pgulutzan
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
space:format() is Tarantool way to define columns.
SQL:
Tarantool:
The text was updated successfully, but these errors were encountered: