diff options
Diffstat (limited to 'pkg/database/db.go')
-rw-r--r-- | pkg/database/db.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/database/db.go b/pkg/database/db.go index 9aeec43..eac31eb 100644 --- a/pkg/database/db.go +++ b/pkg/database/db.go @@ -111,6 +111,10 @@ func (db *DB) Exec(query string, args ...any) (sql.Result, error) { return db.writeDB.ExecContext(db.ctx, query, args...) } +func (db *DB) Query(query string, args ...any) (*sql.Rows, error) { + return db.readDB.QueryContext(db.ctx, query, args...) +} + func (db *DB) QueryRow(query string, args ...any) *sql.Row { return db.readDB.QueryRowContext(db.ctx, query, args...) } |