Documentation ¶
Index ¶
- type AutoInsert
- type Clause
- type Create
- func (cre *Create) Fields() (fields []*Field)
- func (cre *Create) InsertableDynamicFields() (fields []*Field)
- func (cre *Create) InsertableOptionalFields() (fields []*Field)
- func (cre *Create) InsertableRequiredFields() (fields []*Field)
- func (cre *Create) InsertableStaticFields() (fields []*Field)
- func (cre *Create) Signature() string
- type Delete
- type Expr
- type Field
- func (f *Field) ColumnRef() string
- func (f *Field) Insertable() bool
- func (f *Field) InsertableDynamic() bool
- func (f *Field) InsertableOptional() bool
- func (f *Field) InsertableRequired() bool
- func (f *Field) InsertableStatic() bool
- func (f *Field) IsInt() bool
- func (f *Field) IsTime() bool
- func (f *Field) ModelOf() *Model
- func (f *Field) SelectRefs() (refs []string)
- func (f *Field) UnderRef() string
- func (f *Field) Unique() bool
- type FuncCall
- type GroupBy
- type Index
- type Join
- type Model
- 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) InsertableDynamicFields() (fields []*Field)
- func (m *Model) InsertableOptionalFields() (fields []*Field)
- func (m *Model) InsertableRequiredFields() (fields []*Field)
- func (m *Model) InsertableStaticFields() (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 OrderByEntry
- 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 AutoInsert ¶
type Clause ¶
func (*Clause) NeedsCondition ¶
type Create ¶
func (*Create) InsertableDynamicFields ¶
func (*Create) InsertableOptionalFields ¶
func (*Create) InsertableRequiredFields ¶
func (*Create) InsertableStaticFields ¶
type Expr ¶
type Expr struct { Null bool Placeholder int StringLit *string NumberLit *string BoolLit *bool Field *Field FuncCall *FuncCall Row []*Field }
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 Default string }
func (*Field) Insertable ¶
func (*Field) InsertableDynamic ¶
func (*Field) InsertableOptional ¶
func (*Field) InsertableRequired ¶
func (*Field) InsertableStatic ¶
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) AutoUpdatableFields ¶
func (*Model) BasicPrimaryKey ¶
func (*Model) FieldSetUnique ¶
func (*Model) FieldUnique ¶
func (*Model) HasUpdatableFields ¶
func (*Model) InsertableDynamicFields ¶
func (*Model) InsertableOptionalFields ¶
func (*Model) InsertableRequiredFields ¶
func (*Model) InsertableStaticFields ¶
func (*Model) SelectRefs ¶
func (*Model) UpdatableFields ¶
type OrderBy ¶
type OrderBy struct {
Entries []*OrderByEntry
}
type OrderByEntry ¶
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.