(query string, args ...interface{})
| 76 | } |
| 77 | |
| 78 | func (imtd *InMemoryTestDatabase) Exec(query string, args ...interface{}) (sql.Result, error) { |
| 79 | |
| 80 | if imtd.queries == nil { |
| 81 | imtd.queries = make([]string, 0) |
| 82 | } |
| 83 | |
| 84 | imtd.queries = append(imtd.queries, query) |
| 85 | res, err := imtd.db.Exec(query, args...) |
| 86 | return &InMemoryTestDatabase{ |
| 87 | result: res, |
| 88 | }, err |
| 89 | } |
| 90 | func (imtd *InMemoryTestDatabase) LastInsertId() (int64, error) { |
| 91 | return imtd.result.LastInsertId() |
| 92 | } |