sqlite

package
v0.0.0-...-d283dcf Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default *gorm.DB
)

Functions

func Init

func Init() (err error)

Init initializes the default SQLite connection. It checks if SQLite is enabled and selected as the default database. If the connection is successful, it initializes the database and returns nil.

func New

func New(cfg config.Sqlite) (*gorm.DB, error)

New creates and returns a new SQLite database connection with the given configuration. The returned handle already carries the GORM OpenTelemetry tracing plugin, so application-held instances passed to DatabaseOn, AggregateOn, and TransactionOn are traced like the default database. Connections open through this package's own driver, which carries the framework's REGEXP implementation; see registerRegexpFunc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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