Documentation ¶
Index ¶
- Constants
- func DDLColumn(col *Column) string
- func DDLIndex(col *Column) string
- func DDLUniqueIndex(col *Column) string
- func Describe(db int, schema, model, filter string) et.Json
- func FunctionDef(linq *Linq, col *Column) string
- func GetAs(n int) string
- func Query(sql string, args ...any) (et.Items, error)
- func QueryData(sql string, args ...any) (et.Items, error)
- func QueryDataOne(sql string, args ...any) (et.Item, error)
- func QueryOne(sql string, args ...any) (et.Item, error)
- type Col
- type Column
- func (c *Column) As(linq *Linq) string
- func (c *Column) Cast(cast string) *Column
- func (c *Column) ColName() string
- func (c *Column) DDL() string
- func (c *Column) DDLIndex() string
- func (c *Column) DDLUniqueIndex() string
- func (c *Column) Def(linq *Linq) string
- func (c *Column) Describe() et.Json
- func (c *Column) Driver() string
- 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) ReferencesAdd(col *Column) int
- func (c *Column) ReferencesIdx(col *Column) int
- func (c *Column) Up() string
- func (c *Column) Valid(val any) error
- type Details
- type FRom
- type Join
- type Linq
- func (c *Linq) AddPrimaryKey(col *Column, val any)
- func (c *Linq) AddValidate(col *Column, val any)
- func (s *Linq) All() (et.Items, error)
- 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() (et.Items, error)
- func (c *Linq) CommandOne() (et.Item, error)
- func (s *Linq) Count() int
- func (c *Linq) Current() (et.Items, error)
- func (s *Linq) Data(sel ...any) *Linq
- func (c *Linq) Debug() *Linq
- func (c *Linq) Details(data *et.Json) *et.Json
- func (c *Linq) Dev() *Linq
- func (s *Linq) Find() (et.Items, error)
- func (s *Linq) First() (et.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 (s *Linq) Limit(limit int) (et.Items, error)
- func (s *Linq) List(page, rows int) (et.List, error)
- func (c *Linq) Or(where *Where) *Linq
- func (c *Linq) OrderBy(col *Column, sorted bool) *Linq
- func (s *Linq) Page(page, rows int) (et.Items, error)
- func (c *Linq) PrepareDelete() (et.Items, error)
- func (c *Linq) PrepareInsert() (et.Items, error)
- func (c *Linq) PrepareUpdate() (et.Items, error)
- func (c *Linq) PrepareUpsert() (et.Items, error)
- func (c *Linq) Query() (et.Items, error)
- func (c *Linq) QueryCount() int
- func (c *Linq) QueryOne() (et.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 (s *Linq) Select(sel ...any) *Linq
- func (c *Linq) SetAs(model *Model, as string) string
- func (c *Linq) SetFromAs(from *FRom) *FRom
- func (c *Linq) SetTp(tp int) *Linq
- 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) SqlKeys() 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 Listener
- 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 et.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) Data(sel ...any) *Linq
- func (c *Model) DefineAtrib(name, description, _type string, _default any) *Model
- func (c *Model) DefineCaption(thisKey, name, otherKey string, column *Column, _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(hiddens []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, showThisKey bool) *Model
- func (c *Model) DefineRequired(names []string) *Model
- func (c *Model) DefineUniqueIndex(index []string) *Model
- func (c *Model) Delete() *Linq
- func (c *Model) DeleteRow() *Linq
- func (c *Model) Describe() et.Json
- func (c *Model) Details(name, description string, _default any, details Details)
- func (c *Model) Driver() string
- func (c *Model) DropDDL() string
- func (c *Model) From() *Linq
- func (c *Model) IndexAdd(name string) int
- func (c *Model) IndexIdx(name string) int
- func (c *Model) Init() error
- func (c *Model) Insert(data et.Json) *Linq
- func (c *Model) InsertRow(data et.Json) *Linq
- func (c *Model) IntegrityAtrib(ok bool) *Model
- func (c *Model) IntegrityReference(ok bool) *Model
- func (c *Model) Low() string
- func (c *Model) Max(args ...any) *Column
- func (c *Model) Min(args ...any) *Column
- func (c *Model) Model() et.Json
- 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 et.Json) *Linq
- func (c *Model) UpdateRow(data et.Json) *Linq
- func (c *Model) Upsert(data et.Json) *Linq
- func (c *Model) UpsertRow(data et.Json) *Linq
- func (c *Model) UseRecycle() bool
- func (c *Model) UseSync() bool
- type OrderBy
- type Reference
- type SQL
- type Schema
- type Trigger
- type Validate
- 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 TpCaption = 4
View Source
const TpClone = 6
View Source
const TpColumn = 0
View Source
const TpData = 2
View Source
const TpDetail = 2
View Source
const TpField = 7
View Source
const TpFunction = 5
View Source
const TpReference = 3
View Source
const TpRow = 1
Variables ¶
This section is empty.
Functions ¶
func DDLUniqueIndex ¶ added in v0.0.79
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 References []*Column Indexed bool Unique bool Required bool RequiredMsg string PrimaryKey bool ForeignKey bool Hidden bool // contains filtered or unexported fields }
func NewVirtualAtrib ¶
func (*Column) DDLUniqueIndex ¶ added in v0.0.66
func (*Column) ReferencesAdd ¶ added in v0.0.104
func (*Column) ReferencesIdx ¶ added in v0.0.104
* * References *
type Linq ¶
* * *
func (*Linq) AddPrimaryKey ¶ added in v0.0.88
func (*Linq) AddValidate ¶ added in v0.0.69
func (*Linq) PrepareInsert ¶
* * Prepare command data *
func (*Linq) QueryCount ¶
func (*Linq) SqlCurrent ¶
func (*Linq) SqlGroupBy ¶
func (*Linq) SqlOrderBy ¶
type Model ¶
type Model struct { Db int Database *jdb.Db Name string Description string Define string Schema string Table string Definition []*Column PrimaryKeys []string ForeignKey []*Reference Index []string SourceField string DateMakeField string DateUpdateField string SerieField string CodeField string ProjectField string StateField string Ddl string UseDateMake bool UseDateUpdate bool UseState bool UseProject bool UseSource bool UseSerie bool BeforeInsert []Trigger AfterInsert []Trigger BeforeUpdate []Trigger AfterUpdate []Trigger BeforeDelete []Trigger AfterDelete []Trigger OnListener Listener Version int // contains filtered or unexported fields }
func (*Model) DDLMigration ¶ added in v0.0.29
func (*Model) DefineAtrib ¶
func (*Model) DefineCaption ¶ added in v0.0.104
func (*Model) DefineColum ¶
func (*Model) DefineField ¶
func (*Model) DefineForeignKey ¶
func (*Model) DefineHidden ¶
func (*Model) DefineIndex ¶
func (*Model) DefinePrimaryKey ¶
func (*Model) DefineReference ¶
func (*Model) DefineRequired ¶ added in v0.0.67
func (*Model) DefineUniqueIndex ¶ added in v0.0.66
func (*Model) IntegrityAtrib ¶
func (*Model) IntegrityReference ¶
func (*Model) UseRecycle ¶
type Reference ¶
func NewForeignKey ¶
type Schema ¶
type Where ¶
type Where struct { PrimaryKey *Validate // contains filtered or unexported fields }
func (*Where) SetPrimaryKey ¶ added in v0.0.88
Click to show internal directories.
Click to hide internal directories.