- 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
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>
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>
Query processor needs to store prepared statements as part of a client
session for PREPARE and EXECUTE requests. Switch from unique_ptr to
shared_ptr in preparation for that.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
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.
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.
Parsed statements are not CQL statements so we shouldn't inherit from the
latter although commit 485620a ("cql3: Fix cql_statement and parsed_statement
confusion") claims otherwise.
This is needed to convert classes such as UpdateStatement.ParsedInsert.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Use shared_from_this instead of the synthetic unique_ptr argument for
parsed_statement::prepare() to preserve the original Cassandra API for
parsed statements.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
We cannot keep a C++ reference to the statement object because we then
lose ownership information. Start using unique_ptr as suggested by Avi
instead.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>