SqlExecutor exposes gorp operations that can be run from Pre/Post hooks. This hides whether the current operation that triggered the hook is in a transaction. See the DbMap function docs for each of the functions below for more information.
| 90 | // See the DbMap function docs for each of the functions below for more |
| 91 | // information. |
| 92 | type SqlExecutor interface { |
| 93 | WithContext(ctx context.Context) SqlExecutor |
| 94 | Get(i interface{}, keys ...interface{}) (interface{}, error) |
| 95 | Insert(list ...interface{}) error |
| 96 | Update(list ...interface{}) (int64, error) |
| 97 | Delete(list ...interface{}) (int64, error) |
| 98 | Exec(query string, args ...interface{}) (sql.Result, error) |
| 99 | Select(i interface{}, query string, args ...interface{}) ([]interface{}, error) |
| 100 | SelectInt(query string, args ...interface{}) (int64, error) |
| 101 | SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error) |
| 102 | SelectFloat(query string, args ...interface{}) (float64, error) |
| 103 | SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error) |
| 104 | SelectStr(query string, args ...interface{}) (string, error) |
| 105 | SelectNullStr(query string, args ...interface{}) (sql.NullString, error) |
| 106 | SelectOne(holder interface{}, query string, args ...interface{}) error |
| 107 | Query(query string, args ...interface{}) (*sql.Rows, error) |
| 108 | QueryRow(query string, args ...interface{}) *sql.Row |
| 109 | } |
| 110 | |
| 111 | // DynamicTable allows the users of gorp to dynamically |
| 112 | // use different database table names during runtime |
no outgoing calls
no test coverage detected
searching dependent graphs…