benchmarks

package module
v0.0.0-...-dadb419 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLAdapter

type SQLAdapter struct {
	*sql.DB
}

SQLAdapter adapts the sql.DB type to be compatible with the `DBAdapter` interface

func NewSQLAdapter

func NewSQLAdapter(db *sql.DB) SQLAdapter

NewSQLAdapter returns a new instance of SQLAdapter with the provided database instance.

func (SQLAdapter) BeginTx

func (s SQLAdapter) BeginTx(ctx context.Context) (ksql.Tx, error)

BeginTx implements the Tx interface

func (SQLAdapter) ExecContext

func (s SQLAdapter) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)

ExecContext implements the DBAdapter interface

func (SQLAdapter) QueryContext

func (s SQLAdapter) QueryContext(ctx context.Context, query string, args ...interface{}) (ksql.Rows, error)

QueryContext implements the DBAdapter interface

type SQLTx

type SQLTx struct {
	*sql.Tx
}

SQLTx is used to implement the DBAdapter interface and implements the Tx interface

func (SQLTx) Commit

func (s SQLTx) Commit(ctx context.Context) error

Commit implements the Tx interface

func (SQLTx) ExecContext

func (s SQLTx) ExecContext(ctx context.Context, query string, args ...interface{}) (ksql.Result, error)

ExecContext implements the Tx interface

func (SQLTx) QueryContext

func (s SQLTx) QueryContext(ctx context.Context, query string, args ...interface{}) (ksql.Rows, error)

QueryContext implements the Tx interface

func (SQLTx) Rollback

func (s SQLTx) Rollback(ctx context.Context) error

Rollback implements the Tx interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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