sqlite

package
v0.9.69 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConnectionOptions

func AddConnectionOptions(dbPath string, connOpts []ConnectionOption) string

Types

type ConnectionOption

type ConnectionOption struct {
	Key   string
	Value string
}

type Option

type Option func(w *Sqlite)

func WithCacheMode

func WithCacheMode(mode string) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithMode

func WithMode(mode string) Option

func WithQueryLogging

func WithQueryLogging(do bool) Option

type Sqlite

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

func Open

func Open(dbPath string, opts ...Option) (*Sqlite, error)

func (*Sqlite) IsDuplicateKeyError

func (w *Sqlite) IsDuplicateKeyError(err error) bool

func (*Sqlite) IsNotFoundError

func (w *Sqlite) IsNotFoundError(err error) bool

func (*Sqlite) Master

func (w *Sqlite) Master() *gorm.DB

func (*Sqlite) Shutdown

func (w *Sqlite) Shutdown(ctx context.Context) error

func (*Sqlite) Slave

func (w *Sqlite) Slave() *gorm.DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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