Documentation
¶
Overview ¶
Package sqlite is the SQLite dialect of dbcleaner, on the pure-Go modernc.org/sqlite driver. Importing it registers the dialect for file: URLs:
import _ "github.com/mokevnin/dbcleaner/sqlite"
dbcleaner.New("file:" + path)
A plain path, or ":memory:", names no scheme: pass Dialect to dbcleaner.WithDialect. Give the database a file, not ":memory:": every connection to ":memory:" is a database of its own, so the setup and the sessions would not see each other.
SQLite has no TRUNCATE, so dbcleaner.Truncation deletes the rows, with the foreign keys switched off, and resets AUTOINCREMENT counters. It does not support dbcleaner.WithTemplate: a database per process is a file per process, which t.TempDir already is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dialect ¶
Dialect is the SQLite dialect, for dbcleaner.WithDialect when the URL is a plain path.
Types ¶
This section is empty.