Method: Cequel::Type.lookup_cql

Defined in:
lib/cequel/type.rb

.lookup_cql(cql_name) ⇒ Base

Look up a type by CQL name

Parameters:

  • cql_name (Symbol)

    CQL name of a type

Returns:

  • (Base)

    type with the given CQL name

Raises:

  • (UnknownType)

    if no type by that name is registered

Since:

  • 1.0.0



57
58
59
60
61
# File 'lib/cequel/type.rb', line 57

def self.lookup_cql(cql_name)
  BY_CQL_NAME.fetch(cql_name.to_sym)
rescue KeyError
  raise UnknownType, "Unrecognized CQL type #{cql_name.inspect}"
end