Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package sql provides basic functionality for accessing a PostgreSQL database.
Index ¶
- func BuildWhere(cols []string) string
 - func Exec(ctx *b.Context, qu string, args ...interface{}) error
 - func Query(ctx *b.Context, process func(*Rows) error, qu string, args ...interface{}) error
 - func QueryNumber(ctx *b.Context, qu string, args ...interface{}) (uint64, error)
 - func QueryRow(ctx *b.Context, process func(*Row) error, qu string, args ...interface{}) error
 - func QueryRows(ctx *b.Context, qu string, args ...interface{}) (*sql.Rows, error)
 - func QueryString(ctx *b.Context, qu string, args ...interface{}) (string, error)
 - func Start(ctx *b.Context)
 - type NullInt64
 - type NullString
 - type Row
 - type Rows
 - type Storage
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWhere ¶ added in v0.1.11
func Query ¶
Function Query executes a SQL query and calls the process closure using the Rows object returned by the query.
func QueryNumber ¶ added in v0.1.11
Function QueryNumber executes the SQL query given and returns a scalar numeric value.
func QueryRow ¶ added in v0.1.11
Function QueryRow excecutes a SQL query that returns exactly one Row and calls the process closure using the Row object returned by the query.
func QueryRows ¶ added in v0.1.11
Funtion QueryRows executes a SQL query and returns the sql.Rows object. It is the responsibility of the caller to iterate over the Rows object returned and scan the individual rows.
func QueryString ¶ added in v0.1.11
Function QueryString executes the SQL query given and returns a scalar string value.
Types ¶
type NullString ¶ added in v0.1.11
type NullString = sql.NullString