whatapsql

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(driverName, dataSourceName string) (*sql.DB, error)

func OpenContext

func OpenContext(ctx context.Context, driverName, dataSourceName string) (*sql.DB, error)

func OpenDB

func OpenDB(ctx context.Context, dataSourceName string, connector driver.Connector) (*sql.DB, error)

func OpenWithRegister

func OpenWithRegister(ctx context.Context, driverName, dataSourceName string) (*sql.DB, error)

Types

type WhatapDriver

type WhatapDriver struct {
	driver.Driver
	// contains filtered or unexported fields
}

func (WhatapDriver) Open

func (d WhatapDriver) Open(name string) (driver.Conn, error)

func (WhatapDriver) OpenConnector

func (d WhatapDriver) OpenConnector(name string) (c driver.Connector, err error)

func (WhatapDriver) OpenConnectorContext

func (d WhatapDriver) OpenConnectorContext(name string, ctx context.Context) (c driver.Connector, err error)

type WrapConn

type WrapConn struct {
	driver.Conn
	// contains filtered or unexported fields
}

func (WrapConn) Begin

func (c WrapConn) Begin() (tx driver.Tx, err error)

func (WrapConn) BeginTx

func (c WrapConn) BeginTx(ctx context.Context, opts driver.TxOptions) (tx driver.Tx, err error)

func (WrapConn) Close

func (c WrapConn) Close() error

func (WrapConn) Exec

func (c WrapConn) Exec(query string, args []driver.Value) (res driver.Result, err error)

func (WrapConn) ExecContext

func (c WrapConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (res driver.Result, err error)

func (WrapConn) Prepare

func (c WrapConn) Prepare(query string) (stmt driver.Stmt, err error)

func (WrapConn) PrepareContext

func (c WrapConn) PrepareContext(ctx context.Context, query string) (stmt driver.Stmt, err error)

func (WrapConn) Query

func (c WrapConn) Query(query string, args []driver.Value) (rows driver.Rows, err error)

func (WrapConn) QueryContext

func (c WrapConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (rows driver.Rows, err error)

func (WrapConn) ResetSession added in v0.2.0

func (c WrapConn) ResetSession(ctx context.Context) error

type WrapConnector

type WrapConnector struct {
	driver.Connector
	// contains filtered or unexported fields
}

func (WrapConnector) Connect

func (ct WrapConnector) Connect(ctx context.Context) (driver.Conn, error)

type WrapStmt

type WrapStmt struct {
	driver.Stmt
	// contains filtered or unexported fields
}

func (WrapStmt) Exec

func (s WrapStmt) Exec(args []driver.Value) (res driver.Result, err error)

func (WrapStmt) ExecContext

func (s WrapStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (res driver.Result, err error)

func (WrapStmt) Query

func (s WrapStmt) Query(args []driver.Value) (rows driver.Rows, err error)

func (WrapStmt) QueryContext

func (s WrapStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (rows driver.Rows, err error)

type WrapTx

type WrapTx struct {
	driver.Tx
	// contains filtered or unexported fields
}

func (WrapTx) Commit

func (t WrapTx) Commit() (err error)

func (WrapTx) Rollback

func (t WrapTx) Rollback() (err error)

Jump to

Keyboard shortcuts

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