You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was wondering if there is any plan for a composite primary key in GlueSQL (esp shared memory)
Currently below is valid
let sql = " CREATE TABLE market (
symbol TEXT NOT NULL PRIMARY KEY,
side UINT8 NOT NULL,
level UINT8 NOT NULL,
price DECIMAL NOT NULL,
volume DECIMAL NOT NULL,
exchange UINT8 NOT NULL,
)"
when we insert another row with the same symbol, it will return error.
duplicate entry 'Str("ZEN")' for primary_key field
This is great, but I was wondering if there is any plan for support in things like below
let sql = " CREATE TABLE market (
symbol TEXT NOT NULL,
side UINT8 NOT NULL,
level UINT8 NOT NULL,
price DECIMAL NOT NULL,
volume DECIMAL NOT NULL,
exchange UINT8 NOT NULL,
PRIMARY KEY (symbol, level, exchange)
)"
where only the unique combination of (symbol, level, exchange) is allowed. I tried the above but it did not do anything, so I believe it is not implemented yet. https://www.geeksforgeeks.org/composite-key-in-sql/
The text was updated successfully, but these errors were encountered:
Hi, I was wondering if there is any plan for a composite primary key in GlueSQL (esp shared memory)
Currently below is valid
when we insert another row with the same symbol, it will return error.
This is great, but I was wondering if there is any plan for support in things like below
where only the unique combination of
(symbol, level, exchange)
is allowed. I tried the above but it did not do anything, so I believe it is not implemented yet.https://www.geeksforgeeks.org/composite-key-in-sql/
The text was updated successfully, but these errors were encountered: