mysql_dao

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 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 ChatInviteParticipantsDAO

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

func NewChatInviteParticipantsDAO

func NewChatInviteParticipantsDAO(db *sqlx.DB) *ChatInviteParticipantsDAO

func (*ChatInviteParticipantsDAO) Delete added in v0.86.3

func (dao *ChatInviteParticipantsDAO) Delete(ctx context.Context, chat_id int64, user_id int64) (rowsAffected int64, err error)

Delete delete from chat_invite_participants where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) DeleteTx added in v0.86.3

func (dao *ChatInviteParticipantsDAO) DeleteTx(tx *sqlx.Tx, chat_id int64, user_id int64) (rowsAffected int64, err error)

DeleteTx delete from chat_invite_participants where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) Insert

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

Insert insert into chat_invite_participants(chat_id, link, user_id, requested, approved_by, date2) values (:chat_id, :link, :user_id, :requested, :approved_by, :date2) TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) InsertTx

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

InsertTx insert into chat_invite_participants(chat_id, link, user_id, requested, approved_by, date2) values (:chat_id, :link, :user_id, :requested, :approved_by, :date2) TODO(@benqi): sqlmap

func (dao *ChatInviteParticipantsDAO) SelectListByLink(ctx context.Context, link string, b int32) (rList []dataobject.ChatInviteParticipantsDO, err error)

SelectListByLink select id, chat_id, link, user_id, requested, approved_by, date2 from chat_invite_participants where link = :link and requested = :b TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) SelectListByLinkWithCB

func (dao *ChatInviteParticipantsDAO) SelectListByLinkWithCB(ctx context.Context, link string, b int32, cb func(i int, v *dataobject.ChatInviteParticipantsDO)) (rList []dataobject.ChatInviteParticipantsDO, err error)

SelectListByLinkWithCB select id, chat_id, link, user_id, requested, approved_by, date2 from chat_invite_participants where link = :link and requested = :b TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) SelectRecentRequestedList added in v0.90.1

func (dao *ChatInviteParticipantsDAO) SelectRecentRequestedList(ctx context.Context, chat_id int64) (rList []dataobject.ChatInviteParticipantsDO, err error)

SelectRecentRequestedList select id, chat_id, link, user_id, requested, approved_by, date2 from chat_invite_participants where chat_id = :chat_id and requested = 1 TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) SelectRecentRequestedListWithCB added in v0.90.1

func (dao *ChatInviteParticipantsDAO) SelectRecentRequestedListWithCB(ctx context.Context, chat_id int64, cb func(i int, v *dataobject.ChatInviteParticipantsDO)) (rList []dataobject.ChatInviteParticipantsDO, err error)

SelectRecentRequestedListWithCB select id, chat_id, link, user_id, requested, approved_by, date2 from chat_invite_participants where chat_id = :chat_id and requested = 1 TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) UpdateApprovedBy added in v0.90.1

func (dao *ChatInviteParticipantsDAO) UpdateApprovedBy(ctx context.Context, approved_by int64, chat_id int64, user_id int64) (rowsAffected int64, err error)

UpdateApprovedBy update chat_invite_participants set requested = 0, approved_by = :approved_by where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) UpdateApprovedByTx added in v0.90.1

func (dao *ChatInviteParticipantsDAO) UpdateApprovedByTx(tx *sqlx.Tx, approved_by int64, chat_id int64, user_id int64) (rowsAffected int64, err error)

update chat_invite_participants set requested = 0, approved_by = :approved_by where chat_id = :chat_id and user_id = :user_id UpdateApprovedByTx TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) UpdateChatId added in v0.90.1

func (dao *ChatInviteParticipantsDAO) UpdateChatId(ctx context.Context, chat_id int64, link string) (rowsAffected int64, err error)

UpdateChatId update chat_invite_participants set chat_id = :chat_id where link = :link TODO(@benqi): sqlmap

func (*ChatInviteParticipantsDAO) UpdateChatIdTx added in v0.90.1

func (dao *ChatInviteParticipantsDAO) UpdateChatIdTx(tx *sqlx.Tx, chat_id int64, link string) (rowsAffected int64, err error)

update chat_invite_participants set chat_id = :chat_id where link = :link UpdateChatIdTx TODO(@benqi): sqlmap

type ChatInvitesDAO

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

func NewChatInvitesDAO

func NewChatInvitesDAO(db *sqlx.DB) *ChatInvitesDAO
func (dao *ChatInvitesDAO) DeleteByLink(ctx context.Context, chat_id int64, link string) (rowsAffected int64, err error)

DeleteByLink delete from chat_invites where chat_id = :chat_id and link = :link TODO(@benqi): sqlmap

func (*ChatInvitesDAO) DeleteByLinkTx

func (dao *ChatInvitesDAO) DeleteByLinkTx(tx *sqlx.Tx, chat_id int64, link string) (rowsAffected int64, err error)

DeleteByLinkTx delete from chat_invites where chat_id = :chat_id and link = :link TODO(@benqi): sqlmap

func (*ChatInvitesDAO) DeleteByRevoked

func (dao *ChatInvitesDAO) DeleteByRevoked(ctx context.Context, chat_id int64, admin_id int64) (rowsAffected int64, err error)

DeleteByRevoked delete from chat_invites where chat_id = :chat_id and admin_id = :admin_id and revoked = 1 TODO(@benqi): sqlmap

func (*ChatInvitesDAO) DeleteByRevokedTx

func (dao *ChatInvitesDAO) DeleteByRevokedTx(tx *sqlx.Tx, chat_id int64, admin_id int64) (rowsAffected int64, err error)

DeleteByRevokedTx delete from chat_invites where chat_id = :chat_id and admin_id = :admin_id and revoked = 1 TODO(@benqi): sqlmap

func (*ChatInvitesDAO) Insert

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

Insert insert into chat_invites(chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2) values (:chat_id, :admin_id, :link, :permanent, :revoked, :request_needed, :start_date, :expire_date, :usage_limit, :usage2, :requested, :title, :date2) TODO(@benqi): sqlmap

func (*ChatInvitesDAO) InsertTx

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

InsertTx insert into chat_invites(chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2) values (:chat_id, :admin_id, :link, :permanent, :revoked, :request_needed, :start_date, :expire_date, :usage_limit, :usage2, :requested, :title, :date2) TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectAll added in v0.90.1

func (dao *ChatInvitesDAO) SelectAll(ctx context.Context) (rList []dataobject.ChatInvitesDO, err error)

SelectAll select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectAllWithCB added in v0.90.1

func (dao *ChatInvitesDAO) SelectAllWithCB(ctx context.Context, cb func(i int, v *dataobject.ChatInvitesDO)) (rList []dataobject.ChatInvitesDO, err error)

SelectAllWithCB select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites TODO(@benqi): sqlmap

func (dao *ChatInvitesDAO) SelectByLink(ctx context.Context, link string) (rValue *dataobject.ChatInvitesDO, err error)

SelectByLink select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites where link = :link TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectListByAdminId

func (dao *ChatInvitesDAO) SelectListByAdminId(ctx context.Context, chat_id int64, admin_id int64) (rList []dataobject.ChatInvitesDO, err error)

SelectListByAdminId select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites where chat_id = :chat_id and admin_id = :admin_id TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectListByAdminIdWithCB

func (dao *ChatInvitesDAO) SelectListByAdminIdWithCB(ctx context.Context, chat_id int64, admin_id int64, cb func(i int, v *dataobject.ChatInvitesDO)) (rList []dataobject.ChatInvitesDO, err error)

SelectListByAdminIdWithCB select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites where chat_id = :chat_id and admin_id = :admin_id TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectListByChatId

func (dao *ChatInvitesDAO) SelectListByChatId(ctx context.Context, chat_id int64) (rList []dataobject.ChatInvitesDO, err error)

SelectListByChatId select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatInvitesDAO) SelectListByChatIdWithCB

func (dao *ChatInvitesDAO) SelectListByChatIdWithCB(ctx context.Context, chat_id int64, cb func(i int, v *dataobject.ChatInvitesDO)) (rList []dataobject.ChatInvitesDO, err error)

SelectListByChatIdWithCB select id, chat_id, admin_id, link, permanent, revoked, request_needed, start_date, expire_date, usage_limit, usage2, requested, title, date2 from chat_invites where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatInvitesDAO) Update

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

Update update chat_invites set %s where chat_id = :chat_id and link = :link TODO(@benqi): sqlmap

func (*ChatInvitesDAO) UpdateTx

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

UpdateTx update chat_invites set %s where chat_id = :chat_id and link = :link TODO(@benqi): sqlmap

type ChatParticipantsDAO

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

func NewChatParticipantsDAO

func NewChatParticipantsDAO(db *sqlx.DB) *ChatParticipantsDAO

func (*ChatParticipantsDAO) Insert

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

Insert insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) InsertBulk

func (dao *ChatParticipantsDAO) InsertBulk(ctx context.Context, doList []*dataobject.ChatParticipantsDO) (lastInsertId, rowsAffected int64, err error)

InsertBulk insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) InsertBulkTx

func (dao *ChatParticipantsDAO) InsertBulkTx(tx *sqlx.Tx, doList []*dataobject.ChatParticipantsDO) (lastInsertId, rowsAffected int64, err error)

InsertBulkTx insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) InsertOrUpdate

func (dao *ChatParticipantsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.ChatParticipantsDO) (lastInsertId, rowsAffected int64, err error)

InsertOrUpdate insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) on duplicate key update participant_type = values(participant_type), inviter_user_id = values(inviter_user_id), link = values(link), invited_at = values(invited_at), is_bot = values(is_bot), state = 0, kicked_at = 0, left_at = 0, date2 = values(date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) InsertOrUpdateTx

func (dao *ChatParticipantsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.ChatParticipantsDO) (lastInsertId, rowsAffected int64, err error)

InsertOrUpdateTx insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) on duplicate key update participant_type = values(participant_type), inviter_user_id = values(inviter_user_id), link = values(link), invited_at = values(invited_at), is_bot = values(is_bot), state = 0, kicked_at = 0, left_at = 0, date2 = values(date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) InsertTx

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

InsertTx insert into chat_participants(chat_id, user_id, participant_type, link, inviter_user_id, invited_at, is_bot, date2) values (:chat_id, :user_id, :participant_type, :link, :inviter_user_id, :invited_at, :is_bot, :date2) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectByParticipantId

func (dao *ChatParticipantsDAO) SelectByParticipantId(ctx context.Context, chat_id int64, user_id int64) (rValue *dataobject.ChatParticipantsDO, err error)

SelectByParticipantId select id, chat_id, user_id, participant_type, link, inviter_user_id, invited_at, kicked_at, left_at, is_bot, state, date2 from chat_participants where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectChatParticipantIdList added in v0.86.3

func (dao *ChatParticipantsDAO) SelectChatParticipantIdList(ctx context.Context, chat_id int64) (rList []int64, err error)

SelectChatParticipantIdList select user_id from chat_participants where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectChatParticipantIdListWithCB added in v0.86.3

func (dao *ChatParticipantsDAO) SelectChatParticipantIdListWithCB(ctx context.Context, chat_id int64, cb func(i int, v int64)) (rList []int64, err error)

SelectChatParticipantIdListWithCB select user_id from chat_participants where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectList

func (dao *ChatParticipantsDAO) SelectList(ctx context.Context, chat_id int64) (rList []dataobject.ChatParticipantsDO, err error)

SelectList select id, chat_id, user_id, participant_type, link, inviter_user_id, invited_at, kicked_at, left_at, is_bot, state, date2 from chat_participants where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectListByParticipantIdList

func (dao *ChatParticipantsDAO) SelectListByParticipantIdList(ctx context.Context, chat_id int64, idList []int64) (rList []dataobject.ChatParticipantsDO, err error)

SelectListByParticipantIdList select id, chat_id, user_id, participant_type, link, inviter_user_id, invited_at, kicked_at, left_at, is_bot, state, date2 from chat_participants where chat_id = :chat_id and user_id in (:idList) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectListByParticipantIdListWithCB

func (dao *ChatParticipantsDAO) SelectListByParticipantIdListWithCB(ctx context.Context, chat_id int64, idList []int64, cb func(i int, v *dataobject.ChatParticipantsDO)) (rList []dataobject.ChatParticipantsDO, err error)

SelectListByParticipantIdListWithCB select id, chat_id, user_id, participant_type, link, inviter_user_id, invited_at, kicked_at, left_at, is_bot, state, date2 from chat_participants where chat_id = :chat_id and user_id in (:idList) TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectListWithCB

func (dao *ChatParticipantsDAO) SelectListWithCB(ctx context.Context, chat_id int64, cb func(i int, v *dataobject.ChatParticipantsDO)) (rList []dataobject.ChatParticipantsDO, err error)

SelectListWithCB select id, chat_id, user_id, participant_type, link, inviter_user_id, invited_at, kicked_at, left_at, is_bot, state, date2 from chat_participants where chat_id = :chat_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectMyAdminList

func (dao *ChatParticipantsDAO) SelectMyAdminList(ctx context.Context, user_id int64) (rList []int64, err error)

SelectMyAdminList select chat_id from chat_participants where user_id = :user_id and participant_type = 1 and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectMyAdminListWithCB

func (dao *ChatParticipantsDAO) SelectMyAdminListWithCB(ctx context.Context, user_id int64, cb func(i int, v int64)) (rList []int64, err error)

SelectMyAdminListWithCB select chat_id from chat_participants where user_id = :user_id and participant_type = 1 and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectMyAllList

func (dao *ChatParticipantsDAO) SelectMyAllList(ctx context.Context, user_id int64) (rList []int64, err error)

SelectMyAllList select chat_id from chat_participants where user_id = :user_id and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectMyAllListWithCB

func (dao *ChatParticipantsDAO) SelectMyAllListWithCB(ctx context.Context, user_id int64, cb func(i int, v int64)) (rList []int64, err error)

SelectMyAllListWithCB select chat_id from chat_participants where user_id = :user_id and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectUsersChatIdList

func (dao *ChatParticipantsDAO) SelectUsersChatIdList(ctx context.Context, idList []int64) (rList []dataobject.ChatParticipantsDO, err error)

SelectUsersChatIdList select chat_participants.chat_id as chat_id, chat_participants.user_id as user_id from chat_participants, chats where chat_participants.state = 0 and chat_participants.user_id in (:idList) and chats.id = chat_participants.chat_id and chats.deactivated = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) SelectUsersChatIdListWithCB

func (dao *ChatParticipantsDAO) SelectUsersChatIdListWithCB(ctx context.Context, idList []int64, cb func(i int, v *dataobject.ChatParticipantsDO)) (rList []dataobject.ChatParticipantsDO, err error)

SelectUsersChatIdListWithCB select chat_participants.chat_id as chat_id, chat_participants.user_id as user_id from chat_participants, chats where chat_participants.state = 0 and chat_participants.user_id in (:idList) and chats.id = chat_participants.chat_id and chats.deactivated = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) Update

func (dao *ChatParticipantsDAO) Update(ctx context.Context, participant_type int32, inviter_user_id int64, invited_at int64, is_bot bool, id int64) (rowsAffected int64, err error)

Update update chat_participants set participant_type = :participant_type, inviter_user_id = :inviter_user_id, invited_at = :invited_at, state = 0, kicked_at = 0, left_at = 0, is_bot = :is_bot where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateKicked

func (dao *ChatParticipantsDAO) UpdateKicked(ctx context.Context, kicked_at int64, id int64) (rowsAffected int64, err error)

UpdateKicked update chat_participants set kicked_at = :kicked_at, left_at = 0, state = 2 where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateKickedTx

func (dao *ChatParticipantsDAO) UpdateKickedTx(tx *sqlx.Tx, kicked_at int64, id int64) (rowsAffected int64, err error)

UpdateKickedTx update chat_participants set kicked_at = :kicked_at, left_at = 0, state = 2 where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateLeft

func (dao *ChatParticipantsDAO) UpdateLeft(ctx context.Context, left_at int64, id int64) (rowsAffected int64, err error)

UpdateLeft update chat_participants set kicked_at = 0, left_at = :left_at, state = 1 where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateLeftTx

func (dao *ChatParticipantsDAO) UpdateLeftTx(tx *sqlx.Tx, left_at int64, id int64) (rowsAffected int64, err error)

UpdateLeftTx update chat_participants set kicked_at = 0, left_at = :left_at, state = 1 where id = :id TODO(@benqi): sqlmap

func (dao *ChatParticipantsDAO) UpdateLink(ctx context.Context, link string, chat_id int64, user_id int64) (rowsAffected int64, err error)

UpdateLink update chat_participants set link = :link where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateLinkTx

func (dao *ChatParticipantsDAO) UpdateLinkTx(tx *sqlx.Tx, link string, chat_id int64, user_id int64) (rowsAffected int64, err error)

UpdateLinkTx update chat_participants set link = :link where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateLinkUsage

func (dao *ChatParticipantsDAO) UpdateLinkUsage(ctx context.Context, usage2 int32, chat_id int64, user_id int64) (rowsAffected int64, err error)

UpdateLinkUsage update chat_participants set usage2 = :usage2 where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateLinkUsageTx

func (dao *ChatParticipantsDAO) UpdateLinkUsageTx(tx *sqlx.Tx, usage2 int32, chat_id int64, user_id int64) (rowsAffected int64, err error)

UpdateLinkUsageTx update chat_participants set usage2 = :usage2 where chat_id = :chat_id and user_id = :user_id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateParticipantType

func (dao *ChatParticipantsDAO) UpdateParticipantType(ctx context.Context, participant_type int32, id int64) (rowsAffected int64, err error)

UpdateParticipantType update chat_participants set participant_type = :participant_type where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateParticipantTypeTx

func (dao *ChatParticipantsDAO) UpdateParticipantTypeTx(tx *sqlx.Tx, participant_type int32, id int64) (rowsAffected int64, err error)

UpdateParticipantTypeTx update chat_participants set participant_type = :participant_type where id = :id TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateStateByChatId

func (dao *ChatParticipantsDAO) UpdateStateByChatId(ctx context.Context, state int32, chat_id int64) (rowsAffected int64, err error)

UpdateStateByChatId update chat_participants set state = :state where chat_id = :chat_id and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateStateByChatIdTx

func (dao *ChatParticipantsDAO) UpdateStateByChatIdTx(tx *sqlx.Tx, state int32, chat_id int64) (rowsAffected int64, err error)

UpdateStateByChatIdTx update chat_participants set state = :state where chat_id = :chat_id and state = 0 TODO(@benqi): sqlmap

func (*ChatParticipantsDAO) UpdateTx

func (dao *ChatParticipantsDAO) UpdateTx(tx *sqlx.Tx, participant_type int32, inviter_user_id int64, invited_at int64, is_bot bool, id int64) (rowsAffected int64, err error)

UpdateTx update chat_participants set participant_type = :participant_type, inviter_user_id = :inviter_user_id, invited_at = :invited_at, state = 0, kicked_at = 0, left_at = 0, is_bot = :is_bot where id = :id TODO(@benqi): sqlmap

type ChatsDAO

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

func NewChatsDAO

func NewChatsDAO(db *sqlx.DB) *ChatsDAO

func (*ChatsDAO) Insert

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

Insert insert into chats(creator_user_id, access_hash, random_id, participant_count, title, about, default_banned_rights, `date`) values (:creator_user_id, :access_hash, :random_id, :participant_count, :title, :about, :default_banned_rights, :date) TODO(@benqi): sqlmap

func (*ChatsDAO) InsertTx

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

InsertTx insert into chats(creator_user_id, access_hash, random_id, participant_count, title, about, default_banned_rights, `date`) values (:creator_user_id, :access_hash, :random_id, :participant_count, :title, :about, :default_banned_rights, :date) TODO(@benqi): sqlmap

func (*ChatsDAO) SearchByQueryString added in v0.90.1

func (dao *ChatsDAO) SearchByQueryString(ctx context.Context, q string, limit int32) (rList []int64, err error)

SearchByQueryString select id from chats where title like :q limit :limit TODO(@benqi): sqlmap

func (*ChatsDAO) SearchByQueryStringWithCB added in v0.90.1

func (dao *ChatsDAO) SearchByQueryStringWithCB(ctx context.Context, q string, limit int32, cb func(i int, v int64)) (rList []int64, err error)

SearchByQueryStringWithCB select id from chats where title like :q limit :limit TODO(@benqi): sqlmap

func (*ChatsDAO) Select

func (dao *ChatsDAO) Select(ctx context.Context, id int64) (rValue *dataobject.ChatsDO, err error)

Select select id, creator_user_id, access_hash, participant_count, title, about, photo_id, default_banned_rights, migrated_to_id, migrated_to_access_hash, noforwards, available_reactions_type, available_reactions, deactivated, ttl_period, version, `date` from chats where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) SelectByIdList

func (dao *ChatsDAO) SelectByIdList(ctx context.Context, idList []int32) (rList []dataobject.ChatsDO, err error)

SelectByIdList select id, creator_user_id, access_hash, participant_count, title, about, photo_id, default_banned_rights, migrated_to_id, migrated_to_access_hash, noforwards, available_reactions_type, available_reactions, deactivated, ttl_period, version, `date` from chats where id in (:idList) TODO(@benqi): sqlmap

func (*ChatsDAO) SelectByIdListWithCB

func (dao *ChatsDAO) SelectByIdListWithCB(ctx context.Context, idList []int32, cb func(i int, v *dataobject.ChatsDO)) (rList []dataobject.ChatsDO, err error)

SelectByIdListWithCB select id, creator_user_id, access_hash, participant_count, title, about, photo_id, default_banned_rights, migrated_to_id, migrated_to_access_hash, noforwards, available_reactions_type, available_reactions, deactivated, ttl_period, version, `date` from chats where id in (:idList) TODO(@benqi): sqlmap

func (*ChatsDAO) SelectLastCreator

func (dao *ChatsDAO) SelectLastCreator(ctx context.Context, creator_user_id int64) (rValue *dataobject.ChatsDO, err error)

SelectLastCreator select id, creator_user_id, access_hash, participant_count, title, about, photo_id, default_banned_rights, migrated_to_id, migrated_to_access_hash, noforwards, available_reactions_type, available_reactions, deactivated, ttl_period, version, `date` from chats where creator_user_id = :creator_user_id order by `date` desc limit 1 TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateAbout

func (dao *ChatsDAO) UpdateAbout(ctx context.Context, about string, id int64) (rowsAffected int64, err error)

UpdateAbout update chats set about = :about where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateAboutTx

func (dao *ChatsDAO) UpdateAboutTx(tx *sqlx.Tx, about string, id int64) (rowsAffected int64, err error)

update chats set about = :about where id = :id UpdateAboutTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateAvailableReactions added in v0.86.2

func (dao *ChatsDAO) UpdateAvailableReactions(ctx context.Context, available_reactions_type int32, available_reactions string, id int64) (rowsAffected int64, err error)

UpdateAvailableReactions update chats set available_reactions_type = :available_reactions_type, available_reactions = :available_reactions where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateAvailableReactionsTx added in v0.86.2

func (dao *ChatsDAO) UpdateAvailableReactionsTx(tx *sqlx.Tx, available_reactions_type int32, available_reactions string, id int64) (rowsAffected int64, err error)

update chats set available_reactions_type = :available_reactions_type, available_reactions = :available_reactions where id = :id UpdateAvailableReactionsTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateDeactivated

func (dao *ChatsDAO) UpdateDeactivated(ctx context.Context, deactivated bool, id int64) (rowsAffected int64, err error)

UpdateDeactivated update chats set deactivated = :deactivated, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateDeactivatedTx

func (dao *ChatsDAO) UpdateDeactivatedTx(tx *sqlx.Tx, deactivated bool, id int64) (rowsAffected int64, err error)

update chats set deactivated = :deactivated, version = version + 1 where id = :id UpdateDeactivatedTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateDefaultBannedRights

func (dao *ChatsDAO) UpdateDefaultBannedRights(ctx context.Context, default_banned_rights int64, id int64) (rowsAffected int64, err error)

UpdateDefaultBannedRights update chats set default_banned_rights = :default_banned_rights, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateDefaultBannedRightsTx

func (dao *ChatsDAO) UpdateDefaultBannedRightsTx(tx *sqlx.Tx, default_banned_rights int64, id int64) (rowsAffected int64, err error)

update chats set default_banned_rights = :default_banned_rights, version = version + 1 where id = :id UpdateDefaultBannedRightsTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateMigratedTo

func (dao *ChatsDAO) UpdateMigratedTo(ctx context.Context, migrated_to_id int64, migrated_to_access_hash int64, id int64) (rowsAffected int64, err error)

UpdateMigratedTo update chats set migrated_to_id = :migrated_to_id, migrated_to_access_hash = :migrated_to_access_hash, participant_count = 0, deactivated = 1, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateMigratedToTx

func (dao *ChatsDAO) UpdateMigratedToTx(tx *sqlx.Tx, migrated_to_id int64, migrated_to_access_hash int64, id int64) (rowsAffected int64, err error)

update chats set migrated_to_id = :migrated_to_id, migrated_to_access_hash = :migrated_to_access_hash, participant_count = 0, deactivated = 1, version = version + 1 where id = :id UpdateMigratedToTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateNoforwards added in v0.86.3

func (dao *ChatsDAO) UpdateNoforwards(ctx context.Context, noforwards bool, id int64) (rowsAffected int64, err error)

UpdateNoforwards update chats set noforwards = :noforwards, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateNoforwardsTx added in v0.86.3

func (dao *ChatsDAO) UpdateNoforwardsTx(tx *sqlx.Tx, noforwards bool, id int64) (rowsAffected int64, err error)

update chats set noforwards = :noforwards, version = version + 1 where id = :id UpdateNoforwardsTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateParticipantCount

func (dao *ChatsDAO) UpdateParticipantCount(ctx context.Context, participant_count int32, id int64) (rowsAffected int64, err error)

UpdateParticipantCount update chats set participant_count = :participant_count, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateParticipantCountTx

func (dao *ChatsDAO) UpdateParticipantCountTx(tx *sqlx.Tx, participant_count int32, id int64) (rowsAffected int64, err error)

update chats set participant_count = :participant_count, version = version + 1 where id = :id UpdateParticipantCountTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdatePhotoId

func (dao *ChatsDAO) UpdatePhotoId(ctx context.Context, photo_id int64, id int64) (rowsAffected int64, err error)

UpdatePhotoId update chats set photo_id = :photo_id, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdatePhotoIdTx

func (dao *ChatsDAO) UpdatePhotoIdTx(tx *sqlx.Tx, photo_id int64, id int64) (rowsAffected int64, err error)

update chats set photo_id = :photo_id, version = version + 1 where id = :id UpdatePhotoIdTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateTTLPeriod added in v0.90.0

func (dao *ChatsDAO) UpdateTTLPeriod(ctx context.Context, ttl_period int32, id int64) (rowsAffected int64, err error)

UpdateTTLPeriod update chats set ttl_period = :ttl_period where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateTTLPeriodTx added in v0.90.0

func (dao *ChatsDAO) UpdateTTLPeriodTx(tx *sqlx.Tx, ttl_period int32, id int64) (rowsAffected int64, err error)

update chats set ttl_period = :ttl_period where id = :id UpdateTTLPeriodTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateTitle

func (dao *ChatsDAO) UpdateTitle(ctx context.Context, title string, id int64) (rowsAffected int64, err error)

UpdateTitle update chats set title = :title, version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateTitleTx

func (dao *ChatsDAO) UpdateTitleTx(tx *sqlx.Tx, title string, id int64) (rowsAffected int64, err error)

update chats set title = :title, version = version + 1 where id = :id UpdateTitleTx TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateVersion

func (dao *ChatsDAO) UpdateVersion(ctx context.Context, id int64) (rowsAffected int64, err error)

UpdateVersion update chats set version = version + 1 where id = :id TODO(@benqi): sqlmap

func (*ChatsDAO) UpdateVersionTx

func (dao *ChatsDAO) UpdateVersionTx(tx *sqlx.Tx, id int64) (rowsAffected int64, err error)

update chats set version = version + 1 where id = :id UpdateVersionTx TODO(@benqi): sqlmap

Jump to

Keyboard shortcuts

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