Commit Graph

32 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
Tomasz Grabiec
9d11968ad8 Rename serialization_format to cql_serialization_format 2016-02-15 16:53:56 +01:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Paweł Dziepak
6788a7afdb cql3: remove tombstone argument from do_{add, put, append}
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-22 15:30:13 +02: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
Avi Kivity
dabe70c9a2 cql3: remove Java remnants from maps.hh
The code was converted to C++ but the old Java remained.
2015-04-21 10:57:35 +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
a5b675b988 cql3: move maps.hh code to .cc 2015-04-15 21:21:05 +03:00
Avi Kivity
94f4a23464 cql3: convert maps::discarder_by_key to C++ 2015-04-14 12:25:28 +03:00
Avi Kivity
de2bb71432 cql3: fix bad bracing in maps.hh
Random open and close brace, luckily no harm done.
2015-04-12 15:13:54 +03:00
Avi Kivity
238ef64d5a cql3: use bytes_view when creating a map literal from the serialized form
More efficient, and easier to use (if we already have a view).
2015-04-01 20:56:31 +03:00
Avi Kivity
6c343057ea cql3: implement maps setter correctly
Now that we have collection tombstones, we can kill all existing cells
in maps::setter.
2015-03-26 18:14:35 +01:00
Tomasz Grabiec
e3422525c0 Use column_definition via const reference 2015-03-24 12:03:00 +01:00
Avi Kivity
1985f22a41 cql: use set_cell()
Instead of set_static_cell()/set_clustered_cell().
2015-03-24 08:35:20 +01:00
Avi Kivity
c77648da6e db: add collection tombstones 2015-03-23 21:54:22 +02:00
Avi Kivity
62ee57b953 db: wrap collection_type_impl::mutation's vector in a struct
This will allow us to introduce a tombstone alongside.
2015-03-23 21:54:22 +02: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
Pekka Enberg
cb6aa2f0b5 cql3: Fix abstract_marker::to_string()
Needed to be able to instantiate abstract_marker class.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-18 11:55:26 +02:00
Avi Kivity
d49804ad73 cql: maps: drop unused Java declarations 2015-03-16 18:27:42 +02:00
Avi Kivity
6fee695095 db: replace most uses of protocol_version with serialization_format
Better type safety.
2015-03-16 18:15:16 +02:00
Avi Kivity
2ae36bdc98 maps: fix parameter mismatch in call to get_with_protocol_version() 2015-03-16 18:10:09 +02:00
Avi Kivity
44c929f6f5 cql: convert maps::putter to C++ 2015-03-16 16:44:00 +02:00
Dor Laor
7921ef406a db: serialize via bytes_iterator instead of std::ostream
Instead of using inefficient std::ostream, use our own 'bytes' iterator class.
Compute ahead of time the length of the byte buffer.
Afterwards serialize the objects into it.

Gives ~X5 boost over previus results (that sometimes don't even
finish in reasonable time)

[avi: add missing include]
2015-03-16 07:07:25 +02:00
Tomasz Grabiec
2ee58d66d6 Merge tag 'avi/collections/v3'
Conflicts:
	tests/urchin/cql_query_test.cc

[tgrabiec: fixed compilation error in cql3/maps.hh]
2015-03-12 11:30:17 +01:00
Avi Kivity
1172f65d50 cql3: convert maps::setter_by_key to C++ 2015-03-12 10:22:17 +02:00
Avi Kivity
a64cd8f22f cql3: convert maps::literal to C++ 2015-03-12 10:22:17 +02:00
Avi Kivity
0f793f1aa7 cql3: convert maps::delayed_value to C++ 2015-03-12 10:22:15 +02:00
Avi Kivity
561d72879a cql3: convert maps::value to C++ 2015-03-12 10:14:25 +02:00
Avi Kivity
7a94b0c0a3 cql3: convert maps::setter_by_key
Basic operation to set a single map element to a value.
2015-03-05 18:11:31 +02:00
Avi Kivity
4602d86dc9 cql3: convert maps::key_spec_of/maps::value_spec_of 2015-03-05 15:31:52 +02:00
Pekka Enberg
2cfc7a8908 cql3: Convert Maps.Literal to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-24 15:24:44 +02:00
Pekka Enberg
9a4575bf52 cql3: convert Maps to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-09 13:00:16 +02:00