Query executes a query that returns rows. This is a convenience method that handles locking.
(query string, args ...interface{})
| 398 | // Query executes a query that returns rows. |
| 399 | // This is a convenience method that handles locking. |
| 400 | func (t *TempDB) Query(query string, args ...interface{}) (*sql.Rows, error) { |
| 401 | t.mu.Lock() |
| 402 | defer t.mu.Unlock() |
| 403 | return t.db.Query(query, args...) |
| 404 | } |
| 405 | |
| 406 | // QueryRow executes a query that is expected to return at most one row. |
| 407 | // This is a convenience method that handles locking. |
no outgoing calls