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.
Click to show internal directories.
Click to hide internal directories.