sqlite_cgo

package module
v0.0.0-...-cad733b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package sqlite_cgo provides SQLite database connection and migration utilities using the mattn/go-sqlite3 driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URI             string
	Timeout         time.Duration
	MaxIdleConns    int
	MaxIdleTime     time.Duration
	MaxConnLifetime time.Duration
	AutoMigrate     bool
	MigrationsFS    fs.FS
	MigrationsPath  string
}

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(cfg Config) (*Connection, error)

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Ping

func (c *Connection) Ping(ctx context.Context) error

func (*Connection) ReadDB

func (c *Connection) ReadDB() *sqlx.DB

func (*Connection) WriteDB

func (c *Connection) WriteDB() *sqlx.DB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL