Documentation ¶
Index ¶
- Variables
- func CreateDimensions(args *ArgsCreateDimensions) (id int64, err error)
- func Init() (err error)
- func RemoveDimensions(id int64) (err error)
- func UpdateDimensions(args *ArgsUpdateDimensions) (err error)
- type ArgsCreateDimensions
- type ArgsGetDimensionsList
- type ArgsGetVals
- type ArgsUpdateDimensions
- type DataGetVals
- type FieldsDimensions
- func GetDimensionsAll() (dataList []FieldsDimensions, err error)
- func GetDimensionsByCode(code string) (data FieldsDimensions, err error)
- func GetDimensionsByID(id int64) (data FieldsDimensions, err error)
- func GetDimensionsList(args *ArgsGetDimensionsList) (dataList []FieldsDimensions, dataCount int64, err error)
- type FieldsVal
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //OpenSub 是否启动订阅 OpenSub = false )
Functions ¶
func CreateDimensions ¶ added in v5.2.38
func CreateDimensions(args *ArgsCreateDimensions) (id int64, err error)
CreateDimensions 创建维度
func RemoveDimensions ¶ added in v5.2.38
RemoveDimensions 删除维度
func UpdateDimensions ¶ added in v5.2.38
func UpdateDimensions(args *ArgsUpdateDimensions) (err error)
Types ¶
type ArgsCreateDimensions ¶ added in v5.2.38
type ArgsCreateDimensions struct { //编码 // 维度编码,用于程序内部识别 Code string `db:"code" json:"code" check:"des" min:"1" max:"50" index:"true" field_list:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true" field_search:"true" field_list:"true"` //描述 Des string `db:"des" json:"des" check:"des" min:"0" max:"500" empty:"true" field_search:"true"` //约定Extend字段名称 // 约定指标、指标值 // 例如:extend1 ExtendIndex string `db:"extend_index" json:"extendIndex" index:"true"` //所属表名称 TableName string `db:"table_name" json:"tableName" check:"des" min:"1" max:"50"` //字段名称 FieldName string `db:"field_name" json:"fieldName" check:"des" min:"1" max:"50"` }
ArgsCreateDimensions 创建维度参数
type ArgsGetDimensionsList ¶ added in v5.2.38
type ArgsGetDimensionsList struct { //分页 Pages CoreSQL2.ArgsPages `json:"pages"` //是否删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetDimensionsList 获取维度列表参数
type ArgsGetVals ¶ added in v5.2.38
type ArgsGetVals struct { //编码 // 维度编码,用于程序内部识别 Code string `db:"code" json:"code" check:"des" min:"1" max:"50"` //是否限制长度 Limit int64 `db:"limit" json:"limit"` }
ArgsGetVals 根据表关系获取维度的全部可选值参数
type ArgsUpdateDimensions ¶ added in v5.2.38
type ArgsUpdateDimensions struct { // ID ID int64 `db:"id" json:"id" check:"id" unique:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true" field_search:"true" field_list:"true"` //描述 Des string `db:"des" json:"des" check:"des" min:"0" max:"500" empty:"true" field_search:"true"` //约定Extend字段名称 // 约定指标、指标值 // 例如:extend1 ExtendIndex string `db:"extend_index" json:"extendIndex" index:"true"` //所属表名称 TableName string `db:"table_name" json:"tableName" check:"des" min:"1" max:"50"` //字段名称 FieldName string `db:"field_name" json:"fieldName" check:"des" min:"1" max:"50"` }
ArgsUpdateDimensions 更新维度
type DataGetVals ¶ added in v5.2.38
type DataGetVals struct { //维度值 Val string `db:"val" json:"val"` }
DataGetVals 根据表关系获取维度的全部可选值数据
func GetVals ¶ added in v5.2.38
func GetVals(args *ArgsGetVals) (dataList []DataGetVals, err error)
GetVals 根据表关系获取维度的全部可选值
type FieldsDimensions ¶
type FieldsDimensions struct { // ID ID int64 `db:"id" json:"id" check:"id" unique:"true"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0" index:"true"` //编码 // 维度编码,用于程序内部识别 Code string `db:"code" json:"code" check:"des" min:"1" max:"50" index:"true" field_list:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true" field_search:"true" field_list:"true"` //描述 Des string `db:"des" json:"des" check:"des" min:"0" max:"500" empty:"true" field_search:"true"` //约定Extend字段名称 // 约定指标、指标值 // 例如:extend1 ExtendIndex string `db:"extend_index" json:"extendIndex" index:"true"` //所属表名称 TableName string `db:"table_name" json:"tableName" check:"des" min:"1" max:"50"` //字段名称 FieldName string `db:"field_name" json:"fieldName" check:"des" min:"1" max:"50"` }
FieldsDimensions 维度定义
func GetDimensionsAll ¶ added in v5.2.38
func GetDimensionsAll() (dataList []FieldsDimensions, err error)
GetDimensionsAll 获取全部维度
func GetDimensionsByCode ¶ added in v5.2.38
func GetDimensionsByCode(code string) (data FieldsDimensions, err error)
GetDimensionsByCode 通过编码查询指定维度内容
func GetDimensionsByID ¶ added in v5.2.38
func GetDimensionsByID(id int64) (data FieldsDimensions, err error)
GetDimensionsByID 通过ID获取维度
func GetDimensionsList ¶ added in v5.2.38
func GetDimensionsList(args *ArgsGetDimensionsList) (dataList []FieldsDimensions, dataCount int64, err error)
GetDimensionsList 获取列表
type FieldsVal ¶ added in v5.2.39
type FieldsVal struct { // ID ID int64 `db:"id" json:"id" check:"id" unique:"true"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt" default:"now()"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt" default:"now()"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt" default:"0" index:"true"` //编码 // 维度编码,用于程序内部识别 Code string `db:"code" json:"code" check:"des" min:"1" max:"600" index:"true" field_search:"true" field_list:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"600" empty:"true" field_search:"true" field_list:"true"` }
FieldsVal 维度值定义 该结构体主要用于自定义的维度值枚举值定义,当维度没有定义来源表和字段,那么可使用本模块直接定义维度值
Click to show internal directories.
Click to hide internal directories.