Documentation ¶
Index ¶
- func Commit(ctx context.Context, tx *sqlx.Tx, err error) error
- func IsDuplicateKey(err error) bool
- func Rollback(ctx context.Context, tx *sqlx.Tx, err error) error
- type SQLiteHandler
- func (t *SQLiteHandler) Close()
- func (t *SQLiteHandler) DB() *sqlx.DB
- func (t *SQLiteHandler) Delete(ctx context.Context, query string, params ...interface{}) (int64, error)
- func (t *SQLiteHandler) Get(ctx context.Context, result interface{}, query string, params ...interface{}) error
- func (t *SQLiteHandler) GetById(ctx context.Context, result interface{}, query string, id interface{}) error
- func (t *SQLiteHandler) Host() string
- func (t *SQLiteHandler) Insert(ctx context.Context, query string, params ...interface{}) error
- func (t *SQLiteHandler) InsertWithId(ctx context.Context, query string, params ...interface{}) (int64, error)
- func (t *SQLiteHandler) Name() string
- func (t *SQLiteHandler) Ping() error
- func (t *SQLiteHandler) Port() string
- func (t *SQLiteHandler) Select(ctx context.Context, results interface{}, query string, params ...interface{}) error
- func (t *SQLiteHandler) Update(ctx context.Context, query string, params ...interface{}) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDuplicateKey ¶
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) 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 (*SQLiteHandler) Name ¶
func (t *SQLiteHandler) Name() string
func (*SQLiteHandler) Ping ¶
func (t *SQLiteHandler) Ping() error
func (*SQLiteHandler) Port ¶
func (t *SQLiteHandler) Port() string
Click to show internal directories.
Click to hide internal directories.