Documentation ¶
Index ¶
- type BaseDao
- func (this *BaseDao) CreateModelObject() BaseModelInterface
- func (this *BaseDao) CreateModelSlice(len int, cap int) interface{}
- func (this *BaseDao) DeleteByFilter(col string, val interface{}) error
- func (this *BaseDao) DeleteOneById(id interface{}) error
- func (this *BaseDao) FindOneByFilter(col string, val interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error)
- func (this *BaseDao) FindOneByFilters(colVals map[string]interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error)
- func (this *BaseDao) FindOneById(id interface{}) (BaseModelInterface, error)
- func (this *BaseDao) FindOneBySql(selSql string, val ...interface{}) (ret BaseModelInterface, e error)
- func (this *BaseDao) Insert(ob BaseModelInterface, structColsParams ...*pkReflect.StructSelCols) error
- func (this *BaseDao) SelectSelSqlList(partSql string, pageable *beans.Pageable, userData interface{}, ...) (resultListPointer interface{}, total int64, e error)
- func (this *BaseDao) UpdateByFilter(ob BaseModelInterface, col string, val interface{}, ...) error
- func (this *BaseDao) UpdateById(ob BaseModelInterface, id interface{}, ...) error
- type BaseDaoInterface
- type BaseModel
- type BaseModelInterface
- type ListRawHelper
- func (this *ListRawHelper) SelSqlListQuery(selSql string, resultListPointer interface{}) (total int64, e error)
- func (this *ListRawHelper) SetCondArrEqu(condKey string, valueType ValueType, dbKeys ...string)
- func (this *ListRawHelper) SetCondArrLike(condKey string, dbKeys ...string)
- func (this *ListRawHelper) SetCondArrParam(condKey string, trueLikeFalseEqual bool, valueType ValueType, dbKeys ...string)
- type OrmAdapterInterface
- type SelectListCallback
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDao ¶
type BaseDao struct { ObjModel BaseModelInterface ObjType reflect.Type OrmAdapter OrmAdapterInterface }
func (*BaseDao) CreateModelObject ¶
func (this *BaseDao) CreateModelObject() BaseModelInterface
func (*BaseDao) CreateModelSlice ¶
func (*BaseDao) DeleteByFilter ¶
func (*BaseDao) DeleteOneById ¶
func (*BaseDao) FindOneByFilter ¶
func (this *BaseDao) FindOneByFilter(col string, val interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error)
func (*BaseDao) FindOneByFilters ¶
func (this *BaseDao) FindOneByFilters(colVals map[string]interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error)
func (*BaseDao) FindOneById ¶
func (this *BaseDao) FindOneById(id interface{}) (BaseModelInterface, error)
func (*BaseDao) FindOneBySql ¶
func (this *BaseDao) FindOneBySql(selSql string, val ...interface{}) (ret BaseModelInterface, e error)
func (*BaseDao) Insert ¶
func (this *BaseDao) Insert(ob BaseModelInterface, structColsParams ...*pkReflect.StructSelCols) error
func (*BaseDao) SelectSelSqlList ¶
func (*BaseDao) UpdateByFilter ¶
func (this *BaseDao) UpdateByFilter(ob BaseModelInterface, col string, val interface{}, structColsParams ...*pkReflect.StructSelCols) error
func (*BaseDao) UpdateById ¶
func (this *BaseDao) UpdateById(ob BaseModelInterface, id interface{}, structColsParams ...*pkReflect.StructSelCols) error
type BaseDaoInterface ¶
type BaseDaoInterface interface { CreateModelObject() BaseModelInterface CreateModelSlice(len int, cap int) interface{} // create type is: *[]BaseModel FindOneById(id interface{}) (BaseModelInterface, error) FindOneByFilter(col string, val interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error) FindOneByFilters(colVals map[string]interface{}, structColsParams ...*pkReflect.StructSelCols) (BaseModelInterface, error) FindOneBySql(selSql string, val ...interface{}) (BaseModelInterface, error) UpdateByFilter(ob BaseModelInterface, col string, val interface{}, structColsParams ...*pkReflect.StructSelCols) error UpdateById(ob BaseModelInterface, id interface{}, structColsParams ...*pkReflect.StructSelCols) error Insert(ob BaseModelInterface, structColsParams ...*pkReflect.StructSelCols) error SelectSelSqlList(partSql string, pageable *beans.Pageable, userData interface{}, cb SelectListCallback) (resultListPointer interface{}, total int64, e error) DeleteOneById(id interface{}) error DeleteByFilter(col string, val interface{}) error }
func CreateBaseDao ¶
func CreateBaseDao(v BaseModelInterface, ormAdapters ...OrmAdapterInterface) (dao BaseDaoInterface)
type BaseModel ¶
type BaseModel struct { }
func (*BaseModel) FilterValue ¶
func (this *BaseModel) FilterValue()
type BaseModelInterface ¶
type ListRawHelper ¶
type ListRawHelper struct { OrmAdapter OrmAdapterInterface Pageable *beans.Pageable Where string WhereArgs []interface{} ObjModel BaseModelInterface UserData interface{} }
func (*ListRawHelper) SelSqlListQuery ¶
func (this *ListRawHelper) SelSqlListQuery(selSql string, resultListPointer interface{}) (total int64, e error)
func (*ListRawHelper) SetCondArrEqu ¶
func (this *ListRawHelper) SetCondArrEqu(condKey string, valueType ValueType, dbKeys ...string)
func (*ListRawHelper) SetCondArrLike ¶
func (this *ListRawHelper) SetCondArrLike(condKey string, dbKeys ...string)
func (*ListRawHelper) SetCondArrParam ¶
func (this *ListRawHelper) SetCondArrParam(condKey string, trueLikeFalseEqual bool, valueType ValueType, dbKeys ...string)
type OrmAdapterInterface ¶
type OrmAdapterInterface interface { RegModel(model BaseModelInterface) ExecSql(sql string, val ...interface{}) error QueryOneBySql(outputRecord interface{}, sql string, val ...interface{}) error QueryBySql(outputRecords interface{}, sql string, val ...interface{}) error SqlInArg(arg interface{}) interface{} SqlReturnSql() string SqlLimitStyle() string }
var DefaultOrmAdapter OrmAdapterInterface
type SelectListCallback ¶
type SelectListCallback func(listRawHelper *ListRawHelper) error
Click to show internal directories.
Click to hide internal directories.