Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlite

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 6 Imported by: 0

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

func Dialect() dbcleaner.Dialect

Dialect is the SQLite dialect, for dbcleaner.WithDialect when the URL is a plain path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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