Versions in this module Expand all Collapse all v1 v1.0.1 Dec 15, 2022 v1.0.0 Jan 14, 2022 Changes in this version + var NullTypes = map[string]string + var SupportedFieldTypes = map[string]string + var Tpl *template.Template + func DbToGoType(colType string) string + func ToStringSlice(val []interface{}) (result []string) + type Field struct + AsSort bool + Attrs map[string]string + Comment string + Decimal int + Default string + DefaultValue string + FK *ForeignKey + Flags set.Set + Index string + Key string + Label string + Name string + Obj *Obj + Order string + PlaceHolder string + Remark string + Size int + Tag string + Type string + Widget string + func (f *Field) ArgName() string + func (f *Field) AsArgName(prefix string) string + func (f *Field) AttrsContains(attr string) bool + func (f *Field) BJTag() string + func (f *Field) BsonTagName() string + func (f *Field) DbName() string + func (f *Field) DisableAutoInc() bool + func (f *Field) Foreign() string + func (f *Field) ForeignType() string + func (f *Field) GetGoType() string + func (f *Field) GetNullSQLType() string + func (f *Field) GetTag() string + func (f *Field) GetThriftType() string + func (f *Field) GetTransformType() *Transform + func (f *Field) HasBindData() bool + func (f *Field) HasDefaultValue() bool + func (f *Field) HasDisable() bool + func (f *Field) HasEnums() bool + func (f *Field) HasForeign() bool + func (f *Field) HasHidden() bool + func (f *Field) HasIndex() bool + func (f *Field) HasMeta() bool + func (f *Field) HasReadOnly() bool + func (f *Field) HasRule() bool + func (f *Field) HasStringList() bool + func (f *Field) IsAutoInc() bool + func (f *Field) IsNeedTransform() bool + func (f *Field) IsNullable() bool + func (f *Field) IsNullablePrimitive() bool + func (f *Field) IsRequired() bool + func (f *Field) IsUnique() bool + func (f *Field) MysqlCreation() string + func (f *Field) NullSQLTypeNeedCast() bool + func (f *Field) NullSQLTypeValue() string + func (f *Field) Read(data map[interface{}]interface{}) error + type ForeignKey struct + Field string + Tbl string + func NewForeignKey(name string) *ForeignKey + type Index struct + FieldNames []string + Fields []*Field + IsSparse bool + IsUnique bool + Name string + func (i *Index) CanUseFindIn() bool + func (i *Index) CanUseFindList() bool + func (i *Index) GetFieldList() string + func (i *Index) GetFindInIds(idx int, bufName, name string) string + func (i *Index) GetFirstField() *Field + func (i *Index) GetFuncParam() string + func (i *Index) GetFuncParamIn() string + func (i *Index) GetFuncParamNames(prefixs ...string) string + func (i *Index) GetFuncParamOriNames() string + func (i *Index) IsFindInType(field *Field) bool + func (i *Index) MysqlCreation(obj *Obj) string + type ListedField struct + Key string + ObjField string + ObjName string + type Obj struct + Comment string + Db string + DbName string + Dbs []string + Extend string + FieldNameMap map[string]*Field + Fields []*Field + FilterFields []string + GoPackage string + ImportSQL string + Indexes []*Index + ModelType string + Name string + Package string + SearchIndex string + SearchType string + StoreType string + Table string + TplWriter io.Writer + ValueField *Field + ValueType string + func (o *Obj) DbContains(db string) bool + func (o *Obj) DbSwitch(db string) bool + func (o *Obj) GetAllNamesAsArgs(prefix string) []string + func (o *Obj) GetByFields(f []*Field) []string + func (o *Obj) GetConfigTemplates() []string + func (o *Obj) GetFieldNameWithDB(name string) string + func (o *Obj) GetFieldNames() []string + func (o *Obj) GetFieldNamesAsArgs(prefix string) []string + func (o *Obj) GetFilterFields() []*Field + func (o *Obj) GetForeignKeys() []*Field + func (o *Obj) GetFormImports() (imports []string) + func (o *Obj) GetGenTypes() []string + func (o *Obj) GetListedFields() []*ListedField + func (o *Obj) GetNonIDFields() []*Field + func (o *Obj) GetNonIdFieldNames() []string + func (o *Obj) GetOrmImports() (imports []string) + func (o *Obj) GetPrimaryKey() *Field + func (o *Obj) GetPrimaryKeyName() string + func (o *Obj) GetStringFilterFields() []*Field + func (o *Obj) GetTimeFields() []*Field + func (o *Obj) HasTimeFields() bool + func (o *Obj) LoadField(f *Field) string + func (o *Obj) LoadTpl(tpl string) string + func (o *Obj) NeedIndex() bool + func (o *Obj) NeedMapping() bool + func (o *Obj) NeedOrm() bool + func (o *Obj) NeedSearch() bool + func (o *Obj) Read(data map[string]interface{}) error + type Transform struct + ConvertBack string + ConvertTo string + TypeOrigin string + TypeTarget string Other modules containing this package github.com/ezbuy/ezorm/v2