Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶ added in v1.1.0
Connection is an open, pinged database with its resolved dialect and schema.
func Open ¶ added in v1.1.0
func Open(ctx context.Context, opts OpenOptions) (Connection, error)
Open resolves a named connection, normalizes the driver and DSN, and pings the database. SQLite opens read-only or read-write as requested.
type OpenOptions ¶ added in v1.1.0
type OpenOptions struct {
// DSN is a connection string or connection://[<namespace>/]<name>.
DSN string
// Driver overrides the dialect parsed from the DSN; it must agree with it.
Driver string
// Schema defaults to main, dbo or public by dialect.
Schema string
ConnectionsDir string
ReadOnly bool
}
Click to show internal directories.
Click to hide internal directories.