sqlo

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: MIT Imports: 2 Imported by: 0

README

sqlo

go get -u github.com/codemodus/sqlo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result added in v0.2.0

type Result interface {
	LastInsertId() int64
	RowsAffected() int64
}

Result ...

type Row added in v0.2.0

type Row struct {
	Row *sql.Row
	// contains filtered or unexported fields
}

Row ...

func (Row) Err added in v0.2.0

func (es Row) Err() error

func (*Row) Scan added in v0.2.0

func (r *Row) Scan(dest ...interface{})

Scan ...

type Rows added in v0.2.0

type Rows struct {
	Rows *sql.Rows
	// contains filtered or unexported fields
}

Rows ...

func (*Rows) Close added in v0.2.0

func (rs *Rows) Close() error

Close ...

func (Rows) Err added in v0.2.0

func (es Rows) Err() error

func (*Rows) Next added in v0.2.0

func (rs *Rows) Next() bool

Next ...

func (*Rows) Scan added in v0.2.0

func (rs *Rows) Scan(dest ...interface{})

Scan ...

type SQLO

type SQLO struct {
	*sql.DB
}

SQLO ...

func New

func New(db *sql.DB) *SQLO

New ...

func (*SQLO) Begin added in v0.2.0

func (db *SQLO) Begin() Tx

Begin ...

func (*SQLO) BeginTx added in v0.2.0

func (db *SQLO) BeginTx(ctx context.Context, opts *sql.TxOptions) Tx

BeginTx ...

func (*SQLO) Scope added in v0.2.0

func (db *SQLO) Scope() Scope

Scope ...

type Scope added in v0.2.0

type Scope struct {
	*SQLO
	// contains filtered or unexported fields
}

Scope ...

func (*Scope) Begin added in v0.2.0

func (scx *Scope) Begin() Tx

Begin ...

func (*Scope) BeginTx added in v0.2.0

func (scx *Scope) BeginTx(ctx context.Context, opts *sql.TxOptions) Tx

BeginTx ...

func (Scope) Err added in v0.2.0

func (es Scope) Err() error

func (*Scope) Prepare added in v0.2.0

func (scx *Scope) Prepare(query string) Stmt

Prepare ...

type Stmt added in v0.2.0

type Stmt struct {
	Stmt *sql.Stmt
	// contains filtered or unexported fields
}

Stmt ...

func (*Stmt) Close added in v0.2.0

func (s *Stmt) Close() error

Close ...

func (Stmt) Err added in v0.2.0

func (es Stmt) Err() error

func (*Stmt) ExecContext added in v0.2.0

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

ExecContext ...

func (*Stmt) QueryContext added in v0.2.0

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

QueryContext ...

func (*Stmt) QueryRowContext added in v0.2.0

func (s *Stmt) QueryRowContext(ctx context.Context) Row

QueryRowContext ...

type Tx added in v0.2.0

type Tx struct {
	Tx *sql.Tx
	// contains filtered or unexported fields
}

Tx ...

func (*Tx) Commit added in v0.2.0

func (t *Tx) Commit() error

Commit ...

func (Tx) Err added in v0.2.0

func (es Tx) Err() error

func (*Tx) Prepare added in v0.2.0

func (t *Tx) Prepare(query string) Stmt

Prepare ...

func (*Tx) Rollback added in v0.2.0

func (t *Tx) Rollback() error

Rollback ...

Jump to

Keyboard shortcuts

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