Commit Graph

23 Commits

Author SHA1 Message Date
Avi Kivity
ebaeefa02b Merge seatar upstream (seastar namespace)
- introcduced "seastarx.hh" header, which does a "using namespace seastar";
 - 'net' namespace conflicts with seastar::net, renamed to 'netw'.
 - 'transport' namespace conflicts with seastar::transport, renamed to
   cql_transport.
 - "logger" global variables now conflict with logger global type, renamed
   to xlogger.
 - other minor changes
2017-05-21 12:26:15 +03:00
Avi Kivity
0135b4d5cd cql3: constify metadata users
Metadata usually doesn't change after it is created; make that visible in
the code, allowing further optimizations to be applied later.
Message-Id: <1464334638-7971-3-git-send-email-avi@scylladb.com>
2016-05-31 09:12:11 +03:00
Avi Kivity
6728454591 cql3: rationalize extract_result_metadata()
Rather than dynamic_cast<>ing the statement to see whether it is a
select statement, add a virtual function to cql_statement to get the
result metadata.

This is faster and easier to follow.
Message-Id: <1464334638-7971-2-git-send-email-avi@scylladb.com>
2016-05-31 09:12:02 +03:00
Calle Wilund
3906dc9f0d cql3::statements: Change check_access to future<> + implement 2016-04-19 11:49:05 +00:00
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
Pekka Enberg
1890d276b9 cql3: Add depends_on_{keyspace|column_family} helper to cql_statement
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-10-15 09:18:52 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Calle Wilund
e99ffef141 cql_statement: change signature of execute_internal.
* Use storage_proxy here as well, even though the execution is 
  by definition local. (Since some local ops are better done 
  via SP anyway)
2015-07-06 08:21:15 +02:00
Gleb Natapov
a338407e29 make storage_proxy object distributed
storage_proxy holds per cpu state now to track clustering, so it has to
be distributed otherwise smp setup does not work.
2015-06-17 15:14:06 +02:00
Calle Wilund
1631ce132e Add "storage_proxy&" argument to cql_statement::validate
To make db, schemas etc reachable
2015-06-03 10:13:52 +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
Tomasz Grabiec
2902395129 Relax includes 2015-03-30 09:01:59 +02:00
Pekka Enberg
4efaccaff6 cql3: Use forward declaration for result_message
There's a cyclic dependency between cql3 and transport namespaces when
we introduce prepared statements. The latter pulls
parsed_statement::prepared from the former. Break the cycle by using
a forward delcaration in cql_statement.hh.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-18 11:14:40 +02:00
Tomasz Grabiec
0f2a1dffb6 cql3: Pass bound term count around as unsigned integer
It's compared with size_t and is set from size_t. To avoid ugly casts
we can store it as unsigned int. It's always positive anyway. Origin
uses signed int ("int") because there is no unsigned int in Java.
2015-02-12 19:40:58 +01:00
Tomasz Grabiec
f3130d395f cql3: Return shared_ptr<result_message> instead of optional
It's polymorphic type in Origin.
2015-02-12 19:40:57 +01:00
Tomasz Grabiec
9530a372cc cql3: Take reference to storage_proxy and call instance methods 2015-02-09 10:28:44 +01:00
Tomasz Grabiec
d243fb7a01 cql3: Pass sstrings as const& where applicable 2015-02-04 10:29:00 +01:00
Tomasz Grabiec
a0b04b9149 cql3: Fix typo 2015-02-04 10:28:59 +01:00
Tomasz Grabiec
5710a99f44 cql3: Fix mis-overrides of cql_statement::execute*()
The method may defer so the result is wrapped in future<>.

I think we don't need to wrap arguments in shared_ptr<> because they
may come from the request state object.
2015-02-04 10:28:51 +01:00
Pekka Enberg
74f8799324 cql3: Make cql::statement::uses_function const
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-20 11:47:38 +02:00
Pekka Enberg
821bfc66d1 cql3: Fix cql3_statement::execute_internal signature
It's supposed to be a pure virtual method. Needed to be able to link
cql_statement.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-14 09:01:18 +02:00
Pekka Enberg
96c849681d cql3: Add empty destructor to cql_statement
Needed for antlr-generated code to link.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-14 09:01:11 +02:00
Pekka Enberg
bf3112f331 cql3: convert CQLStatement to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2014-12-30 10:03:44 +02:00