MCPcopy
hub / github.com/jmoiron/sqlx / MultiExecContext

Function MultiExecContext

sqlx_context_test.go:32–43  ·  view source on GitHub ↗
(ctx context.Context, e ExecerContext, query string)

Source from the content-addressed store, hash-verified

30)
31
32func MultiExecContext(ctx context.Context, e ExecerContext, query string) {
33 stmts := strings.Split(query, ";\n")
34 if len(strings.Trim(stmts[len(stmts)-1], " \n\t\r")) == 0 {
35 stmts = stmts[:len(stmts)-1]
36 }
37 for _, s := range stmts {
38 _, err := e.ExecContext(ctx, s)
39 if err != nil {
40 fmt.Println(err, s)
41 }
42 }
43}
44
45func RunWithSchemaContext(ctx context.Context, schema Schema, t *testing.T, test func(ctx context.Context, db *DB, t *testing.T)) {
46 runner := func(ctx context.Context, db *DB, t *testing.T, create, drop, now string) {

Callers 1

RunWithSchemaContextFunction · 0.85

Calls 1

ExecContextMethod · 0.65

Tested by

no test coverage detected