mysql_dao

package
v0.90.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UsernameDAO

type UsernameDAO struct {
	// contains filtered or unexported fields
}

func NewUsernameDAO

func NewUsernameDAO(db *sqlx.DB) *UsernameDAO

func (*UsernameDAO) Delete

func (dao *UsernameDAO) Delete(ctx context.Context, username string) (rowsAffected int64, err error)

Delete delete from username where username = :username TODO(@benqi): sqlmap

func (*UsernameDAO) Delete2

func (dao *UsernameDAO) Delete2(ctx context.Context, peer_type int32, peer_id int64) (rowsAffected int64, err error)

Delete2 delete from username where peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) Delete2Tx

func (dao *UsernameDAO) Delete2Tx(tx *sqlx.Tx, peer_type int32, peer_id int64) (rowsAffected int64, err error)

Delete2Tx delete from username where peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) DeleteTx

func (dao *UsernameDAO) DeleteTx(tx *sqlx.Tx, username string) (rowsAffected int64, err error)

DeleteTx delete from username where username = :username TODO(@benqi): sqlmap

func (*UsernameDAO) Insert

func (dao *UsernameDAO) Insert(ctx context.Context, do *dataobject.UsernameDO) (lastInsertId, rowsAffected int64, err error)

Insert insert into username(peer_type, peer_id, username, deleted) values (:peer_type, :peer_id, :username, 0) TODO(@benqi): sqlmap

func (*UsernameDAO) InsertTx

func (dao *UsernameDAO) InsertTx(tx *sqlx.Tx, do *dataobject.UsernameDO) (lastInsertId, rowsAffected int64, err error)

InsertTx insert into username(peer_type, peer_id, username, deleted) values (:peer_type, :peer_id, :username, 0) TODO(@benqi): sqlmap

func (*UsernameDAO) SearchByQueryNotIdList

func (dao *UsernameDAO) SearchByQueryNotIdList(ctx context.Context, q2 string, id_list []int64, limit int32) (rList []dataobject.UsernameDO, err error)

SearchByQueryNotIdList select username, peer_type, peer_id from username where username like :q2 and peer_id not in (:id_list) limit :limit TODO(@benqi): sqlmap

func (*UsernameDAO) SearchByQueryNotIdListWithCB

func (dao *UsernameDAO) SearchByQueryNotIdListWithCB(ctx context.Context, q2 string, id_list []int64, limit int32, cb func(i int, v *dataobject.UsernameDO)) (rList []dataobject.UsernameDO, err error)

SearchByQueryNotIdListWithCB select username, peer_type, peer_id from username where username like :q2 and peer_id not in (:id_list) limit :limit TODO(@benqi): sqlmap

func (*UsernameDAO) SelectByChannelId

func (dao *UsernameDAO) SelectByChannelId(ctx context.Context, peer_id int64) (rValue *dataobject.UsernameDO, err error)

SelectByChannelId select peer_type, peer_id, username from username where peer_type = 4 and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) SelectByPeer

func (dao *UsernameDAO) SelectByPeer(ctx context.Context, peer_type int32, peer_id int64) (rValue *dataobject.UsernameDO, err error)

SelectByPeer select peer_type, peer_id, username from username where peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) SelectByUserId

func (dao *UsernameDAO) SelectByUserId(ctx context.Context, peer_id int64) (rValue *dataobject.UsernameDO, err error)

SelectByUserId select peer_type, peer_id, username from username where peer_type = 2 and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) SelectByUsername

func (dao *UsernameDAO) SelectByUsername(ctx context.Context, username string) (rValue *dataobject.UsernameDO, err error)

SelectByUsername select username, peer_type, peer_id, deleted from username where username = :username TODO(@benqi): sqlmap

func (*UsernameDAO) SelectList

func (dao *UsernameDAO) SelectList(ctx context.Context, nameList []string) (rList []dataobject.UsernameDO, err error)

SelectList select username, peer_type, peer_id from username where username in (:nameList) TODO(@benqi): sqlmap

func (*UsernameDAO) SelectListWithCB

func (dao *UsernameDAO) SelectListWithCB(ctx context.Context, nameList []string, cb func(i int, v *dataobject.UsernameDO)) (rList []dataobject.UsernameDO, err error)

SelectListWithCB select username, peer_type, peer_id from username where username in (:nameList) TODO(@benqi): sqlmap

func (*UsernameDAO) Update

func (dao *UsernameDAO) Update(ctx context.Context, cMap map[string]interface{}, username string) (rowsAffected int64, err error)

Update update username set %s where username = :username TODO(@benqi): sqlmap

func (*UsernameDAO) UpdateTx

func (dao *UsernameDAO) UpdateTx(tx *sqlx.Tx, cMap map[string]interface{}, username string) (rowsAffected int64, err error)

UpdateTx update username set %s where username = :username TODO(@benqi): sqlmap

func (*UsernameDAO) UpdateUsername

func (dao *UsernameDAO) UpdateUsername(ctx context.Context, username string, peer_type int32, peer_id int64) (rowsAffected int64, err error)

UpdateUsername update username set username = :username where peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap

func (*UsernameDAO) UpdateUsernameTx

func (dao *UsernameDAO) UpdateUsernameTx(tx *sqlx.Tx, username string, peer_type int32, peer_id int64) (rowsAffected int64, err error)

update username set username = :username where peer_type = :peer_type and peer_id = :peer_id UpdateUsernameTx TODO(@benqi): sqlmap

Jump to

Keyboard shortcuts

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