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

Function Prepare

internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go:24–31  ·  view source on GitHub ↗
(ctx context.Context, db DBTX)

Source from the content-addressed store, hash-verified

22}
23
24func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
25 q := Queries{db: db}
26 var err error
27 if q.funcParamIdentStmt, err = db.PrepareContext(ctx, funcParamIdent); err != nil {
28 return nil, fmt.Errorf("error preparing query FuncParamIdent: %w", err)
29 }
30 return &q, nil
31}
32
33func (q *Queries) Close() error {
34 var err error

Callers

nothing calls this directly

Calls 1

PrepareContextMethod · 0.65

Tested by

no test coverage detected