Commit Graph

31 Commits

Author SHA1 Message Date
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Calle Wilund
5b570c417b cql3::operation: Allow set_element to be "by uuid" (for lists)
Just add an instantiation flag to keep track. Then choose actual
opertation to perform in prepare.
2016-03-21 12:28:37 +00:00
Pekka Enberg
9521ef6402 cql3: Remove some ifdef'd code 2015-12-18 13:29:58 +02:00
Avi Kivity
a4a776e66c cql3: add operation::make_cell() helpers
atomic_cell will soon become type-aware, so add helpers to class operation
that can supply the type, as it is available in operation::column.type.

(the type will be used in following patches)
2015-11-13 17:13:07 +02:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Pekka Enberg
11b633208d cql3: Remove Java imports from C++ files
Remove left-over Java imports from files that are already translated to
C++.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:41:12 +03:00
Pekka Enberg
d50139351f cql3: Use pragma once everywhere
There's no benefit to using C include guards so switch to pragma once
everywhere for consistency.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:32:56 +03:00
Tomasz Grabiec
a9972b4b28 Relax header dependencies 2015-04-24 18:01:01 +02: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
Tomasz Grabiec
d143f68898 cql3: Convert backend for 'delete' statement 2015-03-30 09:07:01 +02:00
Tomasz Grabiec
e3422525c0 Use column_definition via const reference 2015-03-24 12:03:00 +01:00
Tomasz Grabiec
bdbd5547e3 db: Cleanup key names
clustering_key::one -> clustering_key
clustering_key::prefix::one -> clustering_key_prefix
partition_key::one -> partition_key
clustering_prefix -> exploded_clustering_prefix
2015-03-20 18:59:29 +01:00
Tomasz Grabiec
1b1af8cdfd db: Introduce types to hold keys
Holding keys and their prefixes as "bytes" is error prone. It's easy
to mix them up (or use wrong types). This change adds wrappers for
keys with accessors which are meant to make misuses as difficult as
possible.

Prefix and full keys are now distinguished. Places which assumed that
the representation is the same (it currently is) were changed not to
do so. This will allow us to introduce more compact storage for non-prefix
keys.
2015-03-17 15:56:29 +01: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
Avi Kivity
bb58deadc0 cql3: add virtual destructor to class operation 2015-03-05 14:03:36 +02:00
Tomasz Grabiec
d5a7f37c45 db: Merge api.hh into database.hh 2015-02-09 10:28:44 +01:00
Tomasz Grabiec
800ba79efa db: Drop api:: namespace from mutation model classes
In preparation for merging into database.hh
2015-02-09 10:28:44 +01:00
Tomasz Grabiec
af26be3e30 cql3: Expose base constructor in constants::setter 2015-02-04 10:29:05 +01:00
Tomasz Grabiec
25a435e398 cql3: Convert Operation::SetValue
I put it in a separate header, operation_impl.hh, to avoid cyclic
dependency between operation.hh and constants.hh.
2015-02-04 10:29:05 +01:00
Tomasz Grabiec
f5e427b80f cql3: Convert more from operation.hh 2015-02-04 10:29:05 +01:00
Tomasz Grabiec
d243fb7a01 cql3: Pass sstrings as const& where applicable 2015-02-04 10:29:00 +01:00
Tomasz Grabiec
602e6a9c17 cql3: Add missing default implementation of operation::requires_read() 2015-02-04 10:29:00 +01:00
Tomasz Grabiec
ab1bdf1b82 cql3: expose Operation.execute() interface 2015-01-29 19:41:00 +01:00
Tomasz Grabiec
496e5c651f cql3: Convert more of ModificationStatement 2015-01-29 19:41:00 +01:00
Tomasz Grabiec
159099e854 cql3: use our schema classes instead of the converts from config:: 2015-01-29 18:55:24 +01:00
Tomasz Grabiec
fc2bc5558e cql3: cleanup: Drop redundant optional<>
shared_ptr<> is already optional.
2015-01-23 18:45:28 +01:00
Pekka Enberg
853c1e10b4 cql3: Convert Operation to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-20 11:47:38 +02:00