MCPcopy Create free account
hub / github.com/compozy/agh / OpenSQLiteDatabase

Function OpenSQLiteDatabase

internal/store/sqlite.go:28–34  ·  view source on GitHub ↗

OpenSQLiteDatabase opens a SQLite database, applies shared configuration, and retries once after moving aside a corrupt file.

(
	ctx context.Context,
	path string,
	initialize func(context.Context, *sql.DB) error,
)

Source from the content-addressed store, hash-verified

26// OpenSQLiteDatabase opens a SQLite database, applies shared configuration,
27// and retries once after moving aside a corrupt file.
28func OpenSQLiteDatabase(
29 ctx context.Context,
30 path string,
31 initialize func(context.Context, *sql.DB) error,
32) (*sql.DB, error) {
33 return openSQLiteDatabaseWithPragmas(ctx, path, nil, initialize)
34}
35
36// OpenSQLiteDatabaseWithPragmas opens a SQLite database with additional driver-level pragmas.
37func OpenSQLiteDatabaseWithPragmas(

Calls 1