Documentation
¶
Overview ¶
A simple extension to the golang database/sql package that facilitates getting row columns by name. The goal is to keep the existing sql package interface intact, yet allow the use of additional methods to satisfy the added functionality. This allows a seamless swap of the database/sql package with this one. Methods not list are directly inherited from database/sql
Index ¶
- Variables
- func Close()
- func Databases() []string
- type DB
- type Row
- func (r *Row) GetBoolean(column string) (bool, error)
- func (r *Row) GetDouble(column string) (float64, error)
- func (r *Row) GetInteger(column string) (int64, error)
- func (r *Row) GetString(column string) (string, error)
- func (r *Row) GetTime(column string) (time.Time, error)
- func (r *Row) Scan(dest ...interface{}) error
- type Rows
- func (rs *Rows) Err() error
- func (rs *Rows) GetBoolean(column string) (bool, error)
- func (rs *Rows) GetDouble(column string) (float64, error)
- func (rs *Rows) GetInteger(column string) (int64, error)
- func (rs *Rows) GetString(column string) (string, error)
- func (rs *Rows) GetTime(column string) (time.Time, error)
- func (rs *Rows) Next() bool
- type Stmt
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRows = sql.ErrNoRows ErrDupConnName = errors.New("ksql: duplicate database connection name") ErrColumnNotFound = errors.New("ksql: column not found in result") ErrInvalidColumnTypeConversion = errors.New("ksql: invalid column type conversion") )
Errors
Functions ¶
Types ¶
type DB ¶
Inherit database/sql.DB
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
func (*Row) GetBoolean ¶
Get the boolean value in this row by column name
func (*Row) GetInteger ¶
Get the integer value in this row by column name
type Rows ¶
Inherit database/sql.Rows
func (*Rows) GetBoolean ¶
Get the boolean value in this row by column name
func (*Rows) GetInteger ¶
Get the integer value in this row by column name
Click to show internal directories.
Click to hide internal directories.