database

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package database provides SQLite database setup for the ent ORM client. Uses modernc.org/sqlite (CGo-free) with WAL mode and FK constraints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dbPath string) (*ent.Client, *sql.DB, error)

Open creates an ent client connected to the SQLite database at dbPath. The database is configured with WAL journal mode, foreign key enforcement, and a 5-second busy timeout. It returns both the ent client and the underlying *sql.DB for raw SQL operations (e.g., sync_status table).

Types

This section is empty.

Jump to

Keyboard shortcuts

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