(e Execer, query string)
| 205 | type CPlace Place |
| 206 | |
| 207 | func 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 | |
| 220 | func 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) { |