Skip to content

Commit 468d634

Browse files
committed
RUBY-220 - Plumbing to support custom types: serializing and deserializing custom domain objects defined by the client.
* Handle custom types in cql_type_parser.
1 parent be5696d commit 468d634

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/cassandra/cluster/schema/cql_type_parser.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def lookup_type(node, types)
7272
Cassandra::Types.tuple(*node.children.map { |t| lookup_type(t, types)})
7373
when 'empty' then
7474
Cassandra::Types.custom('org.apache.cassandra.db.marshal.EmptyType')
75+
when /^'/ then
76+
# Custom type.
77+
Cassandra::Types.custom(node.name[1..-2])
7578
else
7679
types.fetch(node.name) do
7780
raise IncompleteTypeError, "unable to lookup type #{node.name.inspect}"

0 commit comments

Comments
 (0)