This patch adds support for the ConditionExpression parameter of the item-writing operations in Alternator: PutItem, UpdateItem and DeleteItem. We already supported conditional updates/put/delete using the "Expected" parameter. The ConditionExpression parameter implemented here provides a very similar feature, using a different - and also newer and more powerful - syntax. The implementation here reuses much of our existing expression-parsing infrastructure. Unsurprisingly, ConditionExpression's syntax has much in common with UpdateExpression which we already support) and also many of the comparison functions already implemented for "Expected". However, it's still quite a bit of new code, because of the many different comparisons, functions, and syntax variations we need to support. This patch also expands alternator-test/test_condition_expression.py with a few additional corner cases discovered during the development of this patch. Almost all of the tests for this feature (35 out of 39) now pass. Two tests still fail because we don't yet support nested attributes (this is a missing feature across Alternator), and two tests fail because of minor ideosyncracies in DynamoDB's error path that we chose not to duplicate yet (but still remember the difference in the form of an xfailing test). Fixes #5035 Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Scylla developer documentation
This folder (and its subfolders) contain developer-oriented documentation concerning the Scylla codebase. We also have a wiki, which contains additional developer-oriented documentation. There is currently no clear definition of what goes where, so when looking for something be sure to check both.
Seastar documentation can be found here.
User documentation can be found on docs.scylladb.com
For information on how to build Scylla and how to contribute visit HACKING.md and CONTRIBUTING.md.