Class: DB::Postgres::Native::Types::Boolean

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

Overview

A boolean type converter.

Instance Method Summary collapse

Instance Method Details

#nameObject

Get the SQL type name for boolean.



56
57
58
# File 'lib/db/postgres/native/types.rb', line 56

def name
	"BOOLEAN"
end

#parse(string) ⇒ Object

Parse a boolean value from the database.



63
64
65
# File 'lib/db/postgres/native/types.rb', line 63

def parse(string)
	string == "t"
end