Documentation
¶
Index ¶
Constants ¶
View Source
const ( BunInfoFieldName = "bun_info" OperationFieldName = "operation" OperationQueryName = "query" OperationTimeFieldName = "operation_time_ms" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryHook ¶
func NewQueryHook ¶
func NewQueryHook(options QueryHookOptions) QueryHook
NewQueryHook returns a new bun.QueryHook that outputs database transactions using an instance of zerolog.Logger
func (QueryHook) AfterQuery ¶
func (qh QueryHook) AfterQuery(_ context.Context, event *bun.QueryEvent)
AfterQuery logs an entry after a database transaction
func (QueryHook) BeforeQuery ¶
BeforeQuery called before a database transaction but currently does nothing
Click to show internal directories.
Click to hide internal directories.