Module: DuckDB::Converter::IntToSym
- Defined in:
- lib/duckdb/converter/int_to_sym.rb
Overview
:nodoc: all
Constant Summary collapse
- STATEMENT_TYPES =
%i[ invalid select insert update explain delete prepare create execute alter transaction copy analyze variable_set create_func drop export pragma vacuum call set load relation extension logical_plan attach detach multi ].freeze
- HASH_TYPES =
{ 0 => :invalid, 1 => :boolean, 2 => :tinyint, 3 => :smallint, 4 => :integer, 5 => :bigint, 6 => :utinyint, 7 => :usmallint, 8 => :uinteger, 9 => :ubigint, 10 => :float, 11 => :double, 12 => :timestamp, 13 => :date, 14 => :time, 15 => :interval, 16 => :hugeint, 32 => :uhugeint, 17 => :varchar, 18 => :blob, 19 => :decimal, 20 => :timestamp_s, 21 => :timestamp_ms, 22 => :timestamp_ns, 23 => :enum, 24 => :list, 25 => :struct, 26 => :map, 33 => :array, 27 => :uuid, 28 => :union, 29 => :bit, 30 => :time_tz, 31 => :timestamp_tz }.freeze
Class Method Summary collapse
-
.statement_type_to_sym(val) ⇒ Object
:nodoc:.
-
.type_to_sym(val) ⇒ Object
:nodoc:.
Class Method Details
.statement_type_to_sym(val) ⇒ Object
:nodoc:
76 77 78 79 80 |
# File 'lib/duckdb/converter/int_to_sym.rb', line 76 def statement_type_to_sym(val) # :nodoc: raise DuckDB::Error, "Unknown statement type: #{val}" if val >= STATEMENT_TYPES.size STATEMENT_TYPES[val] end |
.type_to_sym(val) ⇒ Object
:nodoc:
82 83 84 85 86 |
# File 'lib/duckdb/converter/int_to_sym.rb', line 82 def type_to_sym(val) # :nodoc: raise DuckDB::Error, "Unknown type: #{val}" unless HASH_TYPES.key?(val) HASH_TYPES[val] end |