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.
17 18 19 |
# File 'lib/simple/sql/connection/type_info.rb', line 17 def initialize(connection) @connection = connection end |
Instance Method Details
#pg_type_name(ftype:, fmod:) ⇒ Object
returns a Symbol
22 23 24 25 |
# File 'lib/simple/sql/connection/type_info.rb', line 22 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
28 29 30 31 |
# File 'lib/simple/sql/connection/type_info.rb', line 28 def type_name(ftype:, fmod:) @type_names ||= {} @type_names[[ftype, fmod]] ||= _type_name(ftype, fmod) end |