class
ODBC::Config
- ODBC::Config
- Reference
- Object
Overview
Configuration options for ODBC connections and operations.
Values are applied to each new connection via Connection#apply_config.
Can be configured programmatically or via environment variables.
ODBC::Config.configure do |c|
c.connection_timeout = 60.seconds
c.query_timeout = 30.seconds
c.enable_tracing = true
end
Defined in:
odbc/config.crConstructors
-
.from_env : Config
Load configuration from environment variables.
- .instance : Config
Class Method Summary
- .configure(&) : Nil
-
.reset! : Nil
Reset configuration to defaults (useful for testing)
Instance Method Summary
- #auto_commit=(auto_commit : Bool)
- #auto_commit? : Bool
- #connection_timeout : Time::Span
- #connection_timeout=(connection_timeout : Time::Span)
- #default_buffer_size : Int32
- #default_buffer_size=(default_buffer_size : Int32)
- #enable_tracing=(enable_tracing : Bool)
- #enable_tracing? : Bool
- #login_timeout : Time::Span
- #login_timeout=(login_timeout : Time::Span)
- #max_string_length : Int32
- #max_string_length=(max_string_length : Int32)
- #query_timeout : Time::Span
- #query_timeout=(query_timeout : Time::Span)
- #trace_file : String
- #trace_file=(trace_file : String)
Constructor Detail
Load configuration from environment variables.
Called automatically on first access of Config.instance.