entutils

package
v0.0.0-...-bb7101a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntMysqlDriver

type EntMysqlDriver struct {
	dialect.Driver // underlying driver.
	// contains filtered or unexported fields
}

func DefaultMysqlDriver

func DefaultMysqlDriver(driver dialect.Driver) *EntMysqlDriver

func NewMysqlDriver

func NewMysqlDriver(driver dialect.Driver, options ...EntMysqlOption) *EntMysqlDriver

func (*EntMysqlDriver) Exec

func (d *EntMysqlDriver) Exec(ctx context.Context, query string, args, v any) error

Exec logs its params and calls the underlying driver Exec method.

func (*EntMysqlDriver) ExecContext

func (d *EntMysqlDriver) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)

ExecContext logs its params and calls the underlying driver ExecContext method if it is supported.

func (*EntMysqlDriver) Query

func (d *EntMysqlDriver) Query(ctx context.Context, query string, args, v any) error

Query logs its params and calls the underlying driver Query method.

func (*EntMysqlDriver) QueryContext

func (d *EntMysqlDriver) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)

QueryContext logs its params and calls the underlying driver QueryContext method if it is supported.

type EntMysqlOption

type EntMysqlOption interface {
	// contains filtered or unexported methods
}

func WithLog

func WithLog(log func(context.Context, ...any)) EntMysqlOption

func WithTrace

func WithTrace(isTrace bool) EntMysqlOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL