pgs

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HasSubDaoTypeID = "3b1ac788-78e2-4172-9fa2-709b021d7e12"
View Source
const NoticeDaoTypeID = "87ef34f7-6f7e-441c-959e-0505430d0bee"
View Source
const SubDaoTypeID = "6e3e5751-a618-410b-b06a-4ca960f2f4ac"

Variables

This section is empty.

Functions

func HasSubDaoTypeLives

func HasSubDaoTypeLives() []*dot.TypeLives

HasSubDaoTypeLives

func NoticeDaoTypeLives

func NoticeDaoTypeLives() []*dot.TypeLives

NoticeDaoTypeLives

func SubDaoTypeLives

func SubDaoTypeLives() []*dot.TypeLives

SubDaoTypeLives

Types

type HasSubDao

type HasSubDao struct {
	*pgs.DaoBase `dot:""`
}

func (*HasSubDao) Count

func (c *HasSubDao) Count(conn orm.DB, condition string, params ...interface{}) (count int, err error)

func (*HasSubDao) Delete

func (c *HasSubDao) Delete(conn orm.DB, m *model.HasSub) (err error)

if delete nothing, then return pg.ErrNoRows

func (*HasSubDao) DeleteByID

func (c *HasSubDao) DeleteByID(conn orm.DB, id string) (err error)

if delete nothing, then return pg.ErrNoRows

func (*HasSubDao) DeleteByIDs

func (c *HasSubDao) DeleteByIDs(conn orm.DB, ids []string, oneMax int) (err error)

if delete nothing, then return pg.ErrNoRows

func (*HasSubDao) DeleteReturn

func (c *HasSubDao) DeleteReturn(conn orm.DB, m *model.HasSub) (mnew *model.HasSub, err error)

if delete nothing, then return pg.ErrNoRows

func (*HasSubDao) GetByID

func (c *HasSubDao) GetByID(conn orm.DB, id string) (m *model.HasSub, err error)

func (*HasSubDao) GetByIDWithLock

func (c *HasSubDao) GetByIDWithLock(conn orm.DB, id string) (m *model.HasSub, err error)

if find nothing, return pg.ErrNoRows

func (*HasSubDao) GetLockByID

func (c *HasSubDao) GetLockByID(conn orm.DB, ids ...string) (ms []*model.HasSub, err error)

update before you must get OptimisticLockVersion value

func (*HasSubDao) GetLockByModelID

func (c *HasSubDao) GetLockByModelID(conn orm.DB, ms ...*model.HasSub) error

func (*HasSubDao) Insert

func (c *HasSubDao) Insert(conn orm.DB, m *model.HasSub) (err error)

if insert nothing, then return pg.ErrNoRows

func (*HasSubDao) InsertReturn

func (c *HasSubDao) InsertReturn(conn orm.DB, m *model.HasSub) (mnew *model.HasSub, err error)

if insert nothing, then return pg.ErrNoRows

func (*HasSubDao) List

func (c *HasSubDao) List(conn orm.DB) (ms []*model.HasSub, err error)

func (*HasSubDao) ListWithLock

func (c *HasSubDao) ListWithLock(conn orm.DB) (ms []*model.HasSub, err error)

if find nothing, return pg.ErrNoRows

func (*HasSubDao) Query

func (c *HasSubDao) Query(conn orm.DB, condition string, params ...interface{}) (ms []*model.HasSub, err error)

func (*HasSubDao) QueryOne

func (c *HasSubDao) QueryOne(conn orm.DB, condition string, params ...interface{}) (m *model.HasSub, err error)

func (*HasSubDao) QueryOneWithLock

func (c *HasSubDao) QueryOneWithLock(conn orm.DB, condition string, params ...interface{}) (m *model.HasSub, err error)

if find nothing, return pg.ErrNoRows

func (*HasSubDao) QueryPage

func (c *HasSubDao) QueryPage(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.HasSub, err error)

func (*HasSubDao) QueryPageWithCount

func (c *HasSubDao) QueryPageWithCount(
	conn orm.DB,
	pageSize,
	pageNum int,
	condition string,
	params ...interface{},
) (ms []*model.HasSub, count int, err error)

count counts valid records which after conditions filter, rather than whole table's count

func (*HasSubDao) QueryPageWithLock

func (c *HasSubDao) QueryPageWithLock(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.HasSub, err error)

if find nothing, return pg.ErrNoRows

func (*HasSubDao) QueryWithLock

func (c *HasSubDao) QueryWithLock(conn orm.DB, condition string, params ...interface{}) (ms []*model.HasSub, err error)

if find nothing, return pg.ErrNoRows

func (*HasSubDao) Update

func (c *HasSubDao) Update(conn orm.DB, m *model.HasSub) (err error)

if update nothing, then return pg.ErrNoRows

func (*HasSubDao) UpdateHasSubSomeColumn

func (c *HasSubDao) UpdateHasSubSomeColumn(conn orm.DB, ids []string) (err error)

example,please edit it update designated column with Optimistic Lock

func (*HasSubDao) UpdateReturn

func (c *HasSubDao) UpdateReturn(conn orm.DB, m *model.HasSub) (mnew *model.HasSub, err error)

if update nothing, then return pg.ErrNoRows

func (*HasSubDao) Upsert

func (c *HasSubDao) Upsert(conn orm.DB, m *model.HasSub) (err error)

if update nothing, then return pg.ErrNoRows

func (*HasSubDao) UpsertReturn

func (c *HasSubDao) UpsertReturn(conn orm.DB, m *model.HasSub) (mnew *model.HasSub, err error)

if update nothing, then return pg.ErrNoRows

type NoticeDao

type NoticeDao struct {
	*pgs.DaoBase `dot:""`
}

func (*NoticeDao) Count

func (c *NoticeDao) Count(conn orm.DB, condition string, params ...interface{}) (count int, err error)

func (*NoticeDao) Delete

func (c *NoticeDao) Delete(conn orm.DB, m *model.Notice) (err error)

if delete nothing, then return pg.ErrNoRows

func (*NoticeDao) DeleteByID

func (c *NoticeDao) DeleteByID(conn orm.DB, id string) (err error)

if delete nothing, then return pg.ErrNoRows

func (*NoticeDao) DeleteByIDs

func (c *NoticeDao) DeleteByIDs(conn orm.DB, ids []string, oneMax int) (err error)

if delete nothing, then return pg.ErrNoRows

func (*NoticeDao) DeleteReturn

func (c *NoticeDao) DeleteReturn(conn orm.DB, m *model.Notice) (mnew *model.Notice, err error)

if delete nothing, then return pg.ErrNoRows

func (*NoticeDao) GetByID

func (c *NoticeDao) GetByID(conn orm.DB, id string) (m *model.Notice, err error)

func (*NoticeDao) GetByIDWithLock

func (c *NoticeDao) GetByIDWithLock(conn orm.DB, id string) (m *model.Notice, err error)

if find nothing, return pg.ErrNoRows

func (*NoticeDao) GetLockByID

func (c *NoticeDao) GetLockByID(conn orm.DB, ids ...string) (ms []*model.Notice, err error)

update before you must get OptimisticLockVersion value

func (*NoticeDao) GetLockByModelID

func (c *NoticeDao) GetLockByModelID(conn orm.DB, ms ...*model.Notice) error

func (*NoticeDao) Insert

func (c *NoticeDao) Insert(conn orm.DB, m *model.Notice) (err error)

if insert nothing, then return pg.ErrNoRows

func (*NoticeDao) InsertReturn

func (c *NoticeDao) InsertReturn(conn orm.DB, m *model.Notice) (mnew *model.Notice, err error)

if insert nothing, then return pg.ErrNoRows

func (*NoticeDao) List

func (c *NoticeDao) List(conn orm.DB) (ms []*model.Notice, err error)

func (*NoticeDao) ListWithLock

func (c *NoticeDao) ListWithLock(conn orm.DB) (ms []*model.Notice, err error)

if find nothing, return pg.ErrNoRows

func (*NoticeDao) Query

func (c *NoticeDao) Query(conn orm.DB, condition string, params ...interface{}) (ms []*model.Notice, err error)

func (*NoticeDao) QueryOne

func (c *NoticeDao) QueryOne(conn orm.DB, condition string, params ...interface{}) (m *model.Notice, err error)

func (*NoticeDao) QueryOneWithLock

func (c *NoticeDao) QueryOneWithLock(conn orm.DB, condition string, params ...interface{}) (m *model.Notice, err error)

if find nothing, return pg.ErrNoRows

func (*NoticeDao) QueryPage

func (c *NoticeDao) QueryPage(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.Notice, err error)

func (*NoticeDao) QueryPageWithCount

func (c *NoticeDao) QueryPageWithCount(
	conn orm.DB,
	pageSize,
	pageNum int,
	condition string,
	params ...interface{},
) (ms []*model.Notice, count int, err error)

count counts valid records which after conditions filter, rather than whole table's count

func (*NoticeDao) QueryPageWithLock

func (c *NoticeDao) QueryPageWithLock(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.Notice, err error)

if find nothing, return pg.ErrNoRows

func (*NoticeDao) QueryWithLock

func (c *NoticeDao) QueryWithLock(conn orm.DB, condition string, params ...interface{}) (ms []*model.Notice, err error)

if find nothing, return pg.ErrNoRows

func (*NoticeDao) Update

func (c *NoticeDao) Update(conn orm.DB, m *model.Notice) (err error)

if update nothing, then return pg.ErrNoRows

func (*NoticeDao) UpdateNoticeSomeColumn

func (c *NoticeDao) UpdateNoticeSomeColumn(conn orm.DB, ids []string) (err error)

example,please edit it update designated column with Optimistic Lock

func (*NoticeDao) UpdateReturn

func (c *NoticeDao) UpdateReturn(conn orm.DB, m *model.Notice) (mnew *model.Notice, err error)

if update nothing, then return pg.ErrNoRows

func (*NoticeDao) Upsert

func (c *NoticeDao) Upsert(conn orm.DB, m *model.Notice) (err error)

if update nothing, then return pg.ErrNoRows

func (*NoticeDao) UpsertReturn

func (c *NoticeDao) UpsertReturn(conn orm.DB, m *model.Notice) (mnew *model.Notice, err error)

if update nothing, then return pg.ErrNoRows

type SubDao

type SubDao struct {
	*pgs.DaoBase `dot:""`
}

func (*SubDao) Count

func (c *SubDao) Count(conn orm.DB, condition string, params ...interface{}) (count int, err error)

func (*SubDao) Delete

func (c *SubDao) Delete(conn orm.DB, m *model.Sub) (err error)

if delete nothing, then return pg.ErrNoRows

func (*SubDao) DeleteByID

func (c *SubDao) DeleteByID(conn orm.DB, id string) (err error)

if delete nothing, then return pg.ErrNoRows

func (*SubDao) DeleteByIDs

func (c *SubDao) DeleteByIDs(conn orm.DB, ids []string, oneMax int) (err error)

if delete nothing, then return pg.ErrNoRows

func (*SubDao) DeleteReturn

func (c *SubDao) DeleteReturn(conn orm.DB, m *model.Sub) (mnew *model.Sub, err error)

if delete nothing, then return pg.ErrNoRows

func (*SubDao) GetByID

func (c *SubDao) GetByID(conn orm.DB, id string) (m *model.Sub, err error)

func (*SubDao) GetByIDWithLock

func (c *SubDao) GetByIDWithLock(conn orm.DB, id string) (m *model.Sub, err error)

if find nothing, return pg.ErrNoRows

func (*SubDao) GetLockByID

func (c *SubDao) GetLockByID(conn orm.DB, ids ...string) (ms []*model.Sub, err error)

update before you must get OptimisticLockVersion value

func (*SubDao) GetLockByModelID

func (c *SubDao) GetLockByModelID(conn orm.DB, ms ...*model.Sub) error

func (*SubDao) Insert

func (c *SubDao) Insert(conn orm.DB, m *model.Sub) (err error)

if insert nothing, then return pg.ErrNoRows

func (*SubDao) InsertReturn

func (c *SubDao) InsertReturn(conn orm.DB, m *model.Sub) (mnew *model.Sub, err error)

if insert nothing, then return pg.ErrNoRows

func (*SubDao) List

func (c *SubDao) List(conn orm.DB) (ms []*model.Sub, err error)

func (*SubDao) ListWithLock

func (c *SubDao) ListWithLock(conn orm.DB) (ms []*model.Sub, err error)

if find nothing, return pg.ErrNoRows

func (*SubDao) Query

func (c *SubDao) Query(conn orm.DB, condition string, params ...interface{}) (ms []*model.Sub, err error)

func (*SubDao) QueryOne

func (c *SubDao) QueryOne(conn orm.DB, condition string, params ...interface{}) (m *model.Sub, err error)

func (*SubDao) QueryOneWithLock

func (c *SubDao) QueryOneWithLock(conn orm.DB, condition string, params ...interface{}) (m *model.Sub, err error)

if find nothing, return pg.ErrNoRows

func (*SubDao) QueryPage

func (c *SubDao) QueryPage(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.Sub, err error)

func (*SubDao) QueryPageWithCount

func (c *SubDao) QueryPageWithCount(
	conn orm.DB,
	pageSize,
	pageNum int,
	condition string,
	params ...interface{},
) (ms []*model.Sub, count int, err error)

count counts valid records which after conditions filter, rather than whole table's count

func (*SubDao) QueryPageWithLock

func (c *SubDao) QueryPageWithLock(conn orm.DB, pageSize int, page int, condition string, params ...interface{}) (ms []*model.Sub, err error)

if find nothing, return pg.ErrNoRows

func (*SubDao) QueryWithLock

func (c *SubDao) QueryWithLock(conn orm.DB, condition string, params ...interface{}) (ms []*model.Sub, err error)

if find nothing, return pg.ErrNoRows

func (*SubDao) Update

func (c *SubDao) Update(conn orm.DB, m *model.Sub) (err error)

if update nothing, then return pg.ErrNoRows

func (*SubDao) UpdateReturn

func (c *SubDao) UpdateReturn(conn orm.DB, m *model.Sub) (mnew *model.Sub, err error)

if update nothing, then return pg.ErrNoRows

func (*SubDao) UpdateSubSomeColumn

func (c *SubDao) UpdateSubSomeColumn(conn orm.DB, ids []string) (err error)

example,please edit it update designated column with Optimistic Lock

func (*SubDao) Upsert

func (c *SubDao) Upsert(conn orm.DB, m *model.Sub) (err error)

if update nothing, then return pg.ErrNoRows

func (*SubDao) UpsertReturn

func (c *SubDao) UpsertReturn(conn orm.DB, m *model.Sub) (mnew *model.Sub, err error)

if update nothing, then return pg.ErrNoRows

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL