database

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageIndexContext = tingyun3.StorageIndexDatabase + 0
	StorageIndexLock    = tingyun3.StorageIndexDatabase + 1
)

Variables

This section is empty.

Functions

func ConnExecContext

func ConnExecContext(c *sql.Conn, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func ConnPrepareContext

func ConnPrepareContext(c *sql.Conn, ctx context.Context, query string) (*sql.Stmt, error)

func ConnQueryContext

func ConnQueryContext(c *sql.Conn, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func DBClose

func DBClose(db *sql.DB) error

func DBExecContext

func DBExecContext(db *sql.DB, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func DBOpen

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

func DBPrepareContext

func DBPrepareContext(db *sql.DB, ctx context.Context, query string) (*sql.Stmt, error)

func DBQueryContext

func DBQueryContext(db *sql.DB, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func DBexecDC added in v0.8.3

func DBexecDC(db *sql.DB, ctx context.Context, dc *driverConn, release func(error), query string, args []interface{}) (res sql.Result, err error)

func DBprepareDC added in v0.8.3

func DBprepareDC(db *sql.DB, ctx context.Context, dc *driverConn, release func(error), cg stmtConnGrabber, query string) (*sql.Stmt, error)

func DBqueryDC added in v0.8.3

func DBqueryDC(db *sql.DB, ctx, txctx context.Context, dc *driverConn, releaseConn func(error), query string, args []interface{}) (*sql.Rows, error)

func RowsClose

func RowsClose(rs *sql.Rows) error

func StmtClose

func StmtClose(s *sql.Stmt) error

func StmtExecContext

func StmtExecContext(s *sql.Stmt, ctx context.Context, args ...interface{}) (sql.Result, error)

func StmtQueryContext

func StmtQueryContext(s *sql.Stmt, ctx context.Context, args ...interface{}) (*sql.Rows, error)

func StrSplit added in v0.8.2

func StrSplit(source string, issep func(byte) bool, handler func(string) bool)

func TxExecContext

func TxExecContext(tx *sql.Tx, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func TxPrepareContext

func TxPrepareContext(tx *sql.Tx, ctx context.Context, query string) (*sql.Stmt, error)

func TxQueryContext

func TxQueryContext(tx *sql.Tx, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func WrapConnExecContext

func WrapConnExecContext(c *sql.Conn, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func WrapConnPrepareContext

func WrapConnPrepareContext(c *sql.Conn, ctx context.Context, query string) (*sql.Stmt, error)

func WrapConnQueryContext

func WrapConnQueryContext(c *sql.Conn, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func WrapDBClose

func WrapDBClose(db *sql.DB) error

func WrapDBExecContext

func WrapDBExecContext(db *sql.DB, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func WrapDBOpen

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

func WrapDBPrepareContext

func WrapDBPrepareContext(db *sql.DB, ctx context.Context, query string) (*sql.Stmt, error)

func WrapDBQueryContext

func WrapDBQueryContext(db *sql.DB, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func WrapDBexecDC added in v0.8.3

func WrapDBexecDC(db *sql.DB, ctx context.Context, dc *driverConn, release func(error), query string, args []interface{}) (res sql.Result, err error)

func WrapDBprepareDC added in v0.8.3

func WrapDBprepareDC(db *sql.DB, ctx context.Context, dc *driverConn, release func(error), cg stmtConnGrabber, query string) (*sql.Stmt, error)

func WrapDBqueryDC added in v0.8.3

func WrapDBqueryDC(db *sql.DB, ctx, txctx context.Context, dc *driverConn, releaseConn func(error), query string, args []interface{}) (*sql.Rows, error)

func WrapRowsClose

func WrapRowsClose(rs *sql.Rows) error

func WrapStmtClose

func WrapStmtClose(s *sql.Stmt) error

func WrapStmtExecContext

func WrapStmtExecContext(s *sql.Stmt, ctx context.Context, args ...interface{}) (sql.Result, error)

func WrapStmtQueryContext

func WrapStmtQueryContext(s *sql.Stmt, ctx context.Context, args ...interface{}) (*sql.Rows, error)

func WrapTxExecContext

func WrapTxExecContext(tx *sql.Tx, ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func WrapTxPrepareContext

func WrapTxPrepareContext(tx *sql.Tx, ctx context.Context, query string) (*sql.Stmt, error)

func WrapTxQueryContext

func WrapTxQueryContext(tx *sql.Tx, ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

Types

type StructSQLDB110 added in v1.0.1

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

type StructSQLDB111 added in v1.0.1

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

Jump to

Keyboard shortcuts

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