Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func New ¶
New makes a new *DB with an open connection to the given database name. The user must run DB.Close when finished using the DB.
func (*DB) Close ¶
Close ends the connection to the database and sets the DB.db = nil and the DB.open = false. Any errors that happen are pushed forward.
func (*DB) Exec ¶
func (d *DB) Exec(statement string, resultCallBack SQLResultCallBack, args ...interface{}) error
Exec runs a statement and handles the context and closing of prep and any errors that take place are passed on.
type SQLResultCallBack ¶
SQLResultCallBack is used in executing a DB.Exec statement and handling the sql.Result of the execution.
type SQLRowsCallBack ¶
SQLRowsCallBack is used in executing a DB.Query statement and handling the *sql.Rows of the query.
Click to show internal directories.
Click to hide internal directories.