Documentation
¶
Overview ¶
Package sqlite is the SQLite driver for Anetos's db package. It uses modernc.org/sqlite, a pure-Go SQLite, so builds need no C compiler and cross-compile to a single binary.
database, err := db.Connect(ctx, app, sqlite.Driver())
DB_DATABASE is the database file (default database/app.db; its directory is created if missing), or :memory: for a private in-memory database. Connections use WAL journaling, a 5 second busy timeout, foreign keys, and transactions that take the write lock when they begin, so concurrent writers wait instead of failing. The driver adds the SQL function vector search compares embeddings with (db.SQLiteCosineFunction). DB_URL replaces all of this with a modernc.org/sqlite DSN of your own.
Index ¶
Constants ¶
const DefaultPath = "database/app.db"
DefaultPath is the database file used when DB_DATABASE is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.