ConnectionOptions class
Options for connection establishment and statement execution.
Used when calling connect to configure timeouts. loginTimeout is passed to the ODBC driver as the login/connection timeout. maxResultBufferBytes caps the size of query result buffers for this connection (default defaultMaxResultBufferBytes when null).
Constructors
- ConnectionOptions({Duration? connectionTimeout, Duration? loginTimeout, Duration? queryTimeout, int? maxResultBufferBytes})
-
const
Properties
- connectionTimeout → Duration?
-
Timeout for establishing the connection. When set, used as loginTimeout
for the ODBC driver if loginTimeout is null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- loginTimeout → Duration?
-
Login timeout (ODBC SQL_ATTR_LOGIN_TIMEOUT). Takes precedence over
connectionTimeout when both are set.
final
- loginTimeoutMs → int
-
Effective login timeout in milliseconds:
loginTimeout ?? connectionTimeout, or 0 if neither is set.
no setter
- maxResultBufferBytes → int?
-
Maximum size in bytes for query result buffers on this connection.
When null, defaultMaxResultBufferBytes is used.
final
- queryTimeout → Duration?
-
Timeout for individual queries. Applied when using prepared statements
with a timeout (e.g.
preparewithtimeoutMs).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited