From 5982c0ee10794deffd6ed96d838bfa93aa1cf360 Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Mon, 21 Mar 2016 12:27:17 +0000 Subject: [PATCH] Cql.g: Add extension function SCYLLA_TIMEUUID_LIST_INDEX Allows scylla sstable loader (cql) to do by-uuid updates to non-frozen lists. --- cql3/Cql.g | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cql3/Cql.g b/cql3/Cql.g index 55e8cb4604..ed84f03080 100644 --- a/cql3/Cql.g +++ b/cql3/Cql.g @@ -1157,7 +1157,8 @@ columnOperation[operations_type& operations] columnOperationDifferentiator[operations_type& operations, ::shared_ptr key] : '=' normalColumnOperation[operations, key] - | '[' k=term ']' specializedColumnOperation[operations, key, k] + | '[' k=term ']' specializedColumnOperation[operations, key, k, false] + | '[' K_SCYLLA_TIMEUUID_LIST_INDEX '(' k=term ')' ']' specializedColumnOperation[operations, key, k, true] ; normalColumnOperation[operations_type& operations, ::shared_ptr key] @@ -1199,11 +1200,12 @@ normalColumnOperation[operations_type& operations, ::shared_ptr, shared_ptr>>& operations, shared_ptr key, - shared_ptr k] + shared_ptr k, + bool by_uuid] : '=' t=term { - add_raw_update(operations, key, make_shared(k, t)); + add_raw_update(operations, key, make_shared(k, t, by_uuid)); } ; @@ -1567,6 +1569,8 @@ K_OR: O R; K_REPLACE: R E P L A C E; K_DETERMINISTIC: D E T E R M I N I S T I C; +K_SCYLLA_TIMEUUID_LIST_INDEX: S C Y L L A '_' T I M E U U I D '_' L I S T '_' I N D E X; + // Case-insensitive alpha characters fragment A: ('a'|'A'); fragment B: ('b'|'B');