MCPcopy
hub / github.com/sqlc-dev/sqlc / PostgreSQL

Function PostgreSQL

internal/sqltest/postgres.go:31–37  ·  view source on GitHub ↗
(t *testing.T, migrations []string)

Source from the content-addressed store, hash-verified

29}
30
31func PostgreSQL(t *testing.T, migrations []string) (*sql.DB, func()) {
32 t.Helper()
33
34 // For each test, pick a new schema name at random.
35 schema := "sqltest_postgresql_" + id()
36 return CreatePostgreSQLDatabase(t, schema, true, migrations)
37}
38
39func CreatePostgreSQLDatabase(t *testing.T, name string, schema bool, migrations []string) (*sql.DB, func()) {
40 t.Helper()

Callers

nothing calls this directly

Calls 2

CreatePostgreSQLDatabaseFunction · 0.85
idFunction · 0.70

Tested by

no test coverage detected