MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / TestPrepared

Function TestPrepared

examples/ondeck/mysql/db_test.go:143–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

141}
142
143func TestPrepared(t *testing.T) {
144 t.Parallel()
145
146 uri := local.MySQL(t, []string{"schema"})
147 db, err := sql.Open("mysql", uri)
148 if err != nil {
149 t.Fatalf("%s: %s", uri, err)
150 }
151 defer db.Close()
152
153 q, err := Prepare(context.Background(), db)
154 if err != nil {
155 t.Fatal(err)
156 }
157
158 runOnDeckQueries(t, q)
159}
160
161func TestQueries(t *testing.T) {
162 t.Parallel()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected