Commit Graph

20 Commits

Author SHA1 Message Date
Paweł Dziepak
183b6fc6d9 db: do not return already expired cells in queries
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:25:41 +02:00
Tomasz Grabiec
3fc951e807 mutation_partition: Use default value for row_limit in query() 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
f656ae8ed4 db: Encapsulate deletable_row fields 2015-05-13 08:56:54 +02:00
Tomasz Grabiec
dbc40dfb09 db: Encapsulate the "row" class
Reduces coupling. User's should not rely on the fact that it's an
std::map<>.  It also allows us to extend row's interface with
domain-specific methods, which are a lot easier to discover than free
functions.
2015-05-13 08:56:54 +02:00
Tomasz Grabiec
56bea440a7 mutation_partition: Pass schema by const& where applicable
If method doesn't want to share schema ownership it doesn't have to
take it by shared pointer. The benefit is that it's slightly cheaper
and those methods may now be called from places which don't own
schema.
2015-05-13 08:56:54 +02:00
Tomasz Grabiec
f7abbda156 db: Apply frozen_mutation directly
We don't convert it back to mutation before applying.

mutation_partition has now apply() which works on
mutation_partition_view.
2015-05-08 09:19:02 +02:00
Tomasz Grabiec
386d17dff6 mutation_partition: Introduce apply_insert() 2015-05-08 09:19:01 +02:00
Tomasz Grabiec
84d2b2b2ea mutation_partition: Add view version of apply_delete() 2015-05-08 09:19:01 +02:00
Tomasz Grabiec
9235ca57ad mutation_partition: Reuse clustered_row() in apply_delete() 2015-05-08 09:19:01 +02:00
Tomasz Grabiec
cc4e2ec622 mutation_partition: Add r-value variant of clustered_row() 2015-05-08 09:19:01 +02:00
Tomasz Grabiec
04846ed3d2 mutation: Make mutation equality comparable 2015-05-06 16:40:48 +02:00
Tomasz Grabiec
6762a92299 mutation_partition: Take schema by reference in apply_row_tombstone() 2015-05-06 16:40:48 +02:00
Tomasz Grabiec
0aef6f2ff7 mutation_partition: Allow row lookup by clustering_key_view 2015-05-06 16:40:42 +02:00
Avi Kivity
b717b4b6bb db: add ostream operators for more types (mutation_partition and components) 2015-05-06 15:39:31 +03:00
Avi Kivity
cdfe03a5b2 db: implement mutation_partition assignment operators 2015-05-05 20:21:04 +03:00
Avi Kivity
aa94cd62dc db: implement mutation_partition copy constructor
As a temporary measure, we will return temporary mutation_partition
objects in response to queries, so we need an easy way to construct
them.
2015-05-05 20:21:04 +03:00
Avi Kivity
3a0de14aa8 db: more const correctness for column_family and component types
Ensure that read-side accessors are const.  This is important in preparation
for multiple memtables (and later, sstables) since a read-side
mutation_partition may be a temporary object coming from multiple memtables
(and sstables) while a write-side mutation_partition is guaranteed to belong
to a single memtable (and thus, not be temporary).

Since writers will want non-const mutation_partitions to write to, they won't
be able to use the read-side accessors by accident.
2015-05-05 19:37:21 +03:00
Raphael S. Carvalho
9a263328d5 mutation_partition: rename tombstone_for_static_row to partition_tombstone
tombstone from mutation partition is also used for static row purposes,
but under the hood, it's the partition tombstone.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-05-05 11:15:46 +03:00
Avi Kivity
6290dee438 db: const correctness for abstract_type and friends
Types are immutable.
2015-04-29 15:40:38 +03:00
Tomasz Grabiec
0d4821009c db: Move mutation and mutation_partition to separate headers and compilation units 2015-04-22 18:42:33 +02:00