dingo

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

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

Go to latest
Published: Jun 23, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

README

dingo

write sql faster

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLocation *time.Location
View Source
var TooManyConcurrentConnections = errors.New("TooManyConcurrentConnections")

Functions

func BatchInsertRow

func BatchInsertRow(inputs ...driver.Value) []driver.Value

func Join

func Join(columns ...string) string

func Open

func Open(drv driver.Driver, dsn string) (sql.Conn, error)

func Translate

func Translate(sql string, columns ...interface{}) sql.Translated

func Tuple

func Tuple(vals ...interface{}) string

Types

type Batch

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

func NewBatch

func NewBatch() *Batch

func (*Batch) Columns

func (batch *Batch) Columns() []string

func (*Batch) GetInt

func (batch *Batch) GetInt(row int, column string) int

func (*Batch) GetInt64Column

func (batch *Batch) GetInt64Column(column string) []int64

func (*Batch) GetString

func (batch *Batch) GetString(row int, column string) string

func (*Batch) GetStringColumn

func (batch *Batch) GetStringColumn(column string) []string

func (*Batch) Len

func (batch *Batch) Len() int

type Conn

type Conn struct {
	Error error
	// contains filtered or unexported fields
}

func (*Conn) BeginTx

func (conn *Conn) BeginTx() error

func (*Conn) Close

func (conn *Conn) Close() error

func (*Conn) CommitTx

func (conn *Conn) CommitTx() error

func (*Conn) Exec

func (conn *Conn) Exec(translatedSql *TranslatedSql, inputs ...driver.Value) (driver.Result, error)

func (*Conn) RollbackTx

func (conn *Conn) RollbackTx() error

func (*Conn) Statement

func (conn *Conn) Statement(translatedSql sql.Translated) sql.Stmt

func (*Conn) TranslateStatement

func (conn *Conn) TranslateStatement(sql string, columns ...interface{}) sql.Stmt

type Pool

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

func NewPool

func NewPool(drv driver.Driver, dsn string, size int32) *Pool

func (*Pool) Borrow

func (pool *Pool) Borrow() (*Conn, error)

type Rows

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

func (*Rows) C

func (rows *Rows) C(column string) sql.ColumnIndex

func (*Rows) Close

func (rows *Rows) Close() error

func (*Rows) Columns

func (rows *Rows) Columns() []string

func (*Rows) Get

func (rows *Rows) Get(idx sql.ColumnIndex) interface{}

func (*Rows) GetByName

func (rows *Rows) GetByName(name string) interface{}

func (*Rows) GetByteArray

func (rows *Rows) GetByteArray(idx sql.ColumnIndex) []byte

func (*Rows) GetInt

func (rows *Rows) GetInt(idx sql.ColumnIndex) int

func (*Rows) GetInt64

func (rows *Rows) GetInt64(idx sql.ColumnIndex) int64

func (*Rows) GetString

func (rows *Rows) GetString(idx sql.ColumnIndex) string

func (*Rows) GetTime

func (rows *Rows) GetTime(idx sql.ColumnIndex) time.Time

func (*Rows) Next

func (rows *Rows) Next() error

func (*Rows) NextBatch

func (rows *Rows) NextBatch(batch *Batch, maxToRead int) error

type Stmt

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

func (*Stmt) Close

func (stmt *Stmt) Close() error

func (*Stmt) Exec

func (stmt *Stmt) Exec(inputs ...driver.Value) (driver.Result, error)

func (*Stmt) Query

func (stmt *Stmt) Query(inputs ...driver.Value) (sql.Rows, error)

type TranslatedSql

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

func NewTranslatedSql

func NewTranslatedSql(sql string, argMap map[string][]int, strParamCount int, totalParamCount int) *TranslatedSql

Jump to

Keyboard shortcuts

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