sqlitedb

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqliteDB

type SqliteDB struct {
	*sql.DB
	// contains filtered or unexported fields
}

PostgresDB is a sql.DB with reconnect functionality.

func New

func New(dbFile string) *SqliteDB

New creates a new PostgresDB instance.

func (*SqliteDB) Connect

func (db *SqliteDB) Connect() error

func (*SqliteDB) Name added in v0.0.5

func (db *SqliteDB) Name() string

func (*SqliteDB) RetryableError added in v0.0.5

func (db *SqliteDB) RetryableError(err error) bool

RetryableError determines if a transaction should be retried after failing due to the specified error. When true, sleeps for a short random time before returning.

func (*SqliteDB) SqlDB

func (db *SqliteDB) SqlDB() *sql.DB

Jump to

Keyboard shortcuts

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