Versions in this module Expand all Collapse all v0 v0.9.3 Jun 14, 2019 v0.9.2 May 10, 2019 v0.9.0 Mar 6, 2019 Changes in this version + var ESAnalyzableFields = map[string]bool + var SupportedESFieldTypes = map[string]string + var SupportedFieldTypes = map[string]string + func Camel2Name(s string) string + func ToIds(bufName, typeName, name string) string + type ESIndex struct + Analyzer string + DateFormat string + DoAnalyze bool + DoIndex bool + Type string + func (e *ESIndex) IndexType() string + func (e *ESIndex) SetType(t string) error + func (e *ESIndex) ShouldAnalyze() bool + func (e *ESIndex) ShouldIndex() bool + func (e *ESIndex) TplMappingSettings() []TplESIndexMappingField + type Field struct + Attrs map[string]string + Comment string + ESIndex ESIndex + Flags orm.Set + Name string + Obj *MetaObject + Size int + Type string + Validator string + func NewField() *Field + func (f *Field) ColumnName() string + func (f *Field) FieldName() string + func (f *Field) GetNullSQLType() string + func (f *Field) GetTag() string + func (f *Field) GetTransform() *Transform + func (f *Field) GetTransformValue(prefix string) string + func (f *Field) GetType() string + func (f *Field) HasIndex() bool + func (f *Field) IsAutoIncrement() bool + func (f *Field) IsEncode() bool + func (f *Field) IsFullText() bool + func (f *Field) IsIndex() bool + func (f *Field) IsNeedTransform() bool + func (f *Field) IsNullable() bool + func (f *Field) IsNullablePrimitive() bool + func (f *Field) IsNumber() bool + func (f *Field) IsPrimary() bool + func (f *Field) IsRange() bool + func (f *Field) IsString() bool + func (f *Field) IsTime() bool + func (f *Field) IsUnique() bool + func (f *Field) NullSQLTypeNeedCast() bool + func (f *Field) NullSQLTypeValue() string + func (f *Field) Read(data map[interface{}]interface{}) error + func (f *Field) SQLColumn(driver string) string + func (f *Field) SQLDefault(driver string) string + func (f *Field) SQLName(driver string) string + func (f *Field) SQLNull(driver string) string + func (f *Field) SQLType(driver string) string + func (f *Field) SetType(t string) error + type Index struct + FieldNames []string + Fields []*Field + Name string + Obj *MetaObject + func NewIndex(obj *MetaObject) *Index + func (idx *Index) GetRelation(storetype, valuetype, modeltype string) *Relation + func (idx *Index) HasPrimaryKey() bool + func (idx *Index) LastField() *Field + type IndexArray []*Index + func (a IndexArray) Len() int + func (a IndexArray) Less(i, j int) bool + func (a IndexArray) Swap(i, j int) + type MetaObject struct + Db string + DbName string + DbTable string + DbView string + Dbs []string + ElasticIndexAll bool + GoPackage string + ImportSQL string + Name string + Package string + Relation *Relation + Tag string + func NewMetaObject(packageName string) *MetaObject + func ReadYaml(packageName string, yamlFile string) ([]*MetaObject, error) + func (m *MetaObject) Comment() string + func (m *MetaObject) ElasticIndexTypeName() string + func (o *MetaObject) DbContains(db string) bool + func (o *MetaObject) DbSource() string + func (o *MetaObject) FieldByName(name string) *Field + func (o *MetaObject) Fields() []*Field + func (o *MetaObject) FromDB() string + func (o *MetaObject) Indexes() []*Index + func (o *MetaObject) LastField() *Field + func (o *MetaObject) NoneIncrementFields() []*Field + func (o *MetaObject) PrimaryField() *Field + func (o *MetaObject) PrimaryKey() *PrimaryKey + func (o *MetaObject) Ranges() []*Index + func (o *MetaObject) Read(name string, data map[string]interface{}) error + func (o *MetaObject) Uniques() []*Index + type PrimaryKey struct + FieldNames []string + Fields []*Field + Name string + Obj *MetaObject + func NewPrimaryKey(obj *MetaObject) *PrimaryKey + func (pk *PrimaryKey) FirstField() *Field + func (pk *PrimaryKey) IsAutocrement() bool + func (pk *PrimaryKey) IsRange() bool + func (pk *PrimaryKey) IsSingleField() bool + func (pk *PrimaryKey) SQLColumn(driver string) string + type Relation struct + ModelType string + Name string + Obj *MetaObject + StoreType string + ValueField *Field + ValueType string + func NewRelation(obj *MetaObject) *Relation + func (r *Relation) DB() string + func (r *Relation) Fields() []*Field + func (r *Relation) NoneIncrementFields() []*Field + func (r *Relation) PrimaryField() *Field + func (r *Relation) PrimaryKey() *PrimaryKey + func (r *Relation) Read(data map[interface{}]interface{}) error + type TplESIndexMappingField struct + Field string + Value string + type Transform struct + ConvertBack string + ConvertTo string + TypeOrigin string + TypeTarget string