Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CreateTable = stmt.NewCreateTable CreateTableIfNotExists = stmt.NewCreateTableIfNotExists Select = stmt.NewSelect SelectDistinct = stmt.NewSelectDistinct InsertInto = stmt.NewInsertInto Update = stmt.NewUpdate Delete = stmt.NewDelete SimpleCase = stmt.NewSimpleCase SimpleWhen = stmt.NewSimpleWhen SearchedCase = stmt.NewSearchedCase SearchedWhen = stmt.NewSearchedWhen Column = stmt.NewColumn Table = stmt.NewTable Val = stmt.NewVal Vals = stmt.NewVals Subquery = stmt.NewSubquery Assign = stmt.NewAssign And = stmt.NewAnd Or = stmt.NewOr Not = stmt.NewNot Exists = stmt.NewExists NotExists = stmt.NewNotExists Union = stmt.NewUnion UnionAll = stmt.NewUnionAll Intersect = stmt.NewIntersect IntersectAll = stmt.NewIntersectAll Except = stmt.NewExcept ExceptAll = stmt.NewExceptAll Wildcard = stmt.NewWildcard() Count = stmt.NewCount Max = stmt.NewMax Add = stmt.NewAdd Sub = stmt.NewSub Mul = stmt.NewMul Div = stmt.NewDiv IntegerDiv = stmt.NewIntegerDiv Mod = stmt.NewMod IFNULL = stmt.NewIFNULL )
Methods exported to make statements.
Functions ¶
func NewErrFoundMultipleRecords ¶
NewErrFoundMultipleRecords create an ErrFoundMultipleRecords instance - table: table name
func NewErrRecordNotFound ¶
NewErrRecordNotFound create an ErrRecordNotFound instance - table: table name
Types ¶
type DBInterface ¶
type DBInterface interface { Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row Exec(query string, args ...interface{}) (sql.Result, error) }
DBInterface *sql.DB or *sql.Tx
type ErrFoundMultipleRecords ¶
type ErrFoundMultipleRecords struct {
// contains filtered or unexported fields
}
ErrFoundMultipleRecords some records found error
func (ErrFoundMultipleRecords) Error ¶
func (err ErrFoundMultipleRecords) Error() string
type ErrRecordNotFound ¶
type ErrRecordNotFound struct {
// contains filtered or unexported fields
}
ErrRecordNotFound record not found error
func (ErrRecordNotFound) Error ¶
func (err ErrRecordNotFound) Error() string
type Session ¶
type Session struct { DBInterface Builder *builder.Builder }
Session wraps sql.DB
func NewSession ¶
func NewSession(builderName string, db DBInterface) (*Session, error)
NewSession create a Session instance
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
sqlabble/fixtures/foo
Code generated by sqlabble, DO NOT EDIT.
|
Code generated by sqlabble, DO NOT EDIT. |
sqlabble/fixtures/foo/bar
Code generated by sqlabble, DO NOT EDIT.
|
Code generated by sqlabble, DO NOT EDIT. |
sqlabble/fixtures/foo/bar/baz
Code generated by sqlabble, DO NOT EDIT.
|
Code generated by sqlabble, DO NOT EDIT. |
sqlabble/fixtures/foo/bar/baz/qux
Code generated by sqlabble, DO NOT EDIT.
|
Code generated by sqlabble, DO NOT EDIT. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.