Class: DB::MariaDB::Native::Types::Decimal

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

Overview

A decimal type converter.

Instance Method Summary collapse

Instance Method Details

#nameObject

Get the SQL type name for decimal.



81
82
83
# File 'lib/db/mariadb/native/types.rb', line 81

def name
	"DECIMAL"
end

#parse(string) ⇒ Object

Parse a decimal value from the database.



88
89
90
# File 'lib/db/mariadb/native/types.rb', line 88

def parse(string)
	BigDecimal(string) if string
end