cql3: add frozen type support to cql3_type

This commit is contained in:
Avi Kivity
2015-04-26 19:08:48 +03:00
parent 3fec0842ef
commit 74cd3a58ef
2 changed files with 7 additions and 7 deletions

View File

@@ -246,6 +246,12 @@ cql3_type::raw::tuple(std::vector<shared_ptr<raw>> ts) {
return make_shared(raw_tuple(std::move(ts)));
}
shared_ptr<cql3_type::raw>
cql3_type::raw::frozen(shared_ptr<raw> t) {
t->freeze();
return t;
}
thread_local shared_ptr<cql3_type> cql3_type::ascii = make("ascii", ascii_type, cql3_type::kind::ASCII);
thread_local shared_ptr<cql3_type> cql3_type::bigint = make("bigint", long_type, cql3_type::kind::BIGINT);
thread_local shared_ptr<cql3_type> cql3_type::blob = make("blob", bytes_type, cql3_type::kind::BLOB);

View File

@@ -64,13 +64,7 @@ public:
static shared_ptr<raw> list(shared_ptr<raw> t);
static shared_ptr<raw> set(shared_ptr<raw> t);
static shared_ptr<raw> tuple(std::vector<shared_ptr<raw>> ts);
#if 0
public static Raw frozen(CQL3Type.Raw t) throws InvalidRequestException
{
t.freeze();
return t;
}
#endif
static shared_ptr<raw> frozen(shared_ptr<raw> t);
virtual sstring to_string() const = 0;
friend std::ostream& operator<<(std::ostream& os, const raw& r);
};