Documentation
¶
Overview ¶
Package postgres is the PostgreSQL dialect of dbcleaner. Importing it registers the dialect for postgres:// and postgresql:// URLs, and the pgx driver it opens them with:
import _ "github.com/mokevnin/dbcleaner/postgres"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dialect ¶
Dialect is the PostgreSQL dialect, for dbcleaner.WithDialect when the URL is a key=value DSN. It is also a dbcleaner.Leaser.
func ScratchDatabase ¶
ScratchDatabase creates an empty, uniquely named database on the server behind adminURL and returns its URL; the database is dropped when the test ends. It is for code that needs a database with no schema at all (migrations on a fresh instance), which a pre-migrated one cannot give. The role in adminURL must be able to create databases.
Types ¶
This section is empty.