bc

package
v0.0.0-...-5a2f35a Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreparexBuilder

type PreparexBuilder interface {
	PreparexContext
	QueryHook(query string) string
}

PreparexBuilder preparex builder interface for sqlx

type PreparexContext

type PreparexContext interface {
	// PrepareContext prepares a statement.
	// The provided context is used for the preparation of the statement, not for
	// the execution of the statement.
	PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)

	// PrepareNamedContext returns an sqlx.NamedStmt
	PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)

	// Rebind rebind query to adapte SQL Driver
	Rebind(query string) string
}

PreparexContext enhances the Conn interface with context.

type Yesql

type Yesql struct {
	LoginInfoD  string          `yesql:"login_info_d"`
	LogoutInfoC string          `yesql:"logout_info_c"`
	UserInfoC   string          `yesql:"user_info_c"`
	UserInfoD   string          `yesql:"user_info_d"`
	LoginInfoB  *sqlx.Stmt      `yesql:"login_info_b"`
	UserInfoA   *sqlx.Stmt      `yesql:"user_info_a"`
	UserInfoB   *sqlx.Stmt      `yesql:"user_info_b"`
	LoginInfoA  *sqlx.NamedStmt `yesql:"login_info_a"`
	LoginInfoE  *sqlx.NamedStmt `yesql:"login_info_e"`
}

func BuildYesql

func BuildYesql(p PreparexBuilder, ctx ...context.Context) (obj *Yesql, err error)

Jump to

Keyboard shortcuts

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