(ctx context.Context, e ExecerContext, query string)
| 30 | ) |
| 31 | |
| 32 | func 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 | |
| 45 | func 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) { |
no test coverage detected