Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNeedInput = errors.New("insert method require at least one argument")
var ErrUsed = errors.New("this query has already executed")
ErrUsed is an error that emits if used is true on Segment.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is a signature that can be used for handling database segments in a separate function
type Octobe ¶
type Octobe struct { // DB is the database instance DB *sql.DB // contains filtered or unexported fields }
Octobe struct that holds the database session
type Option ¶ added in v0.1.1
type Option interface {
Type() string
}
Option interface that tells what type of option it is
func SuppressError ¶ added in v0.1.1
SuppressError will tell the library to suppress the error if it occurs in this lib or sql libs
type Scheme ¶
type Scheme struct {
// contains filtered or unexported fields
}
Scheme holds context for the duration of the transaction
func (*Scheme) WatchRollback ¶
WatchRollback will perform a rollback if an error is given This method can be used as a defer in the function that performs the database operations.
type Segment ¶
type Segment struct {
// contains filtered or unexported fields
}
Segment is a specific query that can be run only once it keeps a few fields for keeping track on the segment
func (*Segment) Arguments ¶
func (segment *Segment) Arguments(args ...interface{})
Arguments receives unknown amount of arguments to use in the query
func (*Segment) Insert ¶
Insert will perform a query, and will also take destination pointers for returning data. Use Exec of Insert if you do not expect returning values Insert needs at least one argument, otherwise use Exec