Documentation
¶
Index ¶
- func Load(rec Rec, src Source) error
- func Store(rec Rec) error
- type BasicCol
- func (self *BasicCol) Create(table Table) error
- func (self *BasicCol) Drop(table Table) error
- func (self *BasicCol) Eq(r interface{}) Cond
- func (self *BasicCol) EqCol(r Col) Cond
- func (self *BasicCol) ForeignKey() *ForeignKey
- func (self *BasicCol) GetFieldAddr(rec Ref) interface{}
- func (self *BasicCol) GetFieldValue(rec Ref) interface{}
- func (self *BasicCol) Gt(r interface{}) Cond
- func (self *BasicCol) Init(table Table, name string)
- func (self *BasicCol) IsPrimaryKey() bool
- func (self *BasicCol) Lt(r interface{}) Cond
- func (self *BasicCol) Op(op string, r interface{}) Cond
- func (self *BasicCol) SetFieldValue(rec Ref, val interface{})
- func (self *BasicCol) SetPrimaryKey(val bool)
- func (self *BasicCol) ValParams() []interface{}
- func (self *BasicCol) WriteValSql(out io.Writer) error
- type BasicCols
- type BasicDef
- type BasicField
- func (self *BasicField) FieldName() string
- func (self *BasicField) GetField(rec Ref) reflect.Value
- func (self *BasicField) GetFieldAddr(rec Ref) interface{}
- func (self *BasicField) GetFieldValue(rec Ref) interface{}
- func (self *BasicField) Init(fieldName string)
- func (self *BasicField) SetFieldValue(rec Ref, val interface{})
- type BasicRec
- type BasicTable
- func (self *BasicTable) Create() error
- func (self *BasicTable) Cx() *Cx
- func (self *BasicTable) Drop() error
- func (self *BasicTable) Exists() (bool, error)
- func (self *BasicTable) FindForeignKey(name string) *ForeignKey
- func (self *BasicTable) Init(cx *Cx, name string) *BasicTable
- func (self *BasicTable) Insert(rec Rec) error
- func (self *BasicTable) Load(rec Rec) error
- func (self *BasicTable) LoadFields(rec Rec, src Source) error
- func (self *BasicTable) NewEnumCol(name string, enum *Enum) *EnumCol
- func (self *BasicTable) NewForeignKey(name string, foreignTable Table) *ForeignKey
- func (self *BasicTable) NewIntCol(name string) *IntCol
- func (self *BasicTable) NewStoredRec() StoredRec
- func (self *BasicTable) NewStringCol(name string) *StringCol
- func (self *BasicTable) NewTimeCol(name string) *TimeCol
- func (self *BasicTable) PrimaryKey() *Key
- func (self *BasicTable) Query() *Query
- func (self *BasicTable) RelParams() []interface{}
- func (self *BasicTable) StoredRec(rec Rec) StoredRec
- func (self *BasicTable) Update(rec Rec) error
- func (self *BasicTable) WriteRelSql(out io.Writer) error
- type Col
- type Cols
- type Cond
- type CustomCond
- type CustomVal
- type Cx
- func (self *Cx) DropAll() error
- func (self *Cx) ExecSQL(sql string, params ...interface{}) error
- func (self *Cx) FindTable(name string) Table
- func (self *Cx) Init(conn *pgx.Conn) *Cx
- func (self *Cx) NewEnum(name string, alts ...string) *Enum
- func (self *Cx) NewTable(name string) Table
- func (self *Cx) Query(sql string, params ...interface{}) (pgx.Rows, error)
- func (self *Cx) QueryRow(sql string, params ...interface{}) pgx.Row
- func (self *Cx) SyncAll() error
- type Def
- type Enum
- type EnumCol
- type Field
- type ForeignKey
- type IntCol
- type Join
- type Key
- type Query
- func (self *Query) Close()
- func (self *Query) Cx() *Cx
- func (self *Query) From(rel Rel) *Query
- func (self *Query) Init(cx *Cx) *Query
- func (self *Query) Join(right Table, key *ForeignKey) *Query
- func (self *Query) Join2(right Table, key1, key2 *ForeignKey) *Query
- func (self *Query) Next() bool
- func (self *Query) OrderBy(in ...Val) *Query
- func (self *Query) Run() error
- func (self *Query) Scan(dst ...interface{}) error
- func (self *Query) Select(in ...Val) *Query
- func (self *Query) Where(in ...Cond) *Query
- type Rec
- type RecProxy
- type Ref
- type Rel
- type RootDef
- type Source
- type StoredRec
- type StringCol
- type Table
- type TableDef
- type TimeCol
- type Val
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicCol ¶
type BasicCol struct {
BasicDef
BasicField
// contains filtered or unexported fields
}
func (*BasicCol) ForeignKey ¶
func (self *BasicCol) ForeignKey() *ForeignKey
func (*BasicCol) GetFieldAddr ¶
func (*BasicCol) GetFieldValue ¶
func (*BasicCol) IsPrimaryKey ¶
func (*BasicCol) SetFieldValue ¶
func (*BasicCol) SetPrimaryKey ¶
type BasicCols ¶
type BasicCols struct {
// contains filtered or unexported fields
}
func (*BasicCols) SetPrimaryKey ¶
type BasicField ¶
type BasicField struct {
// contains filtered or unexported fields
}
func (*BasicField) FieldName ¶
func (self *BasicField) FieldName() string
func (*BasicField) GetFieldAddr ¶
func (self *BasicField) GetFieldAddr(rec Ref) interface{}
func (*BasicField) GetFieldValue ¶
func (self *BasicField) GetFieldValue(rec Ref) interface{}
func (*BasicField) Init ¶
func (self *BasicField) Init(fieldName string)
func (*BasicField) SetFieldValue ¶
func (self *BasicField) SetFieldValue(rec Ref, val interface{})
type BasicRec ¶
type BasicRec struct {
// contains filtered or unexported fields
}
func (*BasicRec) AfterInsert ¶
type BasicTable ¶
func (*BasicTable) Create ¶
func (self *BasicTable) Create() error
func (*BasicTable) Cx ¶
func (self *BasicTable) Cx() *Cx
func (*BasicTable) Drop ¶
func (self *BasicTable) Drop() error
func (*BasicTable) Exists ¶
func (self *BasicTable) Exists() (bool, error)
func (*BasicTable) FindForeignKey ¶
func (self *BasicTable) FindForeignKey(name string) *ForeignKey
func (*BasicTable) Init ¶
func (self *BasicTable) Init(cx *Cx, name string) *BasicTable
func (*BasicTable) Insert ¶
func (self *BasicTable) Insert(rec Rec) error
func (*BasicTable) Load ¶
func (self *BasicTable) Load(rec Rec) error
func (*BasicTable) LoadFields ¶
func (self *BasicTable) LoadFields(rec Rec, src Source) error
func (*BasicTable) NewEnumCol ¶
func (self *BasicTable) NewEnumCol(name string, enum *Enum) *EnumCol
func (*BasicTable) NewForeignKey ¶
func (self *BasicTable) NewForeignKey(name string, foreignTable Table) *ForeignKey
func (*BasicTable) NewIntCol ¶
func (self *BasicTable) NewIntCol(name string) *IntCol
func (*BasicTable) NewStoredRec ¶
func (self *BasicTable) NewStoredRec() StoredRec
func (*BasicTable) NewStringCol ¶
func (self *BasicTable) NewStringCol(name string) *StringCol
func (*BasicTable) NewTimeCol ¶
func (self *BasicTable) NewTimeCol(name string) *TimeCol
func (*BasicTable) PrimaryKey ¶
func (self *BasicTable) PrimaryKey() *Key
func (*BasicTable) Query ¶
func (self *BasicTable) Query() *Query
func (*BasicTable) RelParams ¶
func (self *BasicTable) RelParams() []interface{}
func (*BasicTable) StoredRec ¶
func (self *BasicTable) StoredRec(rec Rec) StoredRec
func (*BasicTable) Update ¶
func (self *BasicTable) Update(rec Rec) error
func (*BasicTable) WriteRelSql ¶
func (self *BasicTable) WriteRelSql(out io.Writer) error
type CustomCond ¶
type CustomCond struct {
// contains filtered or unexported fields
}
func (*CustomCond) CondParams ¶
func (self *CustomCond) CondParams() []interface{}
func (*CustomCond) Init ¶
func (self *CustomCond) Init(sql string, params ...interface{}) *CustomCond
func (*CustomCond) WriteCondSql ¶
func (self *CustomCond) WriteCondSql(out io.Writer) error
type EnumCol ¶
type EnumCol struct {
BasicCol
// contains filtered or unexported fields
}
func (*EnumCol) NewForeignCol ¶
func (self *EnumCol) NewForeignCol(table Table, name string, key *ForeignKey) Col
type ForeignKey ¶
type ForeignKey struct {
BasicField
Key
// contains filtered or unexported fields
}
func (*ForeignKey) Create ¶
func (self *ForeignKey) Create(table Table) error
func (*ForeignKey) ForeignTable ¶
func (self *ForeignKey) ForeignTable() Table
func (*ForeignKey) Init ¶
func (self *ForeignKey) Init(name string, fieldName string, foreignTable Table) *ForeignKey
type IntCol ¶
type IntCol struct {
BasicCol
}
func (*IntCol) NewForeignCol ¶
func (self *IntCol) NewForeignCol(table Table, name string, key *ForeignKey) Col
type RecProxy ¶
type RecProxy struct {
// contains filtered or unexported fields
}
func NewRecProxy ¶
type StringCol ¶
type StringCol struct {
BasicCol
}
func (*StringCol) NewForeignCol ¶
func (self *StringCol) NewForeignCol(table Table, name string, key *ForeignKey) Col
type Table ¶
type Table interface {
Cols
RootDef
Rel
Cx() *Cx
PrimaryKey() *Key
NewForeignKey(name string, foreignTable Table) *ForeignKey
FindForeignKey(name string) *ForeignKey
NewEnumCol(name string, enum *Enum) *EnumCol
NewIntCol(name string) *IntCol
NewStringCol(name string) *StringCol
NewTimeCol(name string) *TimeCol
NewStoredRec() StoredRec
StoredRec(rec Rec) StoredRec
Insert(rec Rec) error
Update(rec Rec) error
LoadFields(rec Rec, src Source) error
Load(rec Rec) error
Query() *Query
}
type TimeCol ¶
type TimeCol struct {
BasicCol
}
func (*TimeCol) NewForeignCol ¶
func (self *TimeCol) NewForeignCol(table Table, name string, key *ForeignKey) Col
Click to show internal directories.
Click to hide internal directories.