Commit Graph

14 Commits

Author SHA1 Message Date
Avi Kivity
6290dee438 db: const correctness for abstract_type and friends
Types are immutable.
2015-04-29 15:40:38 +03:00
Avi Kivity
448d67053f cql3: convert operation::prepend to C++ 2015-04-28 12:13:38 +03:00
Avi Kivity
47f1fe8eb5 cql3: implement list append operation
UPDATE tab SET mylist = mylist + [1, 2, 3]
2015-04-27 14:54:16 +03:00
Avi Kivity
3d38708434 cql3: pass a database& instance to most foo::raw::prepare() variants
To prepare a user-defined type, we need to look up its name in the keyspace.
While we get the keyspace name as an argument to prepare(), it is useless
without the database instance.

Fix the problem by passing a database reference along with the keyspace.
This precolates through the class structure, so most cql3 raw types end up
receiving this treatment.

Origin gets along without it by using a singleton.  We can't do this due
to sharding (we could use a thread-local instance, but that's ugly too).

Hopefully the transition to a visitor will clean this up.
2015-04-20 16:15:34 +03:00
Avi Kivity
54b7cef55a cql3: convert element_deletion operation to C++ 2015-04-14 12:25:30 +03:00
Avi Kivity
aab6d7a173 cql3: convert lists::discarder to C++
And wire it up.
2015-03-30 14:28:16 +03:00
Avi Kivity
5369d6744c cql3: convert operation::subtraction to C++ (for sets, maps) 2015-03-27 16:10:35 +01:00
Tomasz Grabiec
e3422525c0 Use column_definition via const reference 2015-03-24 12:03:00 +01:00
Avi Kivity
9752c52743 cql3: operation: move code to .cc file 2015-03-23 23:22:48 +02:00
Avi Kivity
69841017dd cql3: convert operation::set_element() (for lists) to C++ 2015-03-23 21:54:22 +02:00
Avi Kivity
a6a186fd8c cql: convert operation::prepend to C++ 2015-03-16 16:45:36 +02:00
Avi Kivity
9b77f7cc8a cql: convert operation::subtraction to C++ 2015-03-16 16:45:36 +02:00
Avi Kivity
807c5e6eb2 cql: convert operation::addition to C++ 2015-03-16 16:45:34 +02:00
Avi Kivity
1fcce7cdcb cql3: convert operation::set_element 2015-03-05 18:11:37 +02:00