Class: DB::MariaDB::Native::Types::Integer
- Inherits:
-
Object
- Object
- DB::MariaDB::Native::Types::Integer
- Defined in:
- lib/db/mariadb/native/types.rb
Overview
An integer type converter.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
- #The SQL type name.(SQLtypename.) ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(name = "INTEGER") ⇒ Integer
constructor
Initialize an integer type converter.
-
#parse(string) ⇒ Object
Parse an integer value from the database.
Constructor Details
#initialize(name = "INTEGER") ⇒ Integer
Initialize an integer type converter.
37 38 39 |
# File 'lib/db/mariadb/native/types.rb', line 37 def initialize(name = "INTEGER") @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
42 43 44 |
# File 'lib/db/mariadb/native/types.rb', line 42 def name @name end |
#The SQL type name.(SQLtypename.) ⇒ Object (readonly)
42 |
# File 'lib/db/mariadb/native/types.rb', line 42 attr :name |
Instance Method Details
#parse(string) ⇒ Object
Parse an integer value from the database.
47 48 49 |
# File 'lib/db/mariadb/native/types.rb', line 47 def parse(string) Integer(string) if string end |