Class: DB::MariaDB::Native::Types::Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/db/mariadb/native/types.rb

Overview

A symbol/enum type converter.

Instance Method Summary collapse

Instance Method Details

#nameObject

Get the SQL type name for enum.



116
117
118
# File 'lib/db/mariadb/native/types.rb', line 116

def name
  "ENUM"
end

#parse(string) ⇒ Object

Parse a symbol value from the database.



123
124
125
# File 'lib/db/mariadb/native/types.rb', line 123

def parse(string)
  string&.to_sym
end