Commit Graph

26 Commits

Author SHA1 Message Date
Glauber Costa
7677a3423e schema: specify the kind of join we want
If we end up including more than one boost::<>::join, like
boost::range::join and boost::string::join, that will create an ambiguity.

The compiler doesn't like it very much.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:49 -04:00
Tomasz Grabiec
631dad8a29 schema: Add const qualifiers to lookup methods 2015-04-22 17:36:27 +02:00
Tomasz Grabiec
06f198b10c schema: Add id field
It uniquely identifies column_family globally. Will be used for
column_family lookups.
2015-04-15 20:33:48 +02:00
Tomasz Grabiec
f5a45ae6e8 schema: Leave a warning about across core access of schema 2015-04-15 20:33:48 +02:00
Pekka Enberg
28b03772f2 Add schema::set_comment() member function
Needed by the cf_prop_defs class to modify a schema object in the
apply_to_cf_metadata() function.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-24 15:04:17 +02:00
Tomasz Grabiec
e738b213ed schema: Fix default copy constructor
Schema has containers which hash pointers to column definitions
embedded in the schema. It's not safe to just copy those, we need to
rehash them using new locations.
2015-03-24 12:06:58 +01:00
Tomasz Grabiec
e3422525c0 Use column_definition via const reference 2015-03-24 12:03:00 +01:00
Tomasz Grabiec
300a9572bd types: De-virtualize tuple_type
tuple_type is for managing our internal representation of keys. It
shares some interface with abstract_type, but the latter is a basis
for types of data stored in cells. tuple_type does not need to hide
behind a virtual interface.

Note: there is a TupleType in Origin, but it serves a different purpose.
2015-03-19 12:55:28 +01:00
Tomasz Grabiec
a8ce730842 schema: Remove partition_key_prefix_type
We don't need it.
2015-03-19 12:55:28 +01:00
Tomasz Grabiec
8912417dd0 cql3: Convert classes from org.cassandra.cql3.selection package 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
baba7c12be schema: Introduce column_definition::component_index() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
0f1b6b079a schema: Store partition_key_prefix_type
single_column_primary_key_restrictions may generate partition key
prefixes.
2015-03-11 14:56:10 +01:00
Tomasz Grabiec
0612066490 schema: Introduce column_definition::is_regular() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
5518cd6b96 schema: Add helper for turning column_definition range into a vector 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
74b1a71dcc schema: Introduce schema::position(column_definition&)
Matches org.apache.cassandra.config.ColumnDefinition#position()
2015-03-11 14:56:10 +01:00
Avi Kivity
6f6b1fdb00 schema: add static_column_at()
Parallels regular_column_at().
2015-03-05 19:59:18 +02:00
Avi Kivity
74beb62527 schema: add stringify operation for column_definition 2015-03-05 14:03:35 +02:00
Nadav Har'El
8265a13dbd schema: add "comment" string
Add a comment string to a schema, which may be set but is currently
not further used.

The originals Cassandra code has a comment for each of the builtin
schemas, and it's a shame not to remember them.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-03-02 15:18:23 +01:00
Tomasz Grabiec
91176f469e schema: Add schema::all_columns_in_select_order()
After org.apache.cassandra.config.CFMetaData#allColumnsInSelectOrder
2015-02-27 10:48:56 +01:00
Tomasz Grabiec
1a0ffdfb99 schema: Encapsulate column sets 2015-02-27 10:48:56 +01:00
Tomasz Grabiec
a61d9ee18e schema: Add static columns to schema 2015-02-27 10:48:56 +01:00
Tomasz Grabiec
8b9078c86a schema: Make column_kind an enum class 2015-02-27 10:48:56 +01:00
Tomasz Grabiec
b77367dabe cql3: Simplify primary key membership checks 2015-02-27 10:48:56 +01:00
Tomasz Grabiec
6cd524988d db: Add more methods to schema 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
19e89a6057 db: Introduce mutation_partition::apply(const mutation_partition&)
It merges two partition mutations together. It is assumed that the first
one (invocation target) is much larger.
2015-02-09 10:28:44 +01:00
Tomasz Grabiec
211f52e40a schema: Move to schema.hh 2015-02-09 10:28:44 +01:00