diff options
author | Julien Dessaux | 2025-01-22 00:46:49 +0100 |
---|---|---|
committer | Julien Dessaux | 2025-01-22 00:46:49 +0100 |
commit | 09885ef1e4b7610d05377596f02d08c5079c0434 (patch) | |
tree | 9c8322ea718f1eb721a4c685cb95386fa84bb797 /pkg/database/db.go | |
parent | chore(webui): refactor login and session middleware handling (diff) | |
download | tfstated-09885ef1e4b7610d05377596f02d08c5079c0434.tar.gz tfstated-09885ef1e4b7610d05377596f02d08c5079c0434.tar.bz2 tfstated-09885ef1e4b7610d05377596f02d08c5079c0434.zip |
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...) } |