Documentation ¶
Index ¶
- Constants
- func Describe(db int, schema, model, filter string) Json
- func FunctionDef(linq *Linq, col *Column) string
- func GetAs(n int) string
- func StrToColN(str string) []string
- type Col
- type Column
- func (c *Column) As(linq *Linq) string
- func (c *Column) Cast(cast string) *Column
- func (c *Column) DDL() string
- func (c *Column) DDLIndex() string
- func (c *Column) Def(linq *Linq) string
- func (c *Column) Describe() Json
- func (c *Column) Eq(val any) *Where
- func (c *Column) From(from string) *Column
- func (c *Column) In(vals ...any) *Where
- func (c *Column) Less(val any) *Where
- func (c *Column) LessEq(val any) *Where
- func (c *Column) Like(val any) *Where
- func (c *Column) Low() string
- func (c *Column) More(val any) *Where
- func (c *Column) MoreEq(val any) *Where
- func (c *Column) Name(name string) *Column
- func (c *Column) Neg(val any) *Where
- func (c *Column) Up() string
- type Details
- type FRom
- type Join
- type Linq
- func (c *Linq) And(where *Where) *Linq
- func (c *Linq) As(val any) string
- func (c *Linq) Col(val any) *Column
- func (c *Linq) Command() (Item, error)
- func (c *Linq) Count() int
- func (c *Linq) Current() (Item, error)
- func (c *Linq) Debug() *Linq
- func (c *Linq) Details(data *Json) *Json
- func (c *Linq) Find() (Items, error)
- func (c *Linq) First() (Item, error)
- func (c *Linq) From(model *Model, as ...string) *Linq
- func (c *Linq) GetAs() string
- func (c *Linq) GetCol(name string) *Column
- func (c *Linq) GetFrom(col *Column) *FRom
- func (c *Linq) GroupBy(cols ...any) *Linq
- func (c *Linq) Join(from, join *FRom, where *Where) *Linq
- func (c *Linq) LeftJoin(from, join *FRom, where *Where) *Linq
- func (c *Linq) Limit(limit int) (Items, error)
- func (c *Linq) List(page, rows int) (List, error)
- func (c *Linq) Or(where *Where) *Linq
- func (c *Linq) OrderBy(col *Column, sorted bool) *Linq
- func (c *Linq) Page(page, rows int) (Items, error)
- func (c *Linq) PrepareDelete(current Json)
- func (c *Linq) PrepareInsert()
- func (c *Linq) PrepareUpdate(current Json) bool
- func (c *Linq) Query() (Items, error)
- func (c *Linq) QueryCount() int
- func (c *Linq) QueryOne() (Item, error)
- func (c *Linq) Returns(cols ...any) *Linq
- func (c *Linq) RightJoin(from, join *FRom, where *Where) *Linq
- func (c *Linq) SQL() SQL
- func (c *Linq) Select(sel ...any) *Linq
- func (c *Linq) SetAs(model *Model, as string) string
- func (c *Linq) SetFromAs(from *FRom) *FRom
- func (c *Linq) Sql() string
- func (c *Linq) SqlColumDef(cols ...*Column) string
- func (c *Linq) SqlColums(cols ...*Column) string
- func (c *Linq) SqlCount() string
- func (c *Linq) SqlCurrent() string
- func (c *Linq) SqlDelete() string
- func (c *Linq) SqlFrom() string
- func (c *Linq) SqlGroupBy() string
- func (c *Linq) SqlIndex() string
- func (c *Linq) SqlInsert() string
- func (c *Linq) SqlJoin() string
- func (c *Linq) SqlKey() string
- func (c *Linq) SqlLimit(limit int) string
- func (c *Linq) SqlOffset(limit, offset int) string
- func (c *Linq) SqlOrderBy() string
- func (c *Linq) SqlReturn() string
- func (c *Linq) SqlSelect() string
- func (c *Linq) SqlUpdate() string
- func (c *Linq) SqlWhere() string
- func (c *Linq) ToCols(sel ...any) []*Column
- func (c *Linq) Where(where *Where) *Linq
- type Model
- func (c *Model) All() []*Column
- func (c *Model) As(as string) *FRom
- func (c *Model) Atrib(name string) *Column
- func (c *Model) AtribIdx(name string) int
- func (c *Model) Avg(args ...any) *Column
- func (c *Model) Changue(current Json, linq *Linq) *Linq
- func (c *Model) Col(name string) *Column
- func (c *Model) ColIdx(name string) int
- func (c *Model) Column(name string) *Column
- func (c *Model) Concat(args ...any) *Column
- func (c *Model) Consolidate(linq *Linq) *Linq
- func (c *Model) Count(args ...any) *Column
- func (c *Model) DDL() string
- func (c *Model) DDLMigration() string
- func (c *Model) DefineAtrib(name, description, _type string, _default any) *Model
- func (c *Model) DefineColum(name, description, _type string, _default any) *Model
- func (c *Model) DefineField(name, description string, _default any, definition string) *Model
- func (c *Model) DefineForeignKey(thisKey string, otherKey *Column) *Model
- func (c *Model) DefineHidden(hidden []string) *Model
- func (c *Model) DefineIndex(index []string) *Model
- func (c *Model) DefinePrimaryKey(keys []string) *Model
- func (c *Model) DefineReference(thisKey, name, otherKey string, column *Column) *Model
- func (c *Model) Delete() *Linq
- func (c *Model) Describe() Json
- func (c *Model) Details(name, description string, _default any, details Details)
- func (c *Model) DropDDL() string
- func (c *Model) From() *Linq
- func (c *Model) Init() error
- func (c *Model) Insert(data Json) *Linq
- func (c *Model) Low() string
- func (c *Model) Max(args ...any) *Column
- func (c *Model) Min(args ...any) *Column
- func (c *Model) Model() Json
- func (c *Model) References(reference Rerences)
- func (c *Model) Select(sel ...any) *Linq
- func (c *Model) Sum(args ...any) *Column
- func (c *Model) TitleIdx(name string) int
- func (c *Model) Trigger(event int, trigger Trigger)
- func (c *Model) Up() string
- func (c *Model) Update(data Json) *Linq
- func (c *Model) Upsert(data Json) *Linq
- type OrderBy
- type Reference
- type ReferenceValue
- type Rerences
- type SQL
- type Schema
- type Trigger
- type Where
Constants ¶
View Source
const ActDelete = 5
View Source
const ActInsert = 4
View Source
const ActSelect = 3
View Source
const ActUpdate = 6
View Source
const ActUpsert = 7
View Source
const AfterDelete = 6
View Source
const AfterInsert = 2
View Source
const AfterUpdate = 4
View Source
const BeforeDelete = 5
View Source
const BeforeInsert = 1
View Source
const BeforeUpdate = 3
View Source
const TpAtrib = 1
View Source
const TpClone = 5
View Source
const TpColumn = 0
View Source
const TpData = 2
View Source
const TpDetail = 2
View Source
const TpField = 6
View Source
const TpFunction = 4
View Source
const TpReference = 3
View Source
const TpSelect = 1
Variables ¶
This section is empty.
Functions ¶
func FunctionDef ¶ added in v0.0.8
Types ¶
type Column ¶
type Column struct { Model *Model Tp int Column *Column Title string Description string Type string Default any Atribs []*Column Reference *Reference Definition interface{} Function string Details Details Indexed bool Unique bool Required bool PrimaryKey bool ForeignKey bool Hidden bool // contains filtered or unexported fields }
func NewVirtualAtrib ¶
type Linq ¶
* * *
func (*Linq) PrepareDelete ¶
func (c *Linq) PrepareDelete(current Json)
func (*Linq) PrepareUpdate ¶
func (*Linq) QueryCount ¶
func (*Linq) SqlCurrent ¶
func (*Linq) SqlGroupBy ¶
func (*Linq) SqlOrderBy ¶
type Model ¶
type Model struct { Db int Database *Db Name string Description string Schema string Table string Definition []*Column PrimaryKeys []string ForeignKey []*Reference Index []string SourceField string DateMakeField string DateUpdateField string IndexField string CodeField string ProjectField string StateField string Ddl string IntegrityAtrib bool IntegrityReference bool UseState bool UseSource bool UseDateMake bool UseDateUpdate bool UseProject bool UseIndex bool UseRecycle bool BeforeInsert []Trigger AfterInsert []Trigger BeforeUpdate []Trigger AfterUpdate []Trigger BeforeDelete []Trigger AfterDelete []Trigger AfterReferences Rerences Version int }
func (*Model) DDLMigration ¶ added in v0.0.29
func (*Model) DefineAtrib ¶
func (*Model) DefineColum ¶
* * *
func (*Model) DefineField ¶
func (*Model) DefineForeignKey ¶
func (*Model) DefineHidden ¶
func (*Model) DefineIndex ¶
func (*Model) DefinePrimaryKey ¶
func (*Model) DefineReference ¶
func (*Model) References ¶
type Reference ¶
func NewForeignKey ¶
type ReferenceValue ¶
* * *
type Rerences ¶
type Rerences func(references []*ReferenceValue)
Click to show internal directories.
Click to hide internal directories.