Class: DB::Postgres::Native::Types::Symbol

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

Overview

A symbol/enum type converter.

Instance Method Summary collapse

Instance Method Details

#nameObject

Get the SQL type name for enum.



107
108
109
# File 'lib/db/postgres/native/types.rb', line 107

def name
	"ENUM"
end

#parse(string) ⇒ Object

Parse a symbol value from the database.



114
115
116
# File 'lib/db/postgres/native/types.rb', line 114

def parse(string)
	string&.to_sym
end