Class: DB::Postgres::Native::Types::Decimal
- Inherits:
-
Object
- Object
- DB::Postgres::Native::Types::Decimal
- Defined in:
- lib/db/postgres/native/types.rb
Overview
A decimal type converter.
Instance Method Summary collapse
-
#name ⇒ Object
Get the SQL type name for decimal.
-
#parse(string) ⇒ Object
Parse a decimal value from the database.
Instance Method Details
#name ⇒ Object
Get the SQL type name for decimal.
72 73 74 |
# File 'lib/db/postgres/native/types.rb', line 72 def name "DECIMAL" end |
#parse(string) ⇒ Object
Parse a decimal value from the database.
79 80 81 |
# File 'lib/db/postgres/native/types.rb', line 79 def parse(string) BigDecimal(string) if string end |