db

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenOrCreate

func OpenOrCreate(
	dbPath string,
	createFunc func(string) (*sql.DB, error),
	openFunc func(string) (*sql.DB, error),
) (*sql.DB, error)

OpenOrCreate creates a new database at the given path using lock-based coordination. To avoid conflicts between multiple instances of cy, a lock file is created before the database is created. If the database already exists, it opens it instead.

createFunc should create a new database with schema at the given path. openFunc should open an existing database at the given path.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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