Documentation
¶
Overview ¶
Package database provides SQLite database helpers with WAL mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBuildConnectionURL = errors.New("failed to build SQLite connection URL") ErrOpenDatabase = errors.New("failed to open database") ErrPingDatabase = errors.New("failed to ping database") ErrApplySchema = errors.New("failed to apply schema") ErrSchemaValidation = errors.New("schema validation failed") )
Database errors.
Functions ¶
func BaseSchema ¶
func BaseSchema() string
BaseSchema returns a minimal base schema for juango applications. Applications should extend this with their own tables.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database wraps the sqlx database connection.
func NewWithConfig ¶
func NewWithConfig(cfg *sqliteconfig.Config, schema string) (*Database, error)
NewWithConfig creates a new Database with custom configuration.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sqliteconfig provides type-safe configuration for SQLite databases with proper enum validation and URL generation for modernc.org/sqlite driver.
|
Package sqliteconfig provides type-safe configuration for SQLite databases with proper enum validation and URL generation for modernc.org/sqlite driver. |
Click to show internal directories.
Click to hide internal directories.