database

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecreatePoolsWithConfig added in v0.3.0

func RecreatePoolsWithConfig(ctx context.Context, paths DatabasePaths, cfg *config.Config, oldRwPool, oldRoPool *dbconnpool.DbSQLConnPool) (*dbconnpool.DbSQLConnPool, *dbconnpool.DbSQLConnPool, error)

RecreatePoolsWithConfig closes old pools and creates new ones with the given config. This is used when configuration is loaded after initial pool creation to honor database-stored pool settings during startup.

Types

type DatabasePaths added in v0.3.0

type DatabasePaths struct {
	Main   string // Path to sfpg.db
	Thumbs string // Path to thumbs.db
}

DatabasePaths holds the file paths for both application databases.

func Setup

Setup initializes the database environment: 1. Sets up the directory struct 2. Runs schema migrations 3. Establishes connection pools (RW/RO) 4. Ensures root folder entry exists 5. Schedules periodic optimization

Jump to

Keyboard shortcuts

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