(query string, args ...any)
| 164 | } |
| 165 | |
| 166 | func (this *DB) Exec(query string, args ...any) (sql.Result, error) { |
| 167 | // check database status |
| 168 | if this.BeginUpdating() { |
| 169 | defer this.EndUpdating() |
| 170 | } else { |
| 171 | return nil, errDBIsClosed |
| 172 | } |
| 173 | |
| 174 | if this.enableStat { |
| 175 | defer SharedQueryStatManager.AddQuery(query).End() |
| 176 | } |
| 177 | return this.rawDB.Exec(query, args...) |
| 178 | } |
| 179 | |
| 180 | func (this *DB) Query(query string, args ...any) (*sql.Rows, error) { |
| 181 | if this.enableStat { |
no test coverage detected