Files
mayfly-go/server/internal/db/infrastructure/persistence/db_sql_exec.go

28 lines
752 B
Go
Raw Normal View History

2022-09-09 18:26:08 +08:00
package persistence
import (
"mayfly-go/internal/db/domain/entity"
"mayfly-go/internal/db/domain/repository"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/model"
)
type dbSqlExecRepoImpl struct{}
func newDbSqlExecRepo() repository.DbSqlExec {
return new(dbSqlExecRepoImpl)
}
func (d *dbSqlExecRepoImpl) Insert(dse *entity.DbSqlExec) {
model.Insert(dse)
}
func (d *dbSqlExecRepoImpl) DeleteBy(condition *entity.DbSqlExec) {
biz.ErrIsNil(model.DeleteByCondition(condition), "删除sql执行记录失败")
}
// 分页获取
func (d *dbSqlExecRepoImpl) GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult {
2022-10-26 20:49:29 +08:00
return model.GetPage(pageParam, condition, condition, toEntity, orderBy...)
2022-09-09 18:26:08 +08:00
}