Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn interface { Exec(query string, args map[string]interface{}) (Result, error) Begin() (Tx, error) Close() error }
Conn is a connection to a database. It should not be used concurrently by multiple goroutines.
type Driver ¶
type Driver interface { // Open returns a new connection to the database. // The name is a string in a driver-specific format. // The returned connection should only be used by one // goroutine at a time. Open(name string) (Conn, error) }
Driver is the interface that must be implemented by a database driver.
type Result ¶
type Result interface { LastInsertId() (int64, error) RowsAffected() (int64, error) Columns() []string Next() []interface{} Err() error Close() error }
Result is an iterator over an executed query's results. It is also used to query for the results of a DML, in which case the iterator functions are not applicable.
Click to show internal directories.
Click to hide internal directories.