isql

package module
Version: v0.0.0-...-a21d074 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2018 License: MIT Imports: 2 Imported by: 1

README

isql

GoDoc Go project version license

An interface of *sql.DB.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beginner

type Beginner interface {
	ClassicBeginner
	ContextBeginner
}

Beginner represents the object that can begin a transaction.

type ClassicBeginner

type ClassicBeginner interface {
	Begin() (Tx, error)
}

ClassicBeginner represents the object that can begin a transaction.

type ClassicExecer

type ClassicExecer interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
}

ClassicExecer represents the object that can execute SQL queries.

type ClassicPinger

type ClassicPinger interface {
	Ping() error
}

ClassicPinger represents the object that can verify a connection.

type ClassicPreparedExecer

type ClassicPreparedExecer interface {
	Exec(args ...interface{}) (sql.Result, error)
}

ClassicPreparedExecer represents the object that can execute prepared SQL queries.

type ClassicPreparedQueryer

type ClassicPreparedQueryer interface {
	Query(args ...interface{}) (*sql.Rows, error)
	QueryRow(args ...interface{}) *sql.Row
}

ClassicPreparedQueryer represents the object that can perform prepared SQL queries.

type ClassicPreparer

type ClassicPreparer interface {
	Prepare(query string) (Stmt, error)
}

ClassicPreparer represents the object that can create SQL prepared statements.

type ClassicQueryer

type ClassicQueryer interface {
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
}

ClassicQueryer represents the object that can perform SQL queries.

type Closer

type Closer interface {
	Close() error
}

Closer represents the object that can close a connection.

type ContextBeginner

type ContextBeginner interface {
	BeginTx(context.Context, *sql.TxOptions) (Tx, error)
}

ContextBeginner represents the object that can begin a transaction.

type ContextExecer

type ContextExecer interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
}

ContextExecer represents the object that can execute SQL queries.

type ContextPinger

type ContextPinger interface {
	PingContext(ctx context.Context) error
}

ContextPinger represents the object that can verify a connection.

type ContextPreparedExecer

type ContextPreparedExecer interface {
	ExecContext(ctx context.Context, args ...interface{}) (sql.Result, error)
}

ContextPreparedExecer represents the object that can execute prepared SQL queries.

type ContextPreparedQueryer

type ContextPreparedQueryer interface {
	QueryContext(ctx context.Context, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, args ...interface{}) *sql.Row
}

ContextPreparedQueryer represents the object that can perform prepared SQL queries.

type ContextPreparer

type ContextPreparer interface {
	PrepareContext(ctx context.Context, query string) (Stmt, error)
}

ContextPreparer represents the object that can create SQL prepared statements.

type ContextQueryer

type ContextQueryer interface {
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}

ContextQueryer represents the object that can perform SQL queries.

type DB

type DB interface {
	Queryer
	Execer
	Preparer
	Pinger
	Beginner
	Closer

	DB() *sql.DB
}

DB wraps a *sql.DB object.

type Execer

type Execer interface {
	ClassicExecer
	ContextExecer
}

Execer represents the object that can execute SQL queries.

type Pinger

type Pinger interface {
	ClassicPinger
	ContextPinger
}

Pinger represents the object that can verify a connection.

type PreparedExecer

type PreparedExecer interface {
	ClassicPreparedExecer
	ContextPreparedExecer
}

PreparedExecer represents the object that can execute prepared SQL queries.

type PreparedQueryer

type PreparedQueryer interface {
	ClassicPreparedQueryer
	ContextPreparedQueryer
}

PreparedQueryer represents the object that can perform prepared SQL queries.

type Preparer

type Preparer interface {
	ClassicPreparer
	ContextPreparer
}

Preparer represents the object that can create SQL prepared statements.

type Queryer

type Queryer interface {
	ClassicQueryer
	ContextQueryer
}

Queryer represents the object that can perform SQL queries.

type Stmt

type Stmt interface {
	PreparedQueryer
	PreparedExecer

	Stmt() *sql.Stmt
}

Stmt wraps a *sql.Stmt object.

type Transactor

type Transactor interface {
	Commit() error
	Rollback() error
}

Transactor represents the object that can commit or rollback a transaciton.

type Tx

type Tx interface {
	Queryer
	Execer
	Transactor

	StmtContext(context.Context, Stmt) Stmt

	Tx() *sql.Tx
}

Tx wraps a *sql.Tx object.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL