sqlite

package
v0.0.0-...-7578c0e Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WALEnabled = "_journal_mode=WAL"

	DefaultMaxAttempts        = 5
	DefaultMaxOpenConnections = 1
)

Variables

This section is empty.

Functions

func New

func New(dataSourceName string, assetNames []string, asset func(name string) ([]byte, error), dataSourceOptions DataSourceOptions) (*sqlx.DB, error)

New returns a new sqlite DB instance with migrated DB scheme to the latest version. assetNames and asset are used to migrate DB scheme.

func WithRetryWhenBusy

func WithRetryWhenBusy[R any](retryAbleFn func() (result R, err error), label string, l *logger.Logger) (result R, err error)

Types

type DataSourceOptions

type DataSourceOptions struct {
	WALEnabled         bool
	MaxOpenConnections int
}

Jump to

Keyboard shortcuts

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