Class: DB::Postgres::Native::Types::Boolean
- Inherits:
-
Object
- Object
- DB::Postgres::Native::Types::Boolean
- Defined in:
- lib/db/postgres/native/types.rb
Overview
A boolean type converter.
Instance Method Summary collapse
-
#name ⇒ Object
Get the SQL type name for boolean.
-
#parse(string) ⇒ Object
Parse a boolean value from the database.
Instance Method Details
#name ⇒ Object
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 |