Documentation ¶
Index ¶
Constants ¶
View Source
const ( INDEX_TYPE_UNIQUE = 1 //唯一索引 INDEX_TYPE_PRIMAEY = 2 //主键 INDEX_TYPE_GENERAL = 3 // 普通索引 INDEX_TYPE_BACKGROUP_UNIQUE = 4 //mogon特殊,唯一,且后台生产索引 INDEX_TYPE_BACKGROUP = 5 //mogon特殊,后台生产索引 )
View Source
const ( DI_MYSQL string = "mysql" DI_MONGO string = "mongodb" DI_REDIS string = "redis" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DI ¶
type DI interface { GetIncID(cName string) (int64, error) Insert(cName string, data interface{}) (int, error) InsertMuti(cName string, data ...interface{}) error UpdateByCondition(cName string, data, condiction interface{}) error GetOneByCondition(cName string, fields []string, condiction interface{}, result interface{}) error GetMutilByCondition(cName string, fields []string, condiction interface{}, result interface{}, sort string, start, limit int) error GetCntByCondition(cName string, condiction interface{}) (int, error) DelByCondition(cName string, condiction interface{}) error HasTable(cName string) (bool, error) ExecSql(cmd interface{}) error Index(cName string, index *Index) error DropTable(cName string) error HasFields(cName, field string) (bool, error) AddColumn(cName string, column *Column) error ModifyColumn(cName, oldName, newColumn string) error DropColumn(cName, field string) error CreateTable(sql string) error GetType() string Open() error Close() GetSession() interface{} }
DI define storage interface
Click to show internal directories.
Click to hide internal directories.