2 ms·
Found a solution to address the lack of WHERE x = NULL SELECT * FROM users; Then you can plug your PK into. UPDATE users SET address='' WHERE user_id IN (9af
by geenat 3y ago
Found a solution to address the lack of WHERE x = NULL
SELECT * FROM users;
Then you can plug your PK into.
UPDATE users SET address='' WHERE user_id IN (9affeac3-5d92-111d-779c-55eb6d78a806, ...) IF address=null;
Then you can do your SELECT to do your repair.
SELECT * FROM users WHERE address='';
_______________________
Another footgun: No default values for columns in CREATE TABLE. Very annoying.
Another footgun: Only "=" and "IN (...)" is supported in WHERE for partition keys. https://docs.scylladb.com/stable/cql/dml.html#the-where-clause https://docs.scylladb.com/stable/cql/dml.html#the-where-clau...
This means, you cannot do UPDATE WHERE user_id > 0 ....
I'm starting to really appreciate the effort CockroachDB went to, to make their version of "CQL" postgres compatible, even though architecturally they are both key-value store databases under the hood... it's just a shame CockroachDB just has far lower performance because of enforced consistency and no way to turn it off.
To be fair, ScyllaDB is removing footguns with every new version, just not fast enough for my taste.