signoz/pkg/sqlstore/sqlstore.go
Vibhu Pandey 2a939e813d
feat(sqlstorehook): add sqlstore logging hook (#7137)
### Summary

add sqlstore logging hook
2025-02-17 21:13:40 +05:30

23 lines
460 B
Go

package sqlstore
import (
"database/sql"
"github.com/jmoiron/sqlx"
"github.com/uptrace/bun"
)
// SQLStore is the interface for the SQLStore.
type SQLStore interface {
// SQLDB returns the underlying sql.DB.
SQLDB() *sql.DB
// BunDB returns an instance of bun.DB. This is the recommended way to interact with the database.
BunDB() *bun.DB
// SQLxDB returns an instance of sqlx.DB.
SQLxDB() *sqlx.DB
}
type SQLStoreHook interface {
bun.QueryHook
}