connectors

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PgxConnType  = "pgx"
	SqlxConnType = "sqlx"
)
View Source
const (
	DefaultDBConn = "master"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallContextConnector added in v1.0.23

type CallContextConnector[T ConnectDB] interface {
	CallContext(
		ctx context.Context,
		queryName string,
		callFunc func(ctx context.Context, db T) error,
	) error
}

type CallTransactionConnector added in v1.0.23

type CallTransactionConnector[M ConnectTx] interface {
	CallTransaction(
		ctx context.Context,
		txName string,
		callFunc func(ctx context.Context, tx M) error,
	) error
}

type ConnectDB added in v1.0.7

type ConnectDB interface {
	*sqlx.DB | *goqu.Database | types.PgxConn | *gocb.Collection | *elasticsearch.Client | *api.KV
}

type ConnectTx added in v1.0.7

type ConnectTx interface {
	*sqlx.Tx | *goqu.TxDatabase | types.PgxTx | *txtype.CollectionTx | *api.Txn
}

type DBConnector added in v1.0.7

type DBConnector[T ConnectDB, M ConnectTx] interface {
	CallContextConnector[T]
	CallTransactionConnector[M]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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