ConnectionStringBuilder class

Fluent builder for ODBC connection strings.

Collects driver, server, port, database, credentials, and custom options, then produces a semicolon-separated key=value string suitable for use with the service connect method.

Use SqlServerBuilder, PostgreSqlBuilder, or MySqlBuilder for vendor-specific defaults, or ConnectionStringBuilder for full control.

Implementers

Constructors

ConnectionStringBuilder({String? driver, String? server, int? port, String? database, String? uid, String? pwd, bool trustedConnection = false})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() String
Produces an ODBC connection string (key=value;key=value;...). Only includes non-null, non-empty values.
credentials(String user, String password) ConnectionStringBuilder
database(String value) ConnectionStringBuilder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
option(String key, String value) ConnectionStringBuilder
port(int value) ConnectionStringBuilder
server(String value) ConnectionStringBuilder
toString() String
A string representation of this object.
inherited
trusted() ConnectionStringBuilder

Operators

operator ==(Object other) bool
The equality operator.
inherited