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

Function MultiExec

sqlx_test.go:207–218  ·  view source on GitHub ↗
(e Execer, query string)

Source from the content-addressed store, hash-verified

205type CPlace Place
206
207func MultiExec(e Execer, query string) {
208 stmts := strings.Split(query, ";\n")
209 if len(strings.Trim(stmts[len(stmts)-1], " \n\t\r")) == 0 {
210 stmts = stmts[:len(stmts)-1]
211 }
212 for _, s := range stmts {
213 _, err := e.Exec(s)
214 if err != nil {
215 fmt.Println(err, s)
216 }
217 }
218}
219
220func RunWithSchema(schema Schema, t *testing.T, test func(db *DB, t *testing.T, now string)) {
221 runner := func(db *DB, t *testing.T, create, drop, now string) {

Callers 1

RunWithSchemaFunction · 0.85

Calls 1

ExecMethod · 0.65

Tested by

no test coverage detected