Documentation ¶
Index ¶
- type Create
- type Delete
- type Expr
- type Field
- type FuncCall
- type GroupBy
- type Index
- type Join
- type Model
- func (m *Model) AutoInsertableFields() (fields []*Field)
- func (m *Model) AutoUpdatableFields() (fields []*Field)
- func (m *Model) BasicPrimaryKey() *Field
- func (m *Model) FieldSetUnique(fields []*Field) bool
- func (m *Model) FieldUnique(field *Field) bool
- func (m *Model) HasUpdatableFields() bool
- func (m *Model) InsertableFields() (fields []*Field)
- func (m *Model) ModelOf() *Model
- func (m *Model) SelectRefs() (refs []string)
- func (m *Model) UnderRef() string
- func (m *Model) UpdatableFields() (fields []*Field)
- type OrderBy
- type Read
- type Relation
- type Root
- type Selectable
- type Update
- type View
- type Where
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expr ¶
type Expr struct { Null bool Placeholder bool StringLit *string NumberLit *string BoolLit *bool Field *Field FuncCall *FuncCall }
func (*Expr) HasPlaceholder ¶
type Field ¶
type Field struct { Name string Column string Model *Model Type consts.FieldType Relation *Relation Nullable bool AutoInsert bool AutoUpdate bool Updatable bool Length int // Text only }
func (*Field) Insertable ¶
func (*Field) SelectRefs ¶
type FuncCall ¶
func (*FuncCall) HasPlaceholder ¶
type Model ¶
type Model struct { Name string Table string Fields []*Field PrimaryKey []*Field Unique [][]*Field Indexes []*Index }
func SortModels ¶
func (*Model) AutoInsertableFields ¶
func (*Model) AutoUpdatableFields ¶
func (*Model) BasicPrimaryKey ¶
func (*Model) FieldSetUnique ¶
func (*Model) FieldUnique ¶
func (*Model) HasUpdatableFields ¶
func (*Model) InsertableFields ¶
func (*Model) SelectRefs ¶
func (*Model) UpdatableFields ¶
type Read ¶
type Read struct { Suffix []string Selectables []Selectable From *Model Joins []*Join Where []*Where OrderBy *OrderBy GroupBy *GroupBy View View }
func (*Read) SelectedModel ¶
SelectedModel returns the single model being selected or nil if there are more than one selectable or the selectable is a field.
type Relation ¶
type Relation struct { Field *Field Kind consts.RelationKind }
type Selectable ¶
type Update ¶
func (*Update) AutoUpdatableFields ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.