sqlite

package
v1.2.18-prerelease02 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 16 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PluginName = "sqlite"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*mysql.DB
}

DB contains methods for managing objects in a sqlite database It inherits methods from the mysql.DB to reuse the implementation of the methods sqlplugin.ErrorChecker is customized for sqlite

func NewDB

func NewDB(xdbs []*sqlx.DB, tx *sqlx.Tx, dbShardID int, numDBShards int) (*DB, error)

NewDB returns an instance of DB, which contains a new created mysql.DB with sqlite specific methods

func (*DB) BeginTX

func (mdb *DB) BeginTX(ctx context.Context, dbShardID int) (sqlplugin.Tx, error)

BeginTX starts a new transaction and returns a new Tx

func (*DB) CreateDatabase added in v1.2.18

func (mdb *DB) CreateDatabase(name string) error

CreateDatabase is not supported by sqlite each sqlite file is a database

func (*DB) DropDatabase added in v1.2.18

func (mdb *DB) DropDatabase(name string) error

DropDatabase is not supported by sqlite each sqlite file is a database

func (*DB) IsDupEntryError

func (mdb *DB) IsDupEntryError(err error) bool

IsDupEntryError verify if the error is a duplicate entry error

func (*DB) IsNotFoundError

func (mdb *DB) IsNotFoundError(err error) bool

IsNotFoundError verify if the error is a not found error

func (*DB) IsThrottlingError

func (mdb *DB) IsThrottlingError(err error) bool

IsThrottlingError verify if the error is a throttling error

func (*DB) IsTimeoutError

func (mdb *DB) IsTimeoutError(err error) bool

IsTimeoutError verify if the error is a timeout error

func (*DB) PluginName

func (mdb *DB) PluginName() string

PluginName returns the name of the plugin

Jump to

Keyboard shortcuts

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