sqlite

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(ctx context.Context, tx *sqlx.Tx, err error) error

func IsDuplicateKey

func IsDuplicateKey(err error) bool

func Rollback

func Rollback(ctx context.Context, tx *sqlx.Tx, err error) error

Types

type SQLiteHandler

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

func NewSQLiteDBHandler

func NewSQLiteDBHandler(filepath string) (*SQLiteHandler, error)

Postgres Connection Object. Wraps a sqlx.DB and provides a DBConnection() method to access the DB Connection

func (*SQLiteHandler) Close

func (t *SQLiteHandler) Close()

func (*SQLiteHandler) DB

func (t *SQLiteHandler) DB() *sqlx.DB

func (*SQLiteHandler) Delete

func (t *SQLiteHandler) Delete(ctx context.Context, query string, params ...interface{}) (int64, error)

func (*SQLiteHandler) Get

func (t *SQLiteHandler) Get(ctx context.Context, result interface{}, query string, params ...interface{}) error

func (*SQLiteHandler) GetById

func (t *SQLiteHandler) GetById(ctx context.Context, result interface{}, query string, id interface{}) error

func (*SQLiteHandler) Host

func (t *SQLiteHandler) Host() string

func (*SQLiteHandler) Insert

func (t *SQLiteHandler) Insert(ctx context.Context, query string, params ...interface{}) error

func (*SQLiteHandler) InsertWithId

func (t *SQLiteHandler) InsertWithId(ctx context.Context, query string, params ...interface{}) (int64, error)

func (*SQLiteHandler) Name

func (t *SQLiteHandler) Name() string

func (*SQLiteHandler) Ping

func (t *SQLiteHandler) Ping() error

func (*SQLiteHandler) Port

func (t *SQLiteHandler) Port() string

func (*SQLiteHandler) Select

func (t *SQLiteHandler) Select(ctx context.Context, results interface{}, query string, params ...interface{}) error

func (*SQLiteHandler) Update

func (t *SQLiteHandler) Update(ctx context.Context, query string, params ...interface{}) (int64, error)

Jump to

Keyboard shortcuts

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