Documentation
¶
Overview ¶
Package database provides database initialization, migration, and management utilities for the 4y-ui panel using GORM with SQLite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkpoint ¶
func Checkpoint() error
Checkpoint performs a WAL checkpoint on the SQLite database to ensure data consistency.
func IsNotFound ¶
IsNotFound checks if the given error is a GORM record not found error.
func IsSQLiteDB ¶
IsSQLiteDB checks if the given file is a valid SQLite database by reading its signature.
func ValidateSQLiteDB ¶
ValidateSQLiteDB opens the provided sqlite DB path with a throw-away connection and runs a PRAGMA integrity_check to ensure the file is structurally sound. It does not mutate global state or run migrations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.