connpool

package
v1.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PatternSrcOnly  = "SRC_ONLY"
	PatternSrcFirst = "SRC_FIRST"
	PatternDstFirst = "DST_FIRST"
	PatternDstOnly  = "DST_ONLY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DoubleWritePool

type DoubleWritePool struct {
	// contains filtered or unexported fields
}

func NewDoubleWritePool

func NewDoubleWritePool(src gorm.ConnPool, dst gorm.ConnPool, pattern string) *DoubleWritePool

func (*DoubleWritePool) BeginTx

func (d *DoubleWritePool) BeginTx(ctx context.Context, opts *sql.TxOptions) (gorm.ConnPool, error)

func (*DoubleWritePool) ChangePattern

func (d *DoubleWritePool) ChangePattern(pattern string)

func (*DoubleWritePool) ExecContext

func (d *DoubleWritePool) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*DoubleWritePool) PrepareContext

func (d *DoubleWritePool) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (*DoubleWritePool) QueryContext

func (d *DoubleWritePool) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func (*DoubleWritePool) QueryRowContext

func (d *DoubleWritePool) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

type DoubleWriteTx

type DoubleWriteTx struct {
	// contains filtered or unexported fields
}

func (*DoubleWriteTx) Commit

func (d *DoubleWriteTx) Commit() error

func (*DoubleWriteTx) ExecContext

func (d *DoubleWriteTx) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*DoubleWriteTx) PrepareContext

func (d *DoubleWriteTx) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (*DoubleWriteTx) QueryContext

func (d *DoubleWriteTx) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func (*DoubleWriteTx) QueryRowContext

func (d *DoubleWriteTx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

func (*DoubleWriteTx) Rollback

func (d *DoubleWriteTx) Rollback() error

Jump to

Keyboard shortcuts

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