Class: SnowflakeOdbcAdapter::Metadata
- Inherits:
-
Object
- Object
- SnowflakeOdbcAdapter::Metadata
- Includes:
- Singleton
- Defined in:
- lib/snowflake_odbc_adapter/metadata.rb
Overview
:nodoc:
Constant Summary collapse
- FIELDS =
%i[ SQL_DBMS_NAME SQL_DBMS_VER SQL_IDENTIFIER_CASE SQL_QUOTED_IDENTIFIER_CASE SQL_IDENTIFIER_QUOTE_CHAR SQL_MAX_IDENTIFIER_LEN SQL_MAX_TABLE_NAME_LEN SQL_USER_NAME SQL_DATABASE_NAME ].freeze
Instance Attribute Summary collapse
-
#identifier_quote_char ⇒ Object
readonly
Returns the value of attribute identifier_quote_char.
Instance Method Summary collapse
- #connection(config, connection) ⇒ Object
-
#initialize ⇒ Metadata
constructor
A new instance of Metadata.
- #upcase_identifiers? ⇒ Boolean
Constructor Details
#initialize ⇒ Metadata
Returns a new instance of Metadata.
23 24 25 |
# File 'lib/snowflake_odbc_adapter/metadata.rb', line 23 def initialize @mutex = Mutex.new end |
Instance Attribute Details
#identifier_quote_char ⇒ Object (readonly)
Returns the value of attribute identifier_quote_char.
21 22 23 |
# File 'lib/snowflake_odbc_adapter/metadata.rb', line 21 def identifier_quote_char @identifier_quote_char end |
Instance Method Details
#connection(config, connection) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/snowflake_odbc_adapter/metadata.rb', line 37 def connection(config, connection) unless @connection with_mutex do @connection = connection end end @connection end |
#upcase_identifiers? ⇒ Boolean
33 34 35 |
# File 'lib/snowflake_odbc_adapter/metadata.rb', line 33 def upcase_identifiers? (identifier_case == ODBC::SQL_IC_UPPER) end |