Documentation ¶
Index ¶
- type Database
- type Ex
- type Field
- type FieldSet
- type Model
- type Query
- func (q *Query) AndWhere(expression ...Ex) *Query
- func (q *Query) InnerJoin(relatedModel interface{}) *Query
- func (q *Query) LeftJoin(relatedModel interface{}) *Query
- func (q *Query) Limit(limit int) *Query
- func (q *Query) Select(destination interface{}) error
- func (q *Query) Where(expression ...Ex) *Query
- type Relation
- type StorageEngine
- type Transaction
- type TransactionEngine
- type UniqueConstraint
- type UniqueConstraintSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) Begin ¶
func (db *Database) Begin() (*Transaction, error)
type Field ¶
type Field interface { FieldId() uint32 Name() string IsPrimaryKey() bool Reflection() reflect.StructField }
type StorageEngine ¶
type StorageEngine interface {
Begin() (*Transaction, error)
}
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶
func (txn *Transaction) Commit() error
func (*Transaction) Insert ¶
func (txn *Transaction) Insert(model interface{}) error
func (*Transaction) Model ¶
func (txn *Transaction) Model(model interface{}) *Query
func (*Transaction) Rollback ¶
func (txn *Transaction) Rollback() error
type TransactionEngine ¶
type TransactionEngine interface { }
type UniqueConstraint ¶
type UniqueConstraintSet ¶
type UniqueConstraintSet interface { GetAll() []UniqueConstraint GetById(uniqueConstraintId uint32) UniqueConstraint GetByName(uniqueConstraintName string) UniqueConstraint }
Click to show internal directories.
Click to hide internal directories.