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

Function TestPrepared

examples/ondeck/postgresql/db_test.go:125–141  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

123}
124
125func TestPrepared(t *testing.T) {
126 t.Parallel()
127
128 uri := local.PostgreSQL(t, []string{"schema"})
129 db, err := sql.Open("postgres", uri)
130 if err != nil {
131 t.Fatalf("%s: %s", uri, err)
132 }
133 defer db.Close()
134
135 q, err := Prepare(context.Background(), db)
136 if err != nil {
137 t.Fatal(err)
138 }
139
140 runOnDeckQueries(t, q)
141}
142
143func TestQueries(t *testing.T) {
144 t.Parallel()

Callers

nothing calls this directly

Calls 5

PostgreSQLFunction · 0.92
OpenMethod · 0.80
PrepareFunction · 0.70
runOnDeckQueriesFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected