Documentation ¶
Index ¶
- Variables
- func GeneralQueryAs[T any](result *page.PageResult) *page.PageResult
- func InjectCmdRequest(s *CmdRequest)
- func InjectPageDbCmd(s *PageDbCmd)
- func InjectPageDbMeta(s *PageDbMeta)
- func InjectPageDbQuery(s *PageDbQuery)
- func InjectPageDbWebRequest(s *PageDbWebRequest)
- func InjectSubTableDto(s *SubTableDto)
- func LoadCmdRequest() baseiface.ISingleton
- func LoadPageDbCmd() baseiface.ISingleton
- func LoadPageDbMeta() baseiface.ISingleton
- func LoadPageDbQuery() baseiface.ISingleton
- func LoadPageDbWebRequest() baseiface.ISingleton
- func LoadSubTableDto() baseiface.ISingleton
- type AutoMigrateMeta
- type CmdRequest
- type IPagedbExecute
- type PageDbCmd
- type PageDbMeta
- type PageDbQuery
- type PageDbRequest
- func (self *PageDbRequest) Clear() *PageDbRequest
- func (self *PageDbRequest) Col2ColType(colType string, colName string) (reflect.Type, bool)
- func (self *PageDbRequest) Col2ColTypePtr(colType string, colName string) (reflect.Type, bool)
- func (self *PageDbRequest) CountMap() (int, error)
- func (self *PageDbRequest) CreateDbTableStru(meta *dbpkgdto.MetaTableDto) reflect.Value
- func (self *PageDbRequest) CreateDynacStru() reflect.Value
- func (self *PageDbRequest) CreateStatStru(groupFields string, statField ...string) any
- func (self *PageDbRequest) CreateTableStru() (reflect.Value, error)
- func (self *PageDbRequest) DefaultTableFields() *PageDbRequest
- func (self *PageDbRequest) FieldNames2SnakeCase()
- func (self *PageDbRequest) FindMap(result interface{}) error
- func (self *PageDbRequest) FindRecords(result *page.PageResult) *page.PageResult
- func (self *PageDbRequest) FindRecordsNew(result *page.PageResult) *page.PageResult
- func (self *PageDbRequest) FindTable() *gorm.DB
- func (self *PageDbRequest) GeneralQuery() *page.PageResult
- func (self *PageDbRequest) GeneralQueryAs(models any) *page.PageResult
- func (self *PageDbRequest) GeneralQueryDto() *page.PageResult
- func (self *PageDbRequest) GeneralQueryNew() *page.PageResult
- func (self *PageDbRequest) GeneralQueryPageui() *pageui.PageuiResult
- func (self *PageDbRequest) GeneralRows() *page.PageResult
- func (self *PageDbRequest) GeneralScanTable() *page.PageResult
- func (self *PageDbRequest) GeneralScanTable2Ui() *pageui.PageuiResult
- func (self *PageDbRequest) GeneralTakeTable() *page.PageResult
- func (self *PageDbRequest) GroupStat(groupFields string, statfields ...string) ([]map[string]any, error)
- func (self *PageDbRequest) GroupStat0(groupFields string, statfields ...string) ([]map[string]any, error)
- func (self *PageDbRequest) GroupStatBase(groupField, statfield string) (*dto.GroupResult, error)
- func (self *PageDbRequest) IfExistField(field string) bool
- func (self *PageDbRequest) IfSubTable() bool
- func (self *PageDbRequest) InitFields() *page.PageResult
- func (self *PageDbRequest) InitPage()
- func (self *PageDbRequest) MetadataFactroy() *service.MetadataFactroy
- func (self *PageDbRequest) MetadataPkey() *basedto.IchubResult
- func (self *PageDbRequest) MetadataQuery() *basedto.IchubResult
- func (self *PageDbRequest) MetadataQuery2PageResult() *page.PageResult
- func (self *PageDbRequest) Models() any
- func (self *PageDbRequest) NewSubTable() *PageDbRequest
- func (self *PageDbRequest) QueryMap() *page.PageResult
- func (self *PageDbRequest) QuerySubTable(records []map[string]interface{})
- func (self *PageDbRequest) RawSql(sql string, values ...any) *page.PageResult
- func (self *PageDbRequest) ScanRecords(db *gorm.DB, rows *sql.Rows) (any, error)
- func (self *PageDbRequest) ScanTable(dbentity any) (any, error)
- func (self *PageDbRequest) Select(sql string) *page.PageResult
- func (self *PageDbRequest) SetFieldsName(FieldsName string) *PageDbRequest
- func (self *PageDbRequest) SetMetadataFactroy(metadataFactroy *service.MetadataFactroy)
- func (self *PageDbRequest) SetModels(models any)
- func (self *PageDbRequest) SetPageCurrent(PageCurrent int) *PageDbRequest
- func (self *PageDbRequest) SetPageSize(PageSize int) *PageDbRequest
- func (self *PageDbRequest) SetTableName(TableName string) *PageDbRequest
- func (c *PageDbRequest) SetTabler(tabler schema.Tabler)
- func (self *PageDbRequest) SetTimeToInt(TimeToInt bool) *PageDbRequest
- func (self *PageDbRequest) Stat(statfields ...string) (map[string]any, error)
- func (self *PageDbRequest) StatBase(statfield string) (*dto.GroupResult, error)
- func (c *PageDbRequest) Tabler() schema.Tabler
- func (self *PageDbRequest) ValueOfPageRequest(that *PageDbRequest) *PageDbRequest
- func (self *PageDbRequest) WriteDaoFile() error
- type PageDbWebRequest
- func (self *PageDbWebRequest) AutoMeta(stru schema.Tabler) *PageDbWebRequest
- func (self *PageDbWebRequest) Cmd() *page.PageResult
- func (self *PageDbWebRequest) Execute() *page.PageResult
- func (self *PageDbWebRequest) FindById(pkeyValue any) *page.PageResult
- func (self *PageDbWebRequest) FindExecute() IPagedbExecute
- func (self *PageDbWebRequest) GeneralQuery() *page.PageResult
- func (self *PageDbWebRequest) GroupStat(groupFields, statFields string) *page.PageResult
- func (self *PageDbWebRequest) MakeMeta() error
- func (self *PageDbWebRequest) MetaQuery() *page.PageResult
- func (self *PageDbWebRequest) Query() *page.PageResult
- func (c *PageDbWebRequest) SetTabler(tabler schema.Tabler)
- func (self *PageDbWebRequest) Stat(statFields string) *page.PageResult
- type PagedbGroup
- func (self *PagedbGroup) CreateDbTableStru(meta *dbpkgdto.MetaTableDto) reflect.Value
- func (self *PagedbGroup) CreateDbTableStruMeta() reflect.Value
- func (self *PagedbGroup) CreateDbTableStruMetaOf(meta *AutoMigrateMeta) reflect.Value
- func (self *PagedbGroup) CreateStatStru(groupFields string, statField ...string) any
- func (self *PagedbGroup) CreateTableRecord() (any, error)
- func (self *PagedbGroup) CreateTableRecordMeta() any
- func (self *PagedbGroup) CreateTableStru() (reflect.Value, error)
- func (self *PagedbGroup) DbFindById(pkey any) (any, error)
- func (self *PagedbGroup) DbGroupStat(groupFields string, statfields ...string) ([]map[string]any, error)
- func (self *PagedbGroup) DbStat(statfield ...string) (map[string]any, error)
- func (self *PagedbGroup) DeleteById(pkeyValue any) error
- func (self *PagedbGroup) DeleteWhere() error
- func (self *PagedbGroup) FindMeta() *dbpkgdto.MetaTableDto
- func (self *PagedbGroup) FindPkName() string
- func (self *PagedbGroup) GeneralScanTable() *page.PageResult
- func (self *PagedbGroup) Init()
- func (self *PagedbGroup) Insert(entity any) (map[string]any, error)
- func (self *PagedbGroup) InsertEntity(entity baseiface.IbaseProxy) (any, error)
- func (self *PagedbGroup) InsertMap(record map[string]any) (map[string]any, error)
- func (self *PagedbGroup) Save(entity any, pk string, v any) (any, error)
- func (self *PagedbGroup) SetField(entity any, key *dbpkgdto.MetaGoField, value any) error
- func (c *PagedbGroup) SetTabler(tabler schema.Tabler)
- func (self *PagedbGroup) Update(entity any, pkeyValue any) (any, error)
- func (self *PagedbGroup) UpdateEntity(entity baseiface.IbaseProxy, pkeyValue any) (any, error)
- func (self *PagedbGroup) UpdateMap(record map[string]any, pkeyValue any) (any, error)
- func (self *PagedbGroup) UpdateNotNull(maps map[string]any, pkeyValue any) (any, error)
- func (self *PagedbGroup) Updates(record map[string]any, pkeyValue any) (any, error)
- type PagedbRequestModel
- func (self *PagedbRequestModel[T]) DeleteById(id int64, keys ...string) *pagemodel.IchubResult[T]
- func (self *PagedbRequestModel[T]) DeleteByIdOf(id int64, model *T, keys ...string) *pagemodel.IchubResult[T]
- func (self *PagedbRequestModel[T]) FindById(id int64, keys ...string) *pagemodel.IchubResult[T]
- func (self *PagedbRequestModel[T]) FindByIds(ids string, keys ...string) *pagemodel.PageResult[T]
- func (self *PagedbRequestModel[T]) GeneralQuery() *pagemodel.PageResult[T]
- func (self *PagedbRequestModel[T]) Insert(entity *T) error
- func (self *PagedbRequestModel[T]) Insert2Result(entity *T) *pagemodel.IchubResult[T]
- func (self *PagedbRequestModel[T]) Query() *pagemodel.PageResult[T]
- func (self *PagedbRequestModel[T]) Update(entity *T) error
- func (self *PagedbRequestModel[T]) Update2Result(entity *T) *pagemodel.IchubResult[T]
- type SubTableDto
Constants ¶
This section is empty.
Variables ¶
View Source
var ColTypNil = reflect.TypeOf(basedto.IchubResult{})
@Title 文件名称: page_db_request.go @Description 描述: PageDbRequest
@Author 作者: leijianming@163.com 时间(2024-02-21 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-21 22:38:21)
Functions ¶
func GeneralQueryAs ¶
func GeneralQueryAs[T any](result *page.PageResult) *page.PageResult
func FindBeanInst[T any]() T {
func InjectCmdRequest ¶
func InjectCmdRequest(s *CmdRequest)
func InjectPageDbCmd ¶
func InjectPageDbCmd(s *PageDbCmd)
func InjectPageDbMeta ¶
func InjectPageDbMeta(s *PageDbMeta)
func InjectPageDbQuery ¶
func InjectPageDbQuery(s *PageDbQuery)
func InjectPageDbWebRequest ¶
func InjectPageDbWebRequest(s *PageDbWebRequest)
func InjectSubTableDto ¶
func InjectSubTableDto(s *SubTableDto)
func LoadCmdRequest ¶
func LoadCmdRequest() baseiface.ISingleton
func LoadPageDbCmd ¶
func LoadPageDbCmd() baseiface.ISingleton
func LoadPageDbMeta ¶
func LoadPageDbMeta() baseiface.ISingleton
func LoadPageDbQuery ¶
func LoadPageDbQuery() baseiface.ISingleton
func LoadPageDbWebRequest ¶
func LoadPageDbWebRequest() baseiface.ISingleton
func LoadSubTableDto ¶
func LoadSubTableDto() baseiface.ISingleton
Types ¶
type AutoMigrateMeta ¶
func NewAutoMigrateMeta ¶
func NewAutoMigrateMeta() *AutoMigrateMeta
func (*AutoMigrateMeta) AddField ¶
func (self *AutoMigrateMeta) AddField(field string, fieldType string, fieldTag string)
func (*AutoMigrateMeta) FromStru ¶
func (self *AutoMigrateMeta) FromStru(stru schema.Tabler)
func (*AutoMigrateMeta) FromStruFilter ¶
func (self *AutoMigrateMeta) FromStruFilter(stru schema.Tabler, fields string)
fields f1,f2
func (*AutoMigrateMeta) Str2Garray ¶
func (self *AutoMigrateMeta) Str2Garray(fields string) *garray.Array
type CmdRequest ¶
type CmdRequest struct { basedto.BaseEntity PkeyValue any `json:"pkey_value,omitempty"` // map or struct Record map[string]any `json:"update_record,omitempty"` GroupFields string `json:"group_fields"` StatFields string `json:"stat_fields"` *AutoMigrateMeta `json:"auto_migrate_meta,omitempty"` }
func NewCmdRequest ¶
func NewCmdRequest() *CmdRequest
type IPagedbExecute ¶
type IPagedbExecute interface {
Execute(req *PageDbWebRequest) *page.PageResult
}
type PageDbCmd ¶
type PageDbCmd struct {
basedto.BaseEntitySingle
}
func NewPageDbCmd ¶
func NewPageDbCmd() *PageDbCmd
func (*PageDbCmd) Execute ¶
func (self *PageDbCmd) Execute(req *PageDbWebRequest) *page.PageResult
type PageDbMeta ¶
type PageDbMeta struct {
basedto.BaseEntitySingle
}
func NewPageDbMeta ¶
func NewPageDbMeta() *PageDbMeta
func (*PageDbMeta) AutoMigrateMeta ¶
func (self *PageDbMeta) AutoMigrateMeta(req *PageDbWebRequest, stru schema.Tabler) *PageDbMeta
func (*PageDbMeta) DbAutoMigrate ¶
func (self *PageDbMeta) DbAutoMigrate(req *PageDbWebRequest) *page.PageResult
func (*PageDbMeta) Execute ¶
func (self *PageDbMeta) Execute(req *PageDbWebRequest) *page.PageResult
type PageDbQuery ¶
type PageDbQuery struct {
basedto.BaseEntitySingle
}
func NewPageDbQuery ¶
func NewPageDbQuery() *PageDbQuery
func (*PageDbQuery) Execute ¶
func (self *PageDbQuery) Execute(req *PageDbWebRequest) *page.PageResult
type PageDbRequest ¶
type PageDbRequest struct { *page.PageRequest //表名 TableName string `json:"table_name"` //Pkey PkeyField string `json:"pkey_field"` //字段列表,分隔 FieldsName string `json:"fields_name"` //返回日期转为int64 TimeToInt bool `json:"time_to_int"` //ui request will format result2 standard! UiFlag bool `json:"ui_flag"` SubTable *SubTableDto `json:"-"` JoinTable *SubTableDto `json:"-"` UiReq bool `json:"ui_req"` // contains filtered or unexported fields }
通用表查询请求数据
func Default ¶
func Default() *PageDbRequest
func DefaultCms ¶
func DefaultCms() *PageDbRequest
func DefaultCockDb ¶
func DefaultCockDb() *PageDbRequest
func DefaultHub ¶
func DefaultHub() *PageDbRequest
func DefaultMedusa ¶
func DefaultMedusa() *PageDbRequest
func DefaultMysql ¶
func DefaultMysql() *PageDbRequest
func InnerDefault ¶
func InnerDefault() *PageDbRequest
func NewPageDbRequest ¶
func NewPageDbRequest(pageSize int) *PageDbRequest
func (*PageDbRequest) Clear ¶
func (self *PageDbRequest) Clear() *PageDbRequest
func (*PageDbRequest) Col2ColType ¶
func (*PageDbRequest) Col2ColTypePtr ¶
func (*PageDbRequest) CountMap ¶
func (self *PageDbRequest) CountMap() (int, error)
func (*PageDbRequest) CreateDbTableStru ¶
func (self *PageDbRequest) CreateDbTableStru(meta *dbpkgdto.MetaTableDto) reflect.Value
func (*PageDbRequest) CreateDynacStru ¶
func (self *PageDbRequest) CreateDynacStru() reflect.Value
func (*PageDbRequest) CreateStatStru ¶
func (self *PageDbRequest) CreateStatStru(groupFields string, statField ...string) any
func (*PageDbRequest) CreateTableStru ¶
func (self *PageDbRequest) CreateTableStru() (reflect.Value, error)
func (*PageDbRequest) DefaultTableFields ¶
func (self *PageDbRequest) DefaultTableFields() *PageDbRequest
func (*PageDbRequest) FieldNames2SnakeCase ¶
func (self *PageDbRequest) FieldNames2SnakeCase()
func (*PageDbRequest) FindMap ¶
func (self *PageDbRequest) FindMap(result interface{}) error
func (*PageDbRequest) FindRecords ¶
func (self *PageDbRequest) FindRecords(result *page.PageResult) *page.PageResult
func (*PageDbRequest) FindRecordsNew ¶
func (self *PageDbRequest) FindRecordsNew(result *page.PageResult) *page.PageResult
func (*PageDbRequest) FindTable ¶
func (self *PageDbRequest) FindTable() *gorm.DB
func (*PageDbRequest) GeneralQuery ¶
func (self *PageDbRequest) GeneralQuery() *page.PageResult
this.WriteDaoFile() pageResult.WriteDaoFile(this.TableName)
func (*PageDbRequest) GeneralQueryAs ¶
func (self *PageDbRequest) GeneralQueryAs(models any) *page.PageResult
func (*PageDbRequest) GeneralQueryDto ¶
func (self *PageDbRequest) GeneralQueryDto() *page.PageResult
func (*PageDbRequest) GeneralQueryNew ¶
func (self *PageDbRequest) GeneralQueryNew() *page.PageResult
func (*PageDbRequest) GeneralQueryPageui ¶
func (self *PageDbRequest) GeneralQueryPageui() *pageui.PageuiResult
func (*PageDbRequest) GeneralRows ¶
func (self *PageDbRequest) GeneralRows() *page.PageResult
func (*PageDbRequest) GeneralScanTable ¶
func (self *PageDbRequest) GeneralScanTable() *page.PageResult
func (*PageDbRequest) GeneralScanTable2Ui ¶
func (self *PageDbRequest) GeneralScanTable2Ui() *pageui.PageuiResult
func (*PageDbRequest) GeneralTakeTable ¶
func (self *PageDbRequest) GeneralTakeTable() *page.PageResult
func (*PageDbRequest) GroupStat0 ¶
func (*PageDbRequest) GroupStatBase ¶
func (self *PageDbRequest) GroupStatBase(groupField, statfield string) (*dto.GroupResult, error)
func (*PageDbRequest) IfExistField ¶
func (self *PageDbRequest) IfExistField(field string) bool
func (*PageDbRequest) IfSubTable ¶
func (self *PageDbRequest) IfSubTable() bool
func (*PageDbRequest) InitFields ¶
func (self *PageDbRequest) InitFields() *page.PageResult
func (*PageDbRequest) InitPage ¶
func (self *PageDbRequest) InitPage()
func (*PageDbRequest) MetadataFactroy ¶
func (self *PageDbRequest) MetadataFactroy() *service.MetadataFactroy
func (*PageDbRequest) MetadataPkey ¶
func (self *PageDbRequest) MetadataPkey() *basedto.IchubResult
func (*PageDbRequest) MetadataQuery ¶
func (self *PageDbRequest) MetadataQuery() *basedto.IchubResult
func (*PageDbRequest) MetadataQuery2PageResult ¶
func (self *PageDbRequest) MetadataQuery2PageResult() *page.PageResult
func (*PageDbRequest) Models ¶
func (self *PageDbRequest) Models() any
func (*PageDbRequest) NewSubTable ¶
func (self *PageDbRequest) NewSubTable() *PageDbRequest
func (*PageDbRequest) QueryMap ¶
func (self *PageDbRequest) QueryMap() *page.PageResult
func (*PageDbRequest) QuerySubTable ¶
func (self *PageDbRequest) QuerySubTable(records []map[string]interface{})
func (*PageDbRequest) RawSql ¶
func (self *PageDbRequest) RawSql(sql string, values ...any) *page.PageResult
func (*PageDbRequest) ScanRecords ¶
func (*PageDbRequest) Select ¶
func (self *PageDbRequest) Select(sql string) *page.PageResult
func (*PageDbRequest) SetFieldsName ¶
func (self *PageDbRequest) SetFieldsName(FieldsName string) *PageDbRequest
func (*PageDbRequest) SetMetadataFactroy ¶
func (self *PageDbRequest) SetMetadataFactroy(metadataFactroy *service.MetadataFactroy)
func (*PageDbRequest) SetModels ¶
func (self *PageDbRequest) SetModels(models any)
func (*PageDbRequest) SetPageCurrent ¶
func (self *PageDbRequest) SetPageCurrent(PageCurrent int) *PageDbRequest
func (*PageDbRequest) SetPageSize ¶
func (self *PageDbRequest) SetPageSize(PageSize int) *PageDbRequest
func (*PageDbRequest) SetTableName ¶
func (self *PageDbRequest) SetTableName(TableName string) *PageDbRequest
func (*PageDbRequest) SetTabler ¶
func (c *PageDbRequest) SetTabler(tabler schema.Tabler)
func (*PageDbRequest) SetTimeToInt ¶
func (self *PageDbRequest) SetTimeToInt(TimeToInt bool) *PageDbRequest
func (*PageDbRequest) Stat ¶
func (self *PageDbRequest) Stat(statfields ...string) (map[string]any, error)
var sql = `select groupFields, sum(statField) ,max(statField),count(statField) ,
min(statField),count(statField) ,avg(statField) from ` + self.TableName
func (*PageDbRequest) StatBase ¶
func (self *PageDbRequest) StatBase(statfield string) (*dto.GroupResult, error)
func (*PageDbRequest) Tabler ¶
func (c *PageDbRequest) Tabler() schema.Tabler
func (*PageDbRequest) ValueOfPageRequest ¶
func (self *PageDbRequest) ValueOfPageRequest(that *PageDbRequest) *PageDbRequest
func (*PageDbRequest) WriteDaoFile ¶
func (self *PageDbRequest) WriteDaoFile() error
type PageDbWebRequest ¶
type PageDbWebRequest struct { basedto.BaseEntity *PagedbGroup CmdCatagory int `json:"cmd_catagory"` CmdType int `json:"cmd_type"` }
func DefaultWebRequest ¶
func DefaultWebRequest() *PageDbWebRequest
func FindBeanPageDbWebRequest ¶
func FindBeanPageDbWebRequest() *PageDbWebRequest
FindBeanPageDbWebRequest
func NewPageDbWebRequest ¶
func NewPageDbWebRequest() *PageDbWebRequest
func (*PageDbWebRequest) AutoMeta ¶
func (self *PageDbWebRequest) AutoMeta(stru schema.Tabler) *PageDbWebRequest
func (*PageDbWebRequest) Cmd ¶
func (self *PageDbWebRequest) Cmd() *page.PageResult
func (*PageDbWebRequest) Execute ¶
func (self *PageDbWebRequest) Execute() *page.PageResult
func (*PageDbWebRequest) FindById ¶
func (self *PageDbWebRequest) FindById(pkeyValue any) *page.PageResult
func (*PageDbWebRequest) FindExecute ¶
func (self *PageDbWebRequest) FindExecute() IPagedbExecute
func (*PageDbWebRequest) GeneralQuery ¶
func (self *PageDbWebRequest) GeneralQuery() *page.PageResult
func (*PageDbWebRequest) GroupStat ¶
func (self *PageDbWebRequest) GroupStat(groupFields, statFields string) *page.PageResult
func (*PageDbWebRequest) MakeMeta ¶
func (self *PageDbWebRequest) MakeMeta() error
func (*PageDbWebRequest) MetaQuery ¶
func (self *PageDbWebRequest) MetaQuery() *page.PageResult
func (*PageDbWebRequest) Query ¶
func (self *PageDbWebRequest) Query() *page.PageResult
func (*PageDbWebRequest) SetTabler ¶
func (c *PageDbWebRequest) SetTabler(tabler schema.Tabler)
func (*PageDbWebRequest) Stat ¶
func (self *PageDbWebRequest) Stat(statFields string) *page.PageResult
type PagedbGroup ¶
type PagedbGroup struct { *PageDbRequest *CmdRequest // contains filtered or unexported fields }
func DefaultDbGroup ¶
func DefaultDbGroup() *PagedbGroup
func NewPagedbGroup ¶
func NewPagedbGroup() *PagedbGroup
func (*PagedbGroup) CreateDbTableStru ¶
func (self *PagedbGroup) CreateDbTableStru(meta *dbpkgdto.MetaTableDto) reflect.Value
func (*PagedbGroup) CreateDbTableStruMeta ¶
func (self *PagedbGroup) CreateDbTableStruMeta() reflect.Value
func (*PagedbGroup) CreateDbTableStruMetaOf ¶
func (self *PagedbGroup) CreateDbTableStruMetaOf(meta *AutoMigrateMeta) reflect.Value
func (*PagedbGroup) CreateStatStru ¶
func (self *PagedbGroup) CreateStatStru(groupFields string, statField ...string) any
func (*PagedbGroup) CreateTableRecord ¶
func (self *PagedbGroup) CreateTableRecord() (any, error)
func (*PagedbGroup) CreateTableRecordMeta ¶
func (self *PagedbGroup) CreateTableRecordMeta() any
func (*PagedbGroup) CreateTableStru ¶
func (self *PagedbGroup) CreateTableStru() (reflect.Value, error)
func (*PagedbGroup) DbFindById ¶
func (self *PagedbGroup) DbFindById(pkey any) (any, error)
func (*PagedbGroup) DbGroupStat ¶
func (*PagedbGroup) DbStat ¶
func (self *PagedbGroup) DbStat(statfield ...string) (map[string]any, error)
var sql = `select groupFields, sum(statField) ,max(statField),count(statField) ,
min(statField),count(statField) ,avg(statField) from ` + self.TableName
func (*PagedbGroup) DeleteById ¶
func (self *PagedbGroup) DeleteById(pkeyValue any) error
func (*PagedbGroup) DeleteWhere ¶
func (self *PagedbGroup) DeleteWhere() error
func (*PagedbGroup) FindMeta ¶
func (self *PagedbGroup) FindMeta() *dbpkgdto.MetaTableDto
func (*PagedbGroup) FindPkName ¶
func (self *PagedbGroup) FindPkName() string
func (*PagedbGroup) GeneralScanTable ¶
func (self *PagedbGroup) GeneralScanTable() *page.PageResult
func (*PagedbGroup) Init ¶
func (self *PagedbGroup) Init()
func (*PagedbGroup) InsertEntity ¶
func (self *PagedbGroup) InsertEntity(entity baseiface.IbaseProxy) (any, error)
func (*PagedbGroup) SetField ¶
func (self *PagedbGroup) SetField(entity any, key *dbpkgdto.MetaGoField, value any) error
func (*PagedbGroup) SetTabler ¶
func (c *PagedbGroup) SetTabler(tabler schema.Tabler)
func (*PagedbGroup) Update ¶
func (self *PagedbGroup) Update(entity any, pkeyValue any) (any, error)
func (*PagedbGroup) UpdateEntity ¶
func (self *PagedbGroup) UpdateEntity(entity baseiface.IbaseProxy, pkeyValue any) (any, error)
func (*PagedbGroup) UpdateNotNull ¶
type PagedbRequestModel ¶
type PagedbRequestModel[T any] struct { *PageDbRequest }
func DefaultModel ¶
func DefaultModel[T any]() *PagedbRequestModel[T]
func DefaultModelCockdb ¶
func DefaultModelCockdb[T any]() *PagedbRequestModel[T]
func DefaultModelMedusa ¶
func DefaultModelMedusa[T any]() *PagedbRequestModel[T]
func DefaultModelMysql ¶
func DefaultModelMysql[T any]() *PagedbRequestModel[T]
func NewPagedbRequestModel ¶
func NewPagedbRequestModel[T any]() *PagedbRequestModel[T]
func (*PagedbRequestModel[T]) DeleteById ¶
func (self *PagedbRequestModel[T]) DeleteById(id int64, keys ...string) *pagemodel.IchubResult[T]
func (*PagedbRequestModel[T]) DeleteByIdOf ¶
func (self *PagedbRequestModel[T]) DeleteByIdOf(id int64, model *T, keys ...string) *pagemodel.IchubResult[T]
func (*PagedbRequestModel[T]) FindById ¶
func (self *PagedbRequestModel[T]) FindById(id int64, keys ...string) *pagemodel.IchubResult[T]
func (*PagedbRequestModel[T]) FindByIds ¶
func (self *PagedbRequestModel[T]) FindByIds(ids string, keys ...string) *pagemodel.PageResult[T]
func (*PagedbRequestModel[T]) GeneralQuery ¶
func (self *PagedbRequestModel[T]) GeneralQuery() *pagemodel.PageResult[T]
func (*PagedbRequestModel[T]) Insert ¶
func (self *PagedbRequestModel[T]) Insert(entity *T) error
func (*PagedbRequestModel[T]) Insert2Result ¶
func (self *PagedbRequestModel[T]) Insert2Result(entity *T) *pagemodel.IchubResult[T]
func (*PagedbRequestModel[T]) Query ¶
func (self *PagedbRequestModel[T]) Query() *pagemodel.PageResult[T]
func (*PagedbRequestModel[T]) Update ¶
func (self *PagedbRequestModel[T]) Update(entity *T) error
func (*PagedbRequestModel[T]) Update2Result ¶
func (self *PagedbRequestModel[T]) Update2Result(entity *T) *pagemodel.IchubResult[T]
type SubTableDto ¶
type SubTableDto struct { basedto.BaseEntity TableName string `json:"table_name"` FieldsName string `json:"fields_name"` PageSize int `json:"page_size"` JoinKeys map[string]string `json:"join_keys"` }
func NewSubTableDto ¶
func NewSubTableDto() *SubTableDto
Source Files ¶
- AutoMigrateMeta.go
- cmd_request.go
- cmd_request_init.go
- ipagedb_execute.go
- page_db_cmd.go
- page_db_cmd_init.go
- page_db_meta.go
- page_db_meta_init.go
- page_db_query.go
- page_db_query_init.go
- page_db_request.go
- page_db_web_request.go
- page_db_web_request_init.go
- pagedb_group.go
- pagedb_request_model.go
- sub_table_dto.go
- sub_table_dto_init.go
Click to show internal directories.
Click to hide internal directories.