Class: Simple::SQL::Connection::TypeInfo
- Inherits:
-
Object
- Object
- Simple::SQL::Connection::TypeInfo
- Defined in:
- lib/simple/sql/connection/type_info.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ TypeInfo
constructor
A new instance of TypeInfo.
-
#pg_type_name(ftype:, fmod:) ⇒ Object
returns a Symbol.
-
#type_name(ftype:, fmod:) ⇒ Object
returns a Symbol.
Constructor Details
#initialize(connection) ⇒ TypeInfo
Returns a new instance of TypeInfo.
16 17 18 |
# File 'lib/simple/sql/connection/type_info.rb', line 16 def initialize(connection) @connection = connection end |
Instance Method Details
#pg_type_name(ftype:, fmod:) ⇒ Object
returns a Symbol
21 22 23 24 |
# File 'lib/simple/sql/connection/type_info.rb', line 21 def pg_type_name(ftype:, fmod:) @pg_type_names ||= {} @pg_type_names[[ftype, fmod]] ||= _pg_type_name(ftype, fmod) end |
#type_name(ftype:, fmod:) ⇒ Object
returns a Symbol
27 28 29 30 |
# File 'lib/simple/sql/connection/type_info.rb', line 27 def type_name(ftype:, fmod:) @type_names ||= {} @type_names[[ftype, fmod]] ||= _type_name(ftype, fmod) end |