Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(opts ConnectOpts) (*sql.DB, error)
Connect to a SQLite database using the modernc.org/sqlite driver
func ParseConnectionString ¶
func ParseConnectionString(connString string, log *slog.Logger) (parsedConnString string, dbPath string, isMemoryDB bool, err error)
ParseConnectionString parses the SQLite connection string, ensuring the required parameters are set This is optimized for the modernc.org/sqlite driver
Types ¶
type ConnectOpts ¶
type ConnectOpts struct {
// SQLite database connection string
// Could be the path to a file, or a URL beginning with "file:"
ConnString string
// Optional instance of a slog logger
// If nil, uses the default slog instance
Logger *slog.Logger
}
ConnectOpts is the parameters struct for the Connect method
Click to show internal directories.
Click to hide internal directories.