sqliteutil

package
v0.0.0-...-6de94a8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppNameMustNotBeEmpty = errors.New("app name must not be empty")
	ErrFailedToGetConfigPath = errors.New("failed to get config path")
)

Functions

func Close

func Close(c io.Closer, f func(err error))

func EnsureNotNil

func EnsureNotNil[T any](v *T, def T) T

func NewContext

func NewContext() context.Context

func NewNullInt64

func NewNullInt64(n int64) sql.NullInt64

func NewNullString

func NewNullString(s string) sql.NullString

func NewSqliteDataStore

func NewSqliteDataStore(args Args) sqlcx.DataStore

func Ptr

func Ptr[T any](a T) *T

func WarnOnError

func WarnOnError(err error)

Types

type Args

type Args struct {
	AppName string
	DDLFunc func() string
}

type SqliteDataStore

type SqliteDataStore struct {
	AppName string
	// contains filtered or unexported fields
}

func (*SqliteDataStore) DB

func (ds *SqliteDataStore) DB() sqlcx.DBTX

func (*SqliteDataStore) Filepath

func (ds *SqliteDataStore) Filepath() string

func (*SqliteDataStore) Initialize

func (ds *SqliteDataStore) Initialize(ctx context.Context) (err error)

func (*SqliteDataStore) Open

func (ds *SqliteDataStore) Open() (err error)

func (*SqliteDataStore) Query

func (ds *SqliteDataStore) Query(ctx context.Context, sql string) (err error)

Jump to

Keyboard shortcuts

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