diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:32:16 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:32:16 +0100 |
| commit | f082ae9a138edd1ee1bcdfc40276013064fbec7e (patch) | |
| tree | c18e5e63f283912f0989e9e82701ca28ff52c332 /pgruntime/connector.go | |
| parent | 833e477420513a46faa4ebcc1164c50a8288a9ab (diff) | |
| download | go-gg-f082ae9a138edd1ee1bcdfc40276013064fbec7e.tar.gz | |
replace execQuery() with new gsql.Exec() helper
Diffstat (limited to 'pgruntime/connector.go')
| -rw-r--r-- | pgruntime/connector.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pgruntime/connector.go b/pgruntime/connector.go index 3a41548..0d79bf1 100644 --- a/pgruntime/connector.go +++ b/pgruntime/connector.go @@ -143,7 +143,7 @@ func createDatabaseIfMissing(ctx context.Context, db gsql.Handle, dbName string) // create database if necessary if !exists { - _, err = execQuery(ctx, db, "CREATE DATABASE "+quoteIdentifier(dbName), nil) + _, err = gsql.Exec(ctx, db, "CREATE DATABASE "+quoteIdentifier(dbName)) if err != nil { return fmt.Errorf("during CREATE DATABASE: %w", err) } @@ -167,7 +167,7 @@ func resetTestDatabase(ctx context.Context, db gsql.Handle, params testSetupPara // truncate all tables at once if len(quotedTableNames) > 0 { query = fmt.Sprintf(`TRUNCATE %s RESTART IDENTITY CASCADE`, strings.Join(quotedTableNames, ", ")) - _, err = execQuery(ctx, db, query, nil) + _, err = gsql.Exec(ctx, db, query) if err != nil { return fmt.Errorf("during %s: %w", query, err) } |
