Documentation ¶
Index ¶
- type BotCommandsDAO
- func (dao *BotCommandsDAO) Delete(ctx context.Context, bot_id int64) (rowsAffected int64, err error)
- func (dao *BotCommandsDAO) DeleteTx(tx *sqlx.Tx, bot_id int64) (rowsAffected int64, err error)
- func (dao *BotCommandsDAO) InsertBulk(ctx context.Context, doList []*dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *BotCommandsDAO) InsertBulkTx(tx *sqlx.Tx, doList []*dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *BotCommandsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *BotCommandsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *BotCommandsDAO) SelectList(ctx context.Context, bot_id int64) (rList []dataobject.BotCommandsDO, err error)
- func (dao *BotCommandsDAO) SelectListByIdList(ctx context.Context, id_list []int32) (rList []dataobject.BotCommandsDO, err error)
- func (dao *BotCommandsDAO) SelectListByIdListWithCB(ctx context.Context, id_list []int32, ...) (rList []dataobject.BotCommandsDO, err error)
- func (dao *BotCommandsDAO) SelectListWithCB(ctx context.Context, bot_id int64, cb func(i int, v *dataobject.BotCommandsDO)) (rList []dataobject.BotCommandsDO, err error)
- type BotsDAO
- func (dao *BotsDAO) Select(ctx context.Context, bot_id int64) (rValue *dataobject.BotsDO, err error)
- func (dao *BotsDAO) SelectByIdList(ctx context.Context, id_list []int32) (rList []dataobject.BotsDO, err error)
- func (dao *BotsDAO) SelectByIdListWithCB(ctx context.Context, id_list []int32, cb func(i int, v *dataobject.BotsDO)) (rList []dataobject.BotsDO, err error)
- func (dao *BotsDAO) SelectByToken(ctx context.Context, token string) (rValue int64, err error)
- type ImportedContactsDAO
- func (dao *ImportedContactsDAO) Delete(ctx context.Context, user_id int64, imported_user_id int64) (rowsAffected int64, err error)
- func (dao *ImportedContactsDAO) DeleteTx(tx *sqlx.Tx, user_id int64, imported_user_id int64) (rowsAffected int64, err error)
- func (dao *ImportedContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.ImportedContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *ImportedContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.ImportedContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *ImportedContactsDAO) SelectAllList(ctx context.Context, user_id int64) (rList []dataobject.ImportedContactsDO, err error)
- func (dao *ImportedContactsDAO) SelectAllListWithCB(ctx context.Context, user_id int64, ...) (rList []dataobject.ImportedContactsDO, err error)
- func (dao *ImportedContactsDAO) SelectList(ctx context.Context, user_id int64) (rList []dataobject.ImportedContactsDO, err error)
- func (dao *ImportedContactsDAO) SelectListByImportedList(ctx context.Context, user_id int64, idList []int64) (rList []dataobject.ImportedContactsDO, err error)
- func (dao *ImportedContactsDAO) SelectListByImportedListWithCB(ctx context.Context, user_id int64, idList []int64, ...) (rList []dataobject.ImportedContactsDO, err error)
- func (dao *ImportedContactsDAO) SelectListWithCB(ctx context.Context, user_id int64, ...) (rList []dataobject.ImportedContactsDO, err error)
- type PhoneBooksDAO
- type PopularContactsDAO
- func (dao *PopularContactsDAO) IncreaseImporters(ctx context.Context, phone string) (rowsAffected int64, err error)
- func (dao *PopularContactsDAO) IncreaseImportersList(ctx context.Context, phoneList []string) (rowsAffected int64, err error)
- func (dao *PopularContactsDAO) IncreaseImportersListTx(tx *sqlx.Tx, phoneList []string) (rowsAffected int64, err error)
- func (dao *PopularContactsDAO) IncreaseImportersTx(tx *sqlx.Tx, phone string) (rowsAffected int64, err error)
- func (dao *PopularContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.PopularContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *PopularContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.PopularContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *PopularContactsDAO) SelectImporters(ctx context.Context, phone string) (rValue *dataobject.PopularContactsDO, err error)
- func (dao *PopularContactsDAO) SelectImportersList(ctx context.Context, phoneList []string) (rList []dataobject.PopularContactsDO, err error)
- func (dao *PopularContactsDAO) SelectImportersListWithCB(ctx context.Context, phoneList []string, ...) (rList []dataobject.PopularContactsDO, err error)
- type PredefinedUsersDAO
- func (dao *PredefinedUsersDAO) Delete(ctx context.Context, phone string) (rowsAffected int64, err error)
- func (dao *PredefinedUsersDAO) DeleteTx(tx *sqlx.Tx, phone string) (rowsAffected int64, err error)
- func (dao *PredefinedUsersDAO) Insert(ctx context.Context, do *dataobject.PredefinedUsersDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *PredefinedUsersDAO) InsertTx(tx *sqlx.Tx, do *dataobject.PredefinedUsersDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *PredefinedUsersDAO) SelectByPhone(ctx context.Context, phone string) (rValue *dataobject.PredefinedUsersDO, err error)
- func (dao *PredefinedUsersDAO) SelectPredefinedUsersAll(ctx context.Context) (rList []dataobject.PredefinedUsersDO, err error)
- func (dao *PredefinedUsersDAO) SelectPredefinedUsersAllWithCB(ctx context.Context, cb func(i int, v *dataobject.PredefinedUsersDO)) (rList []dataobject.PredefinedUsersDO, err error)
- func (dao *PredefinedUsersDAO) Update(ctx context.Context, cMap map[string]interface{}, phone string) (rowsAffected int64, err error)
- func (dao *PredefinedUsersDAO) UpdateTx(tx *sqlx.Tx, cMap map[string]interface{}, phone string) (rowsAffected int64, err error)
- type UnregisteredContactsDAO
- func (dao *UnregisteredContactsDAO) DeleteContacts(ctx context.Context, id_list []int64) (rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) DeleteContactsTx(tx *sqlx.Tx, id_list []int64) (rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) DeleteImportersByPhone(ctx context.Context, phone string) (rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) DeleteImportersByPhoneTx(tx *sqlx.Tx, phone string) (rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UnregisteredContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UnregisteredContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) SelectImportersByPhone(ctx context.Context, phone string) (rList []dataobject.UnregisteredContactsDO, err error)
- func (dao *UnregisteredContactsDAO) SelectImportersByPhoneWithCB(ctx context.Context, phone string, ...) (rList []dataobject.UnregisteredContactsDO, err error)
- func (dao *UnregisteredContactsDAO) UpdateContactName(ctx context.Context, import_first_name string, import_last_name string, ...) (rowsAffected int64, err error)
- func (dao *UnregisteredContactsDAO) UpdateContactNameTx(tx *sqlx.Tx, import_first_name string, import_last_name string, id int64) (rowsAffected int64, err error)
- type UserContactsDAO
- func (dao *UserContactsDAO) DeleteContacts(ctx context.Context, owner_user_id int64, id_list []int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) DeleteContactsTx(tx *sqlx.Tx, owner_user_id int64, id_list []int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserContactsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserContactsDAO) SelectAllUserContacts(ctx context.Context, owner_user_id int64) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectAllUserContactsWithCB(ctx context.Context, owner_user_id int64, ...) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectByContactId(ctx context.Context, owner_user_id int64, contact_user_id int64) (rValue *dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectContact(ctx context.Context, owner_user_id int64, contact_user_id int64) (rValue *dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByIdList(ctx context.Context, owner_user_id int64, id_list []int64) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByIdListWithCB(ctx context.Context, owner_user_id int64, id_list []int64, ...) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByOwnerListAndContactList(ctx context.Context, idList1 []int64, idList2 []int64) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByOwnerListAndContactListWithCB(ctx context.Context, idList1 []int64, idList2 []int64, ...) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByPhoneList(ctx context.Context, owner_user_id int64, phoneList []string) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectListByPhoneListWithCB(ctx context.Context, owner_user_id int64, phoneList []string, ...) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectUserContacts(ctx context.Context, owner_user_id int64) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) SelectUserContactsWithCB(ctx context.Context, owner_user_id int64, ...) (rList []dataobject.UserContactsDO, err error)
- func (dao *UserContactsDAO) UpdateContactName(ctx context.Context, contact_first_name string, contact_last_name string, ...) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdateContactNameById(ctx context.Context, contact_first_name string, contact_last_name string, ...) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdateContactNameByIdTx(tx *sqlx.Tx, contact_first_name string, contact_last_name string, id int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdateContactNameTx(tx *sqlx.Tx, contact_first_name string, contact_last_name string, ...) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdateMutual(ctx context.Context, mutual bool, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdateMutualTx(tx *sqlx.Tx, mutual bool, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdatePhoneByContactId(ctx context.Context, contact_phone string, contact_user_id int64) (rowsAffected int64, err error)
- func (dao *UserContactsDAO) UpdatePhoneByContactIdTx(tx *sqlx.Tx, contact_phone string, contact_user_id int64) (rowsAffected int64, err error)
- type UserGlobalPrivacySettingsDAO
- func (dao *UserGlobalPrivacySettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserGlobalPrivacySettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserGlobalPrivacySettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserGlobalPrivacySettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserGlobalPrivacySettingsDAO) Select(ctx context.Context, user_id int64) (rValue *dataobject.UserGlobalPrivacySettingsDO, err error)
- type UserNotifySettingsDAO
- func (dao *UserNotifySettingsDAO) DeleteAll(ctx context.Context, user_id int64) (rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) DeleteAllTx(tx *sqlx.Tx, user_id int64) (rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserNotifySettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) InsertOrUpdateExt(ctx context.Context, userId int64, peerType int32, peerId int64, ...) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) InsertOrUpdateExtTx(tx *sqlx.Tx, userId int64, peerType int32, peerId int64, ...) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserNotifySettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserNotifySettingsDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserNotifySettingsDO, err error)
- func (dao *UserNotifySettingsDAO) SelectAll(ctx context.Context, user_id int64) (rList []dataobject.UserNotifySettingsDO, err error)
- func (dao *UserNotifySettingsDAO) SelectAllWithCB(ctx context.Context, user_id int64, ...) (rList []dataobject.UserNotifySettingsDO, err error)
- func (dao *UserNotifySettingsDAO) SelectList(ctx context.Context, userId int64, ...) (rList []dataobject.UserNotifySettingsDO, err error)
- type UserPeerBlocksDAO
- func (dao *UserPeerBlocksDAO) Delete(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
- func (dao *UserPeerBlocksDAO) DeleteTx(tx *sqlx.Tx, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
- func (dao *UserPeerBlocksDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserPeerBlocksDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPeerBlocksDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserPeerBlocksDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPeerBlocksDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserPeerBlocksDO, err error)
- func (dao *UserPeerBlocksDAO) SelectList(ctx context.Context, user_id int64, limit int32) (rList []dataobject.UserPeerBlocksDO, err error)
- func (dao *UserPeerBlocksDAO) SelectListByIdList(ctx context.Context, user_id int64, idList []int64) (rList []int64, err error)
- func (dao *UserPeerBlocksDAO) SelectListByIdListWithCB(ctx context.Context, user_id int64, idList []int64, cb func(i int, v int64)) (rList []int64, err error)
- func (dao *UserPeerBlocksDAO) SelectListWithCB(ctx context.Context, user_id int64, limit int32, ...) (rList []dataobject.UserPeerBlocksDO, err error)
- type UserPeerSettingsDAO
- func (dao *UserPeerSettingsDAO) Delete(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
- func (dao *UserPeerSettingsDAO) DeleteTx(tx *sqlx.Tx, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
- func (dao *UserPeerSettingsDAO) InsertIgnore(ctx context.Context, do *dataobject.UserPeerSettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPeerSettingsDAO) InsertIgnoreTx(tx *sqlx.Tx, do *dataobject.UserPeerSettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPeerSettingsDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserPeerSettingsDO, err error)
- func (dao *UserPeerSettingsDAO) Update(ctx context.Context, cMap map[string]interface{}, user_id int64, ...) (rowsAffected int64, err error)
- func (dao *UserPeerSettingsDAO) UpdateTx(tx *sqlx.Tx, cMap map[string]interface{}, user_id int64, peer_type int32, ...) (rowsAffected int64, err error)
- type UserPresencesDAO
- func (dao *UserPresencesDAO) Insert(ctx context.Context, do *dataobject.UserPresencesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPresencesDAO) InsertTx(tx *sqlx.Tx, do *dataobject.UserPresencesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPresencesDAO) Select(ctx context.Context, user_id int64) (rValue *dataobject.UserPresencesDO, err error)
- func (dao *UserPresencesDAO) SelectList(ctx context.Context, idList []int64) (rList []dataobject.UserPresencesDO, err error)
- func (dao *UserPresencesDAO) SelectListWithCB(ctx context.Context, idList []int64, ...) (rList []dataobject.UserPresencesDO, err error)
- func (dao *UserPresencesDAO) UpdateLastSeenAt(ctx context.Context, last_seen_at int64, expires int32, user_id int64) (rowsAffected int64, err error)
- func (dao *UserPresencesDAO) UpdateLastSeenAtTx(tx *sqlx.Tx, last_seen_at int64, expires int32, user_id int64) (rowsAffected int64, err error)
- type UserPrivaciesDAO
- func (dao *UserPrivaciesDAO) InsertBulk(ctx context.Context, doList []*dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPrivaciesDAO) InsertBulkTx(tx *sqlx.Tx, doList []*dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPrivaciesDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPrivaciesDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserPrivaciesDAO) SelectPrivacy(ctx context.Context, user_id int64, key_type int32) (rValue *dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectPrivacyAll(ctx context.Context, user_id int64) (rList []dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectPrivacyAllWithCB(ctx context.Context, user_id int64, ...) (rList []dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectPrivacyList(ctx context.Context, user_id int64, keyList []int32) (rList []dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectPrivacyListWithCB(ctx context.Context, user_id int64, keyList []int32, ...) (rList []dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectUsersPrivacyList(ctx context.Context, idList []int32, keyList []int32) (rList []dataobject.UserPrivaciesDO, err error)
- func (dao *UserPrivaciesDAO) SelectUsersPrivacyListWithCB(ctx context.Context, idList []int32, keyList []int32, ...) (rList []dataobject.UserPrivaciesDO, err error)
- type UserProfilePhotosDAO
- func (dao *UserProfilePhotosDAO) Delete(ctx context.Context, user_id int64, id_list []int64) (rowsAffected int64, err error)
- func (dao *UserProfilePhotosDAO) DeleteTx(tx *sqlx.Tx, user_id int64, id_list []int64) (rowsAffected int64, err error)
- func (dao *UserProfilePhotosDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserProfilePhotosDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserProfilePhotosDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserProfilePhotosDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserProfilePhotosDAO) SelectList(ctx context.Context, user_id int64) (rList []int64, err error)
- func (dao *UserProfilePhotosDAO) SelectListWithCB(ctx context.Context, user_id int64, cb func(i int, v int64)) (rList []int64, err error)
- func (dao *UserProfilePhotosDAO) SelectNext(ctx context.Context, user_id int64, id_list []int64) (rValue int64, err error)
- type UserSettingsDAO
- func (dao *UserSettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserSettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserSettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserSettingsDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UserSettingsDAO) SelectByKey(ctx context.Context, user_id int64, key2 string) (rValue *dataobject.UserSettingsDO, err error)
- func (dao *UserSettingsDAO) Update(ctx context.Context, value string, user_id int64, key2 string) (rowsAffected int64, err error)
- func (dao *UserSettingsDAO) UpdateTx(tx *sqlx.Tx, value string, user_id int64, key2 string) (rowsAffected int64, err error)
- type UsersDAO
- func (dao *UsersDAO) Delete(ctx context.Context, delete_reason string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) DeleteTx(tx *sqlx.Tx, delete_reason string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) Insert(ctx context.Context, do *dataobject.UsersDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UsersDAO) InsertTx(tx *sqlx.Tx, do *dataobject.UsersDO) (lastInsertId, rowsAffected int64, err error)
- func (dao *UsersDAO) QueryChannelParticipants(ctx context.Context, channelId int64, q1 string, q2 string, q3 string) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) QueryChannelParticipantsWithCB(ctx context.Context, channelId int64, q1 string, q2 string, q3 string, ...) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SearchByQueryNotIdList(ctx context.Context, q2 string, id_list []int64, limit int32) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SearchByQueryNotIdListWithCB(ctx context.Context, q2 string, id_list []int64, limit int32, ...) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectAccountDaysTTL(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectById(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectByPhoneNumber(ctx context.Context, phone string) (rValue *dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectByQueryString(ctx context.Context, username string, first_name string, last_name string, ...) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectByQueryStringWithCB(ctx context.Context, username string, first_name string, last_name string, ...) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectByUsername(ctx context.Context, username string) (rValue *dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectCountryCode(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectProfilePhoto(ctx context.Context, id int64) (rValue int64, err error)
- func (dao *UsersDAO) SelectUsersByIdList(ctx context.Context, id_list []int64) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectUsersByIdListWithCB(ctx context.Context, id_list []int64, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectUsersByPhoneList(ctx context.Context, phoneList []string) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) SelectUsersByPhoneListWithCB(ctx context.Context, phoneList []string, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
- func (dao *UsersDAO) UpdateAbout(ctx context.Context, about string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateAboutTx(tx *sqlx.Tx, about string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateAccountDaysTTL(ctx context.Context, account_days_ttl int32, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateAccountDaysTTLTx(tx *sqlx.Tx, account_days_ttl int32, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateFirstAndLastName(ctx context.Context, first_name string, last_name string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateFirstAndLastNameTx(tx *sqlx.Tx, first_name string, last_name string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateProfile(ctx context.Context, first_name string, last_name string, about string, ...) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateProfilePhoto(ctx context.Context, photo_id int64, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateProfilePhotoTx(tx *sqlx.Tx, photo_id int64, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateProfileTx(tx *sqlx.Tx, first_name string, last_name string, about string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateUser(ctx context.Context, cMap map[string]interface{}, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateUserTx(tx *sqlx.Tx, cMap map[string]interface{}, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateUsername(ctx context.Context, username string, id int64) (rowsAffected int64, err error)
- func (dao *UsersDAO) UpdateUsernameTx(tx *sqlx.Tx, username string, id int64) (rowsAffected int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotCommandsDAO ¶
type BotCommandsDAO struct {
// contains filtered or unexported fields
}
func NewBotCommandsDAO ¶
func NewBotCommandsDAO(db *sqlx.DB) *BotCommandsDAO
func (*BotCommandsDAO) Delete ¶
func (dao *BotCommandsDAO) Delete(ctx context.Context, bot_id int64) (rowsAffected int64, err error)
Delete delete from bot_commands where bot_id = :bot_id TODO(@benqi): sqlmap
func (*BotCommandsDAO) DeleteTx ¶
DeleteTx delete from bot_commands where bot_id = :bot_id TODO(@benqi): sqlmap
func (*BotCommandsDAO) InsertBulk ¶
func (dao *BotCommandsDAO) InsertBulk(ctx context.Context, doList []*dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
InsertBulk insert into bot_commands(bot_id, command, description) values (:bot_id, :command, :description) TODO(@benqi): sqlmap
func (*BotCommandsDAO) InsertBulkTx ¶
func (dao *BotCommandsDAO) InsertBulkTx(tx *sqlx.Tx, doList []*dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
InsertBulkTx insert into bot_commands(bot_id, command, description) values (:bot_id, :command, :description) TODO(@benqi): sqlmap
func (*BotCommandsDAO) InsertOrUpdate ¶
func (dao *BotCommandsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into bot_commands(bot_id, command, description) values (:bot_id, :command, :description) TODO(@benqi): sqlmap
func (*BotCommandsDAO) InsertOrUpdateTx ¶
func (dao *BotCommandsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.BotCommandsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into bot_commands(bot_id, command, description) values (:bot_id, :command, :description) TODO(@benqi): sqlmap
func (*BotCommandsDAO) SelectList ¶
func (dao *BotCommandsDAO) SelectList(ctx context.Context, bot_id int64) (rList []dataobject.BotCommandsDO, err error)
SelectList select id, bot_id, command, description from bot_commands where bot_id = :bot_id TODO(@benqi): sqlmap
func (*BotCommandsDAO) SelectListByIdList ¶
func (dao *BotCommandsDAO) SelectListByIdList(ctx context.Context, id_list []int32) (rList []dataobject.BotCommandsDO, err error)
SelectListByIdList select id, bot_id, command, description from bot_commands where bot_id in (:id_list) TODO(@benqi): sqlmap
func (*BotCommandsDAO) SelectListByIdListWithCB ¶
func (dao *BotCommandsDAO) SelectListByIdListWithCB(ctx context.Context, id_list []int32, cb func(i int, v *dataobject.BotCommandsDO)) (rList []dataobject.BotCommandsDO, err error)
SelectListByIdListWithCB select id, bot_id, command, description from bot_commands where bot_id in (:id_list) TODO(@benqi): sqlmap
func (*BotCommandsDAO) SelectListWithCB ¶
func (dao *BotCommandsDAO) SelectListWithCB(ctx context.Context, bot_id int64, cb func(i int, v *dataobject.BotCommandsDO)) (rList []dataobject.BotCommandsDO, err error)
SelectListWithCB select id, bot_id, command, description from bot_commands where bot_id = :bot_id TODO(@benqi): sqlmap
type BotsDAO ¶
type BotsDAO struct {
// contains filtered or unexported fields
}
func NewBotsDAO ¶
func (*BotsDAO) Select ¶
func (dao *BotsDAO) Select(ctx context.Context, bot_id int64) (rValue *dataobject.BotsDO, err error)
Select select id, bot_id, bot_type, creator_user_id, token, description, bot_chat_history, bot_nochats, bot_inline_geo, bot_info_version, bot_inline_placeholder from bots where bot_id = :bot_id TODO(@benqi): sqlmap
func (*BotsDAO) SelectByIdList ¶
func (dao *BotsDAO) SelectByIdList(ctx context.Context, id_list []int32) (rList []dataobject.BotsDO, err error)
SelectByIdList select id, bot_id, bot_type, creator_user_id, token, description, bot_chat_history, bot_nochats, bot_inline_geo, bot_info_version, bot_inline_placeholder from bots where bot_id in (:id_list) TODO(@benqi): sqlmap
func (*BotsDAO) SelectByIdListWithCB ¶
func (dao *BotsDAO) SelectByIdListWithCB(ctx context.Context, id_list []int32, cb func(i int, v *dataobject.BotsDO)) (rList []dataobject.BotsDO, err error)
SelectByIdListWithCB select id, bot_id, bot_type, creator_user_id, token, description, bot_chat_history, bot_nochats, bot_inline_geo, bot_info_version, bot_inline_placeholder from bots where bot_id in (:id_list) TODO(@benqi): sqlmap
type ImportedContactsDAO ¶
type ImportedContactsDAO struct {
// contains filtered or unexported fields
}
func NewImportedContactsDAO ¶
func NewImportedContactsDAO(db *sqlx.DB) *ImportedContactsDAO
func (*ImportedContactsDAO) Delete ¶
func (dao *ImportedContactsDAO) Delete(ctx context.Context, user_id int64, imported_user_id int64) (rowsAffected int64, err error)
Delete update imported_contacts set deleted = 1 where user_id = :user_id and imported_user_id = :imported_user_id
func (*ImportedContactsDAO) DeleteTx ¶
func (dao *ImportedContactsDAO) DeleteTx(tx *sqlx.Tx, user_id int64, imported_user_id int64) (rowsAffected int64, err error)
DeleteTx update imported_contacts set deleted = 1 where user_id = :user_id and imported_user_id = :imported_user_id
func (*ImportedContactsDAO) InsertOrUpdate ¶
func (dao *ImportedContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.ImportedContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into imported_contacts(user_id, imported_user_id) values (:user_id, :imported_user_id) on duplicate key update deleted = 0
func (*ImportedContactsDAO) InsertOrUpdateTx ¶
func (dao *ImportedContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.ImportedContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into imported_contacts(user_id, imported_user_id) values (:user_id, :imported_user_id) on duplicate key update deleted = 0
func (*ImportedContactsDAO) SelectAllList ¶
func (dao *ImportedContactsDAO) SelectAllList(ctx context.Context, user_id int64) (rList []dataobject.ImportedContactsDO, err error)
SelectAllList select id, user_id, imported_user_id from imported_contacts where user_id = :user_id
func (*ImportedContactsDAO) SelectAllListWithCB ¶
func (dao *ImportedContactsDAO) SelectAllListWithCB(ctx context.Context, user_id int64, cb func(i int, v *dataobject.ImportedContactsDO)) (rList []dataobject.ImportedContactsDO, err error)
SelectAllListWithCB select id, user_id, imported_user_id from imported_contacts where user_id = :user_id
func (*ImportedContactsDAO) SelectList ¶
func (dao *ImportedContactsDAO) SelectList(ctx context.Context, user_id int64) (rList []dataobject.ImportedContactsDO, err error)
SelectList select id, user_id, imported_user_id from imported_contacts where user_id = :user_id and deleted = 0
func (*ImportedContactsDAO) SelectListByImportedList ¶
func (dao *ImportedContactsDAO) SelectListByImportedList(ctx context.Context, user_id int64, idList []int64) (rList []dataobject.ImportedContactsDO, err error)
SelectListByImportedList select id, user_id, imported_user_id from imported_contacts where user_id = :user_id and deleted = 0 and imported_user_id in (:idList)
func (*ImportedContactsDAO) SelectListByImportedListWithCB ¶
func (dao *ImportedContactsDAO) SelectListByImportedListWithCB(ctx context.Context, user_id int64, idList []int64, cb func(i int, v *dataobject.ImportedContactsDO)) (rList []dataobject.ImportedContactsDO, err error)
SelectListByImportedListWithCB select id, user_id, imported_user_id from imported_contacts where user_id = :user_id and deleted = 0 and imported_user_id in (:idList)
func (*ImportedContactsDAO) SelectListWithCB ¶
func (dao *ImportedContactsDAO) SelectListWithCB(ctx context.Context, user_id int64, cb func(i int, v *dataobject.ImportedContactsDO)) (rList []dataobject.ImportedContactsDO, err error)
SelectListWithCB select id, user_id, imported_user_id from imported_contacts where user_id = :user_id and deleted = 0
type PhoneBooksDAO ¶
type PhoneBooksDAO struct {
// contains filtered or unexported fields
}
func NewPhoneBooksDAO ¶
func NewPhoneBooksDAO(db *sqlx.DB) *PhoneBooksDAO
func (*PhoneBooksDAO) InsertOrUpdate ¶
func (dao *PhoneBooksDAO) InsertOrUpdate(ctx context.Context, do *dataobject.PhoneBooksDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into phone_books(auth_key_id, client_id, phone, first_name, last_name) values (:auth_key_id, :client_id, :phone, :first_name, :last_name) on duplicate key update phone = values(phone), first_name = values(first_name), last_name = values(last_name) TODO(@benqi): sqlmap
func (*PhoneBooksDAO) InsertOrUpdateTx ¶
func (dao *PhoneBooksDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.PhoneBooksDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into phone_books(auth_key_id, client_id, phone, first_name, last_name) values (:auth_key_id, :client_id, :phone, :first_name, :last_name) on duplicate key update phone = values(phone), first_name = values(first_name), last_name = values(last_name) TODO(@benqi): sqlmap
type PopularContactsDAO ¶
type PopularContactsDAO struct {
// contains filtered or unexported fields
}
func NewPopularContactsDAO ¶
func NewPopularContactsDAO(db *sqlx.DB) *PopularContactsDAO
func (*PopularContactsDAO) IncreaseImporters ¶
func (dao *PopularContactsDAO) IncreaseImporters(ctx context.Context, phone string) (rowsAffected int64, err error)
IncreaseImporters update popular_contacts set importers = importers + 1 where phone = :phone TODO(@benqi): sqlmap
func (*PopularContactsDAO) IncreaseImportersList ¶
func (dao *PopularContactsDAO) IncreaseImportersList(ctx context.Context, phoneList []string) (rowsAffected int64, err error)
IncreaseImportersList update popular_contacts set importers = importers + 1 where phone in (:phoneList) TODO(@benqi): sqlmap
func (*PopularContactsDAO) IncreaseImportersListTx ¶
func (dao *PopularContactsDAO) IncreaseImportersListTx(tx *sqlx.Tx, phoneList []string) (rowsAffected int64, err error)
update popular_contacts set importers = importers + 1 where phone in (:phoneList) IncreaseImportersListTx TODO(@benqi): sqlmap
func (*PopularContactsDAO) IncreaseImportersTx ¶
func (dao *PopularContactsDAO) IncreaseImportersTx(tx *sqlx.Tx, phone string) (rowsAffected int64, err error)
update popular_contacts set importers = importers + 1 where phone = :phone IncreaseImportersTx TODO(@benqi): sqlmap
func (*PopularContactsDAO) InsertOrUpdate ¶
func (dao *PopularContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.PopularContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into popular_contacts(phone, importers, deleted) values (:phone, :importers, 0) on duplicate key update importers = importers + 1 TODO(@benqi): sqlmap
func (*PopularContactsDAO) InsertOrUpdateTx ¶
func (dao *PopularContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.PopularContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into popular_contacts(phone, importers, deleted) values (:phone, :importers, 0) on duplicate key update importers = importers + 1 TODO(@benqi): sqlmap
func (*PopularContactsDAO) SelectImporters ¶
func (dao *PopularContactsDAO) SelectImporters(ctx context.Context, phone string) (rValue *dataobject.PopularContactsDO, err error)
SelectImporters select phone, importers from popular_contacts where phone = :phone TODO(@benqi): sqlmap
func (*PopularContactsDAO) SelectImportersList ¶
func (dao *PopularContactsDAO) SelectImportersList(ctx context.Context, phoneList []string) (rList []dataobject.PopularContactsDO, err error)
SelectImportersList select phone, importers from popular_contacts where phone in (:phoneList) TODO(@benqi): sqlmap
func (*PopularContactsDAO) SelectImportersListWithCB ¶
func (dao *PopularContactsDAO) SelectImportersListWithCB(ctx context.Context, phoneList []string, cb func(i int, v *dataobject.PopularContactsDO)) (rList []dataobject.PopularContactsDO, err error)
SelectImportersListWithCB select phone, importers from popular_contacts where phone in (:phoneList) TODO(@benqi): sqlmap
type PredefinedUsersDAO ¶
type PredefinedUsersDAO struct {
// contains filtered or unexported fields
}
func NewPredefinedUsersDAO ¶
func NewPredefinedUsersDAO(db *sqlx.DB) *PredefinedUsersDAO
func (*PredefinedUsersDAO) Delete ¶
func (dao *PredefinedUsersDAO) Delete(ctx context.Context, phone string) (rowsAffected int64, err error)
Delete update predefined_users set deleted = 0 where phone = :phone TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) DeleteTx ¶
update predefined_users set deleted = 0 where phone = :phone DeleteTx TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) Insert ¶
func (dao *PredefinedUsersDAO) Insert(ctx context.Context, do *dataobject.PredefinedUsersDO) (lastInsertId, rowsAffected int64, err error)
Insert insert into predefined_users(first_name, last_name, username, phone, code, verified) values (:first_name, :last_name, :username, :phone, :code, :verified) TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) InsertTx ¶
func (dao *PredefinedUsersDAO) InsertTx(tx *sqlx.Tx, do *dataobject.PredefinedUsersDO) (lastInsertId, rowsAffected int64, err error)
InsertTx insert into predefined_users(first_name, last_name, username, phone, code, verified) values (:first_name, :last_name, :username, :phone, :code, :verified) TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) SelectByPhone ¶
func (dao *PredefinedUsersDAO) SelectByPhone(ctx context.Context, phone string) (rValue *dataobject.PredefinedUsersDO, err error)
SelectByPhone select id, phone, first_name, last_name, username, code, verified, registered_user_id from predefined_users where phone = :phone and deleted = 0 limit 1 TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) SelectPredefinedUsersAll ¶
func (dao *PredefinedUsersDAO) SelectPredefinedUsersAll(ctx context.Context) (rList []dataobject.PredefinedUsersDO, err error)
SelectPredefinedUsersAll select id, phone, first_name, last_name, username, code, verified, registered_user_id from predefined_users where deleted = 0 order by username asc TODO(@benqi): sqlmap
func (*PredefinedUsersDAO) SelectPredefinedUsersAllWithCB ¶
func (dao *PredefinedUsersDAO) SelectPredefinedUsersAllWithCB(ctx context.Context, cb func(i int, v *dataobject.PredefinedUsersDO)) (rList []dataobject.PredefinedUsersDO, err error)
SelectPredefinedUsersAllWithCB select id, phone, first_name, last_name, username, code, verified, registered_user_id from predefined_users where deleted = 0 order by username asc TODO(@benqi): sqlmap
type UnregisteredContactsDAO ¶
type UnregisteredContactsDAO struct {
// contains filtered or unexported fields
}
func NewUnregisteredContactsDAO ¶
func NewUnregisteredContactsDAO(db *sqlx.DB) *UnregisteredContactsDAO
func (*UnregisteredContactsDAO) DeleteContacts ¶
func (dao *UnregisteredContactsDAO) DeleteContacts(ctx context.Context, id_list []int64) (rowsAffected int64, err error)
DeleteContacts update unregistered_contacts set imported = 1 where id in (:id_list) TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) DeleteContactsTx ¶
func (dao *UnregisteredContactsDAO) DeleteContactsTx(tx *sqlx.Tx, id_list []int64) (rowsAffected int64, err error)
update unregistered_contacts set imported = 1 where id in (:id_list) DeleteContactsTx TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) DeleteImportersByPhone ¶
func (dao *UnregisteredContactsDAO) DeleteImportersByPhone(ctx context.Context, phone string) (rowsAffected int64, err error)
DeleteImportersByPhone update unregistered_contacts set imported = 1 where phone = :phone TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) DeleteImportersByPhoneTx ¶
func (dao *UnregisteredContactsDAO) DeleteImportersByPhoneTx(tx *sqlx.Tx, phone string) (rowsAffected int64, err error)
update unregistered_contacts set imported = 1 where phone = :phone DeleteImportersByPhoneTx TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) InsertOrUpdate ¶
func (dao *UnregisteredContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UnregisteredContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into unregistered_contacts(phone, importer_user_id, import_first_name, import_last_name) values (:phone, :importer_user_id, :import_first_name, :import_last_name) on duplicate key update import_first_name = values(import_first_name), import_last_name = values(import_last_name) TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) InsertOrUpdateTx ¶
func (dao *UnregisteredContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UnregisteredContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into unregistered_contacts(phone, importer_user_id, import_first_name, import_last_name) values (:phone, :importer_user_id, :import_first_name, :import_last_name) on duplicate key update import_first_name = values(import_first_name), import_last_name = values(import_last_name) TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) SelectImportersByPhone ¶
func (dao *UnregisteredContactsDAO) SelectImportersByPhone(ctx context.Context, phone string) (rList []dataobject.UnregisteredContactsDO, err error)
SelectImportersByPhone select id, importer_user_id, phone, import_first_name, import_last_name from unregistered_contacts where phone = :phone and imported = 0 TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) SelectImportersByPhoneWithCB ¶
func (dao *UnregisteredContactsDAO) SelectImportersByPhoneWithCB(ctx context.Context, phone string, cb func(i int, v *dataobject.UnregisteredContactsDO)) (rList []dataobject.UnregisteredContactsDO, err error)
SelectImportersByPhoneWithCB select id, importer_user_id, phone, import_first_name, import_last_name from unregistered_contacts where phone = :phone and imported = 0 TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) UpdateContactName ¶
func (dao *UnregisteredContactsDAO) UpdateContactName(ctx context.Context, import_first_name string, import_last_name string, id int64) (rowsAffected int64, err error)
UpdateContactName update unregistered_contacts set import_first_name = :import_first_name, import_last_name = :import_last_name where id = :id TODO(@benqi): sqlmap
func (*UnregisteredContactsDAO) UpdateContactNameTx ¶
func (dao *UnregisteredContactsDAO) UpdateContactNameTx(tx *sqlx.Tx, import_first_name string, import_last_name string, id int64) (rowsAffected int64, err error)
update unregistered_contacts set import_first_name = :import_first_name, import_last_name = :import_last_name where id = :id UpdateContactNameTx TODO(@benqi): sqlmap
type UserContactsDAO ¶
type UserContactsDAO struct {
// contains filtered or unexported fields
}
func NewUserContactsDAO ¶
func NewUserContactsDAO(db *sqlx.DB) *UserContactsDAO
func (*UserContactsDAO) DeleteContacts ¶
func (dao *UserContactsDAO) DeleteContacts(ctx context.Context, owner_user_id int64, id_list []int64) (rowsAffected int64, err error)
DeleteContacts update user_contacts set is_deleted = 1, mutual = 0 where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id in (:id_list)) TODO(@benqi): sqlmap
func (*UserContactsDAO) DeleteContactsTx ¶
func (dao *UserContactsDAO) DeleteContactsTx(tx *sqlx.Tx, owner_user_id int64, id_list []int64) (rowsAffected int64, err error)
update user_contacts set is_deleted = 1, mutual = 0 where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id in (:id_list)) DeleteContactsTx TODO(@benqi): sqlmap
func (*UserContactsDAO) InsertOrUpdate ¶
func (dao *UserContactsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_contacts(owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, date2) values (:owner_user_id, :contact_user_id, :contact_phone, :contact_first_name, :contact_last_name, :mutual, :date2) on duplicate key update contact_phone = values(contact_phone), contact_first_name = values(contact_first_name), contact_last_name = values(contact_last_name), mutual = values(mutual), date2 = values(date2), is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) InsertOrUpdateTx ¶
func (dao *UserContactsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserContactsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_contacts(owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, date2) values (:owner_user_id, :contact_user_id, :contact_phone, :contact_first_name, :contact_last_name, :mutual, :date2) on duplicate key update contact_phone = values(contact_phone), contact_first_name = values(contact_first_name), contact_last_name = values(contact_last_name), mutual = values(mutual), date2 = values(date2), is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectAllUserContacts ¶
func (dao *UserContactsDAO) SelectAllUserContacts(ctx context.Context, owner_user_id int64) (rList []dataobject.UserContactsDO, err error)
SelectAllUserContacts select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectAllUserContactsWithCB ¶
func (dao *UserContactsDAO) SelectAllUserContactsWithCB(ctx context.Context, owner_user_id int64, cb func(i int, v *dataobject.UserContactsDO)) (rList []dataobject.UserContactsDO, err error)
SelectAllUserContactsWithCB select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectByContactId ¶
func (dao *UserContactsDAO) SelectByContactId(ctx context.Context, owner_user_id int64, contact_user_id int64) (rValue *dataobject.UserContactsDO, err error)
SelectByContactId select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id and contact_user_id = :contact_user_id TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectContact ¶
func (dao *UserContactsDAO) SelectContact(ctx context.Context, owner_user_id int64, contact_user_id int64) (rValue *dataobject.UserContactsDO, err error)
SelectContact select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where is_deleted = 0 and owner_user_id = :owner_user_id and contact_user_id = :contact_user_id TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByIdList ¶
func (dao *UserContactsDAO) SelectListByIdList(ctx context.Context, owner_user_id int64, id_list []int64) (rList []dataobject.UserContactsDO, err error)
SelectListByIdList select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id and contact_user_id in (:id_list) and is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByIdListWithCB ¶
func (dao *UserContactsDAO) SelectListByIdListWithCB(ctx context.Context, owner_user_id int64, id_list []int64, cb func(i int, v *dataobject.UserContactsDO)) (rList []dataobject.UserContactsDO, err error)
SelectListByIdListWithCB select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id and contact_user_id in (:id_list) and is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByOwnerListAndContactList ¶
func (dao *UserContactsDAO) SelectListByOwnerListAndContactList(ctx context.Context, idList1 []int64, idList2 []int64) (rList []dataobject.UserContactsDO, err error)
SelectListByOwnerListAndContactList select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id in (:idList1) and contact_user_id in (:idList2) and is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByOwnerListAndContactListWithCB ¶
func (dao *UserContactsDAO) SelectListByOwnerListAndContactListWithCB(ctx context.Context, idList1 []int64, idList2 []int64, cb func(i int, v *dataobject.UserContactsDO)) (rList []dataobject.UserContactsDO, err error)
SelectListByOwnerListAndContactListWithCB select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id in (:idList1) and contact_user_id in (:idList2) and is_deleted = 0 TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByPhoneList ¶
func (dao *UserContactsDAO) SelectListByPhoneList(ctx context.Context, owner_user_id int64, phoneList []string) (rList []dataobject.UserContactsDO, err error)
SelectListByPhoneList select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where is_deleted = 0 and owner_user_id = :owner_user_id and contact_phone in (:phoneList) TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectListByPhoneListWithCB ¶
func (dao *UserContactsDAO) SelectListByPhoneListWithCB(ctx context.Context, owner_user_id int64, phoneList []string, cb func(i int, v *dataobject.UserContactsDO)) (rList []dataobject.UserContactsDO, err error)
SelectListByPhoneListWithCB select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where is_deleted = 0 and owner_user_id = :owner_user_id and contact_phone in (:phoneList) TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectUserContacts ¶
func (dao *UserContactsDAO) SelectUserContacts(ctx context.Context, owner_user_id int64) (rList []dataobject.UserContactsDO, err error)
SelectUserContacts select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id and is_deleted = 0 order by contact_user_id asc TODO(@benqi): sqlmap
func (*UserContactsDAO) SelectUserContactsWithCB ¶
func (dao *UserContactsDAO) SelectUserContactsWithCB(ctx context.Context, owner_user_id int64, cb func(i int, v *dataobject.UserContactsDO)) (rList []dataobject.UserContactsDO, err error)
SelectUserContactsWithCB select id, owner_user_id, contact_user_id, contact_phone, contact_first_name, contact_last_name, mutual, is_deleted from user_contacts where owner_user_id = :owner_user_id and is_deleted = 0 order by contact_user_id asc TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateContactName ¶
func (dao *UserContactsDAO) UpdateContactName(ctx context.Context, contact_first_name string, contact_last_name string, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
UpdateContactName update user_contacts set contact_first_name = :contact_first_name, contact_last_name = :contact_last_name, is_deleted = 0 where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id = :contact_user_id) TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateContactNameById ¶
func (dao *UserContactsDAO) UpdateContactNameById(ctx context.Context, contact_first_name string, contact_last_name string, id int64) (rowsAffected int64, err error)
UpdateContactNameById update user_contacts set contact_first_name = :contact_first_name, contact_last_name = :contact_last_name, is_deleted = 0 where id = :id TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateContactNameByIdTx ¶
func (dao *UserContactsDAO) UpdateContactNameByIdTx(tx *sqlx.Tx, contact_first_name string, contact_last_name string, id int64) (rowsAffected int64, err error)
update user_contacts set contact_first_name = :contact_first_name, contact_last_name = :contact_last_name, is_deleted = 0 where id = :id UpdateContactNameByIdTx TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateContactNameTx ¶
func (dao *UserContactsDAO) UpdateContactNameTx(tx *sqlx.Tx, contact_first_name string, contact_last_name string, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
update user_contacts set contact_first_name = :contact_first_name, contact_last_name = :contact_last_name, is_deleted = 0 where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id = :contact_user_id) UpdateContactNameTx TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateMutual ¶
func (dao *UserContactsDAO) UpdateMutual(ctx context.Context, mutual bool, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
UpdateMutual update user_contacts set mutual = :mutual where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id = :contact_user_id) TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdateMutualTx ¶
func (dao *UserContactsDAO) UpdateMutualTx(tx *sqlx.Tx, mutual bool, owner_user_id int64, contact_user_id int64) (rowsAffected int64, err error)
update user_contacts set mutual = :mutual where contact_user_id != 0 and (owner_user_id = :owner_user_id and contact_user_id = :contact_user_id) UpdateMutualTx TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdatePhoneByContactId ¶
func (dao *UserContactsDAO) UpdatePhoneByContactId(ctx context.Context, contact_phone string, contact_user_id int64) (rowsAffected int64, err error)
UpdatePhoneByContactId update user_contacts set contact_phone = :contact_phone where contact_user_id = :contact_user_id TODO(@benqi): sqlmap
func (*UserContactsDAO) UpdatePhoneByContactIdTx ¶
func (dao *UserContactsDAO) UpdatePhoneByContactIdTx(tx *sqlx.Tx, contact_phone string, contact_user_id int64) (rowsAffected int64, err error)
update user_contacts set contact_phone = :contact_phone where contact_user_id = :contact_user_id UpdatePhoneByContactIdTx TODO(@benqi): sqlmap
type UserGlobalPrivacySettingsDAO ¶
type UserGlobalPrivacySettingsDAO struct {
// contains filtered or unexported fields
}
func NewUserGlobalPrivacySettingsDAO ¶
func NewUserGlobalPrivacySettingsDAO(db *sqlx.DB) *UserGlobalPrivacySettingsDAO
func (*UserGlobalPrivacySettingsDAO) InsertOrUpdate ¶
func (dao *UserGlobalPrivacySettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserGlobalPrivacySettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_global_privacy_settings(user_id, archive_and_mute_new_noncontact_peers) values (:user_id, :archive_and_mute_new_noncontact_peers) on duplicate key update archive_and_mute_new_noncontact_peers = values(archive_and_mute_new_noncontact_peers) TODO(@benqi): sqlmap
func (*UserGlobalPrivacySettingsDAO) InsertOrUpdateTx ¶
func (dao *UserGlobalPrivacySettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserGlobalPrivacySettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_global_privacy_settings(user_id, archive_and_mute_new_noncontact_peers) values (:user_id, :archive_and_mute_new_noncontact_peers) on duplicate key update archive_and_mute_new_noncontact_peers = values(archive_and_mute_new_noncontact_peers) TODO(@benqi): sqlmap
func (*UserGlobalPrivacySettingsDAO) Select ¶
func (dao *UserGlobalPrivacySettingsDAO) Select(ctx context.Context, user_id int64) (rValue *dataobject.UserGlobalPrivacySettingsDO, err error)
Select select id, user_id, archive_and_mute_new_noncontact_peers from user_global_privacy_settings where user_id = :user_id TODO(@benqi): sqlmap
type UserNotifySettingsDAO ¶
type UserNotifySettingsDAO struct {
// contains filtered or unexported fields
}
func NewUserNotifySettingsDAO ¶
func NewUserNotifySettingsDAO(db *sqlx.DB) *UserNotifySettingsDAO
func (*UserNotifySettingsDAO) DeleteAll ¶
func (dao *UserNotifySettingsDAO) DeleteAll(ctx context.Context, user_id int64) (rowsAffected int64, err error)
DeleteAll update user_notify_settings set deleted = 1 where user_id = :user_id TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) DeleteAllTx ¶
func (dao *UserNotifySettingsDAO) DeleteAllTx(tx *sqlx.Tx, user_id int64) (rowsAffected int64, err error)
update user_notify_settings set deleted = 1 where user_id = :user_id DeleteAllTx TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) InsertOrUpdate ¶
func (dao *UserNotifySettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserNotifySettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_notify_settings(user_id, peer_type, peer_id, show_previews, silent, mute_until, sound) values (:user_id, :peer_type, :peer_id, :show_previews, :silent, :mute_until, :sound) on duplicate key update show_previews = values(show_previews), silent = values(silent), mute_until = values(mute_until), sound = values(sound), deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) InsertOrUpdateExt ¶
func (dao *UserNotifySettingsDAO) InsertOrUpdateExt(ctx context.Context, userId int64, peerType int32, peerId int64, cMap map[string]interface{}) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateExt insert into user_notify_settings(user_id, peer_type, peer_id, show_previews, silent, mute_until, sound) values (:user_id, :peer_type, :peer_id, :show_previews, :silent, :mute_until, :sound) on duplicate key update show_previews = values(show_previews), silent = values(silent), mute_until = values(mute_until), sound = values(sound), deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) InsertOrUpdateExtTx ¶
func (dao *UserNotifySettingsDAO) InsertOrUpdateExtTx(tx *sqlx.Tx, userId int64, peerType int32, peerId int64, cMap map[string]interface{}) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateExtTx insert into user_notify_settings(user_id, peer_type, peer_id, show_previews, silent, mute_until, sound) values (:user_id, :peer_type, :peer_id, :show_previews, :silent, :mute_until, :sound) on duplicate key update show_previews = values(show_previews), silent = values(silent), mute_until = values(mute_until), sound = values(sound), deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) InsertOrUpdateTx ¶
func (dao *UserNotifySettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserNotifySettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_notify_settings(user_id, peer_type, peer_id, show_previews, silent, mute_until, sound) values (:user_id, :peer_type, :peer_id, :show_previews, :silent, :mute_until, :sound) on duplicate key update show_previews = values(show_previews), silent = values(silent), mute_until = values(mute_until), sound = values(sound), deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) Select ¶
func (dao *UserNotifySettingsDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserNotifySettingsDO, err error)
Select select id, user_id, peer_type, peer_id, show_previews, silent, mute_until, sound from user_notify_settings where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id and deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) SelectAll ¶
func (dao *UserNotifySettingsDAO) SelectAll(ctx context.Context, user_id int64) (rList []dataobject.UserNotifySettingsDO, err error)
SelectAll select id, user_id, peer_type, peer_id, show_previews, silent, mute_until, sound from user_notify_settings where user_id = :user_id and deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) SelectAllWithCB ¶
func (dao *UserNotifySettingsDAO) SelectAllWithCB(ctx context.Context, user_id int64, cb func(i int, v *dataobject.UserNotifySettingsDO)) (rList []dataobject.UserNotifySettingsDO, err error)
SelectAllWithCB select id, user_id, peer_type, peer_id, show_previews, silent, mute_until, sound from user_notify_settings where user_id = :user_id and deleted = 0 TODO(@benqi): sqlmap
func (*UserNotifySettingsDAO) SelectList ¶
func (dao *UserNotifySettingsDAO) SelectList(ctx context.Context, userId int64, userIdList, chatIdList, channelIdList []int64) (rList []dataobject.UserNotifySettingsDO, err error)
SelectList select id, user_id, peer_type, peer_id, show_previews, silent, mute_until, sound from user_notify_settings where user_id = :user_id and deleted = 0 TODO(@benqi): sqlmap
type UserPeerBlocksDAO ¶
type UserPeerBlocksDAO struct {
// contains filtered or unexported fields
}
func NewUserPeerBlocksDAO ¶
func NewUserPeerBlocksDAO(db *sqlx.DB) *UserPeerBlocksDAO
func (*UserPeerBlocksDAO) Delete ¶
func (dao *UserPeerBlocksDAO) Delete(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
Delete update user_peer_blocks set deleted = 1, `date` = 0 where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) DeleteTx ¶
func (dao *UserPeerBlocksDAO) DeleteTx(tx *sqlx.Tx, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
update user_peer_blocks set deleted = 1, `date` = 0 where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id DeleteTx TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) InsertOrUpdate ¶
func (dao *UserPeerBlocksDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserPeerBlocksDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_peer_blocks(user_id, peer_type, peer_id, `date`) values (:user_id, :peer_type, :peer_id, :date) on duplicate key update `date` = values(`date`), deleted = 0 TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) InsertOrUpdateTx ¶
func (dao *UserPeerBlocksDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserPeerBlocksDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_peer_blocks(user_id, peer_type, peer_id, `date`) values (:user_id, :peer_type, :peer_id, :date) on duplicate key update `date` = values(`date`), deleted = 0 TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) Select ¶
func (dao *UserPeerBlocksDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserPeerBlocksDO, err error)
Select select user_id, peer_type, peer_id, `date` from user_peer_blocks where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id and deleted = 0 TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) SelectList ¶
func (dao *UserPeerBlocksDAO) SelectList(ctx context.Context, user_id int64, limit int32) (rList []dataobject.UserPeerBlocksDO, err error)
SelectList select user_id, peer_type, peer_id, `date` from user_peer_blocks where user_id = :user_id and deleted = 0 order by id asc limit :limit TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) SelectListByIdList ¶
func (dao *UserPeerBlocksDAO) SelectListByIdList(ctx context.Context, user_id int64, idList []int64) (rList []int64, err error)
SelectListByIdList select peer_id from user_peer_blocks where user_id = :user_id and peer_type = 2 and peer_id in (:idList) and deleted = 0 TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) SelectListByIdListWithCB ¶
func (dao *UserPeerBlocksDAO) SelectListByIdListWithCB(ctx context.Context, user_id int64, idList []int64, cb func(i int, v int64)) (rList []int64, err error)
SelectListByIdListWithCB select peer_id from user_peer_blocks where user_id = :user_id and peer_type = 2 and peer_id in (:idList) and deleted = 0 TODO(@benqi): sqlmap
func (*UserPeerBlocksDAO) SelectListWithCB ¶
func (dao *UserPeerBlocksDAO) SelectListWithCB(ctx context.Context, user_id int64, limit int32, cb func(i int, v *dataobject.UserPeerBlocksDO)) (rList []dataobject.UserPeerBlocksDO, err error)
SelectListWithCB select user_id, peer_type, peer_id, `date` from user_peer_blocks where user_id = :user_id and deleted = 0 order by id asc limit :limit TODO(@benqi): sqlmap
type UserPeerSettingsDAO ¶
type UserPeerSettingsDAO struct {
// contains filtered or unexported fields
}
func NewUserPeerSettingsDAO ¶
func NewUserPeerSettingsDAO(db *sqlx.DB) *UserPeerSettingsDAO
func (*UserPeerSettingsDAO) Delete ¶
func (dao *UserPeerSettingsDAO) Delete(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
Delete update user_peer_settings set hide = 1 where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) DeleteTx ¶
func (dao *UserPeerSettingsDAO) DeleteTx(tx *sqlx.Tx, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
update user_peer_settings set hide = 1 where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id DeleteTx TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) InsertIgnore ¶
func (dao *UserPeerSettingsDAO) InsertIgnore(ctx context.Context, do *dataobject.UserPeerSettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertIgnore insert into user_peer_settings(user_id, peer_type, peer_id, hide, report_spam, add_contact, block_contact, share_contact, need_contacts_exception, report_geo, autoarchived, geo_distance) values (:user_id, :peer_type, :peer_id, :hide, :report_spam, :add_contact, :block_contact, :share_contact, :need_contacts_exception, :report_geo, :autoarchived, :geo_distance) TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) InsertIgnoreTx ¶
func (dao *UserPeerSettingsDAO) InsertIgnoreTx(tx *sqlx.Tx, do *dataobject.UserPeerSettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertIgnoreTx insert into user_peer_settings(user_id, peer_type, peer_id, hide, report_spam, add_contact, block_contact, share_contact, need_contacts_exception, report_geo, autoarchived, geo_distance) values (:user_id, :peer_type, :peer_id, :hide, :report_spam, :add_contact, :block_contact, :share_contact, :need_contacts_exception, :report_geo, :autoarchived, :geo_distance) TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) Select ¶
func (dao *UserPeerSettingsDAO) Select(ctx context.Context, user_id int64, peer_type int32, peer_id int64) (rValue *dataobject.UserPeerSettingsDO, err error)
Select select user_id, peer_type, peer_id, hide, report_spam, add_contact, block_contact, share_contact, need_contacts_exception, report_geo, autoarchived, geo_distance from user_peer_settings where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id and hide = 0 TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) Update ¶
func (dao *UserPeerSettingsDAO) Update(ctx context.Context, cMap map[string]interface{}, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
Update update user_peer_settings set %s where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap
func (*UserPeerSettingsDAO) UpdateTx ¶
func (dao *UserPeerSettingsDAO) UpdateTx(tx *sqlx.Tx, cMap map[string]interface{}, user_id int64, peer_type int32, peer_id int64) (rowsAffected int64, err error)
UpdateTx update user_peer_settings set %s where user_id = :user_id and peer_type = :peer_type and peer_id = :peer_id TODO(@benqi): sqlmap
type UserPresencesDAO ¶
type UserPresencesDAO struct {
// contains filtered or unexported fields
}
func NewUserPresencesDAO ¶
func NewUserPresencesDAO(db *sqlx.DB) *UserPresencesDAO
func (*UserPresencesDAO) Insert ¶
func (dao *UserPresencesDAO) Insert(ctx context.Context, do *dataobject.UserPresencesDO) (lastInsertId, rowsAffected int64, err error)
Insert insert into user_presences(user_id, last_seen_at, expires) values (:user_id, :last_seen_at, :expires) TODO(@benqi): sqlmap
func (*UserPresencesDAO) InsertTx ¶
func (dao *UserPresencesDAO) InsertTx(tx *sqlx.Tx, do *dataobject.UserPresencesDO) (lastInsertId, rowsAffected int64, err error)
InsertTx insert into user_presences(user_id, last_seen_at, expires) values (:user_id, :last_seen_at, :expires) TODO(@benqi): sqlmap
func (*UserPresencesDAO) Select ¶
func (dao *UserPresencesDAO) Select(ctx context.Context, user_id int64) (rValue *dataobject.UserPresencesDO, err error)
Select select id, user_id, last_seen_at, expires from user_presences where user_id = :user_id TODO(@benqi): sqlmap
func (*UserPresencesDAO) SelectList ¶
func (dao *UserPresencesDAO) SelectList(ctx context.Context, idList []int64) (rList []dataobject.UserPresencesDO, err error)
SelectList select id, user_id, last_seen_at, expires from user_presences where user_id in (:idList) TODO(@benqi): sqlmap
func (*UserPresencesDAO) SelectListWithCB ¶
func (dao *UserPresencesDAO) SelectListWithCB(ctx context.Context, idList []int64, cb func(i int, v *dataobject.UserPresencesDO)) (rList []dataobject.UserPresencesDO, err error)
SelectListWithCB select id, user_id, last_seen_at, expires from user_presences where user_id in (:idList) TODO(@benqi): sqlmap
func (*UserPresencesDAO) UpdateLastSeenAt ¶
func (dao *UserPresencesDAO) UpdateLastSeenAt(ctx context.Context, last_seen_at int64, expires int32, user_id int64) (rowsAffected int64, err error)
UpdateLastSeenAt update user_presences set last_seen_at = :last_seen_at, expires = :expires where user_id = :user_id TODO(@benqi): sqlmap
func (*UserPresencesDAO) UpdateLastSeenAtTx ¶
func (dao *UserPresencesDAO) UpdateLastSeenAtTx(tx *sqlx.Tx, last_seen_at int64, expires int32, user_id int64) (rowsAffected int64, err error)
update user_presences set last_seen_at = :last_seen_at, expires = :expires where user_id = :user_id UpdateLastSeenAtTx TODO(@benqi): sqlmap
type UserPrivaciesDAO ¶
type UserPrivaciesDAO struct {
// contains filtered or unexported fields
}
func NewUserPrivaciesDAO ¶
func NewUserPrivaciesDAO(db *sqlx.DB) *UserPrivaciesDAO
func (*UserPrivaciesDAO) InsertBulk ¶
func (dao *UserPrivaciesDAO) InsertBulk(ctx context.Context, doList []*dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
InsertBulk insert into user_privacies(user_id, key_type, rules) values (:user_id, :key_type, :rules) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) InsertBulkTx ¶
func (dao *UserPrivaciesDAO) InsertBulkTx(tx *sqlx.Tx, doList []*dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
InsertBulkTx insert into user_privacies(user_id, key_type, rules) values (:user_id, :key_type, :rules) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) InsertOrUpdate ¶
func (dao *UserPrivaciesDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_privacies(user_id, key_type, rules) values (:user_id, :key_type, :rules) on duplicate key update rules = values(rules) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) InsertOrUpdateTx ¶
func (dao *UserPrivaciesDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserPrivaciesDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_privacies(user_id, key_type, rules) values (:user_id, :key_type, :rules) on duplicate key update rules = values(rules) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectPrivacy ¶
func (dao *UserPrivaciesDAO) SelectPrivacy(ctx context.Context, user_id int64, key_type int32) (rValue *dataobject.UserPrivaciesDO, err error)
SelectPrivacy select id, user_id, key_type, rules from user_privacies where user_id = :user_id and key_type = :key_type TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectPrivacyAll ¶
func (dao *UserPrivaciesDAO) SelectPrivacyAll(ctx context.Context, user_id int64) (rList []dataobject.UserPrivaciesDO, err error)
SelectPrivacyAll select id, user_id, key_type, rules from user_privacies where user_id = :user_id TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectPrivacyAllWithCB ¶
func (dao *UserPrivaciesDAO) SelectPrivacyAllWithCB(ctx context.Context, user_id int64, cb func(i int, v *dataobject.UserPrivaciesDO)) (rList []dataobject.UserPrivaciesDO, err error)
SelectPrivacyAllWithCB select id, user_id, key_type, rules from user_privacies where user_id = :user_id TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectPrivacyList ¶
func (dao *UserPrivaciesDAO) SelectPrivacyList(ctx context.Context, user_id int64, keyList []int32) (rList []dataobject.UserPrivaciesDO, err error)
SelectPrivacyList select id, user_id, key_type, rules from user_privacies where user_id = :user_id and key_type in (:keyList) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectPrivacyListWithCB ¶
func (dao *UserPrivaciesDAO) SelectPrivacyListWithCB(ctx context.Context, user_id int64, keyList []int32, cb func(i int, v *dataobject.UserPrivaciesDO)) (rList []dataobject.UserPrivaciesDO, err error)
SelectPrivacyListWithCB select id, user_id, key_type, rules from user_privacies where user_id = :user_id and key_type in (:keyList) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectUsersPrivacyList ¶
func (dao *UserPrivaciesDAO) SelectUsersPrivacyList(ctx context.Context, idList []int32, keyList []int32) (rList []dataobject.UserPrivaciesDO, err error)
SelectUsersPrivacyList select id, user_id, key_type, rules from user_privacies where user_id in (:idList) and key_type in (:keyList) TODO(@benqi): sqlmap
func (*UserPrivaciesDAO) SelectUsersPrivacyListWithCB ¶
func (dao *UserPrivaciesDAO) SelectUsersPrivacyListWithCB(ctx context.Context, idList []int32, keyList []int32, cb func(i int, v *dataobject.UserPrivaciesDO)) (rList []dataobject.UserPrivaciesDO, err error)
SelectUsersPrivacyListWithCB select id, user_id, key_type, rules from user_privacies where user_id in (:idList) and key_type in (:keyList) TODO(@benqi): sqlmap
type UserProfilePhotosDAO ¶
type UserProfilePhotosDAO struct {
// contains filtered or unexported fields
}
func NewUserProfilePhotosDAO ¶
func NewUserProfilePhotosDAO(db *sqlx.DB) *UserProfilePhotosDAO
func (*UserProfilePhotosDAO) Delete ¶
func (dao *UserProfilePhotosDAO) Delete(ctx context.Context, user_id int64, id_list []int64) (rowsAffected int64, err error)
Delete update user_profile_photos set deleted = 1, date2 = 0 where user_id = :user_id and photo_id in (:id_list) TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) DeleteTx ¶
func (dao *UserProfilePhotosDAO) DeleteTx(tx *sqlx.Tx, user_id int64, id_list []int64) (rowsAffected int64, err error)
update user_profile_photos set deleted = 1, date2 = 0 where user_id = :user_id and photo_id in (:id_list) DeleteTx TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) InsertOrUpdate ¶
func (dao *UserProfilePhotosDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserProfilePhotosDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_profile_photos(user_id, photo_id, date2, deleted) values (:user_id, :photo_id, :date2, 0) on duplicate key update deleted = 0 TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) InsertOrUpdateTx ¶
func (dao *UserProfilePhotosDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserProfilePhotosDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_profile_photos(user_id, photo_id, date2, deleted) values (:user_id, :photo_id, :date2, 0) on duplicate key update deleted = 0 TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) SelectList ¶
func (dao *UserProfilePhotosDAO) SelectList(ctx context.Context, user_id int64) (rList []int64, err error)
SelectList select photo_id from user_profile_photos where user_id = :user_id and deleted = 0 order by id asc TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) SelectListWithCB ¶
func (dao *UserProfilePhotosDAO) SelectListWithCB(ctx context.Context, user_id int64, cb func(i int, v int64)) (rList []int64, err error)
SelectListWithCB select photo_id from user_profile_photos where user_id = :user_id and deleted = 0 order by id asc TODO(@benqi): sqlmap
func (*UserProfilePhotosDAO) SelectNext ¶
func (dao *UserProfilePhotosDAO) SelectNext(ctx context.Context, user_id int64, id_list []int64) (rValue int64, err error)
SelectNext select photo_id from user_profile_photos where user_id = :user_id and photo_id not in (:id_list) and deleted = 0 order by id asc limit 1 TODO(@benqi): sqlmap
type UserSettingsDAO ¶
type UserSettingsDAO struct {
// contains filtered or unexported fields
}
func NewUserSettingsDAO ¶
func NewUserSettingsDAO(db *sqlx.DB) *UserSettingsDAO
func (*UserSettingsDAO) InsertOrUpdate ¶
func (dao *UserSettingsDAO) InsertOrUpdate(ctx context.Context, do *dataobject.UserSettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdate insert into user_settings(user_id, key2, value) values (:user_id, :key2, :value) on duplicate key update value = values(value) TODO(@benqi): sqlmap
func (*UserSettingsDAO) InsertOrUpdateTx ¶
func (dao *UserSettingsDAO) InsertOrUpdateTx(tx *sqlx.Tx, do *dataobject.UserSettingsDO) (lastInsertId, rowsAffected int64, err error)
InsertOrUpdateTx insert into user_settings(user_id, key2, value) values (:user_id, :key2, :value) on duplicate key update value = values(value) TODO(@benqi): sqlmap
func (*UserSettingsDAO) SelectByKey ¶
func (dao *UserSettingsDAO) SelectByKey(ctx context.Context, user_id int64, key2 string) (rValue *dataobject.UserSettingsDO, err error)
SelectByKey select id, user_id, key2, value from user_settings where user_id = :user_id and key2 = :key2 and deleted = 0 limit 1 TODO(@benqi): sqlmap
type UsersDAO ¶
type UsersDAO struct {
// contains filtered or unexported fields
}
func NewUsersDAO ¶
func (*UsersDAO) Delete ¶
func (dao *UsersDAO) Delete(ctx context.Context, delete_reason string, id int64) (rowsAffected int64, err error)
Delete update users set deleted = 1, delete_reason = :delete_reason where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) DeleteTx ¶
func (dao *UsersDAO) DeleteTx(tx *sqlx.Tx, delete_reason string, id int64) (rowsAffected int64, err error)
update users set deleted = 1, delete_reason = :delete_reason where id = :id DeleteTx TODO(@benqi): sqlmap
func (*UsersDAO) Insert ¶
func (dao *UsersDAO) Insert(ctx context.Context, do *dataobject.UsersDO) (lastInsertId, rowsAffected int64, err error)
Insert insert into users(user_type, access_hash, secret_key_id, first_name, last_name, username, phone, country_code, verified, about, is_bot) values (:user_type, :access_hash, :secret_key_id, :first_name, :last_name, :username, :phone, :country_code, :verified, :about, :is_bot) TODO(@benqi): sqlmap
func (*UsersDAO) InsertTx ¶
func (dao *UsersDAO) InsertTx(tx *sqlx.Tx, do *dataobject.UsersDO) (lastInsertId, rowsAffected int64, err error)
InsertTx insert into users(user_type, access_hash, secret_key_id, first_name, last_name, username, phone, country_code, verified, about, is_bot) values (:user_type, :access_hash, :secret_key_id, :first_name, :last_name, :username, :phone, :country_code, :verified, :about, :is_bot) TODO(@benqi): sqlmap
func (*UsersDAO) QueryChannelParticipants ¶
func (dao *UsersDAO) QueryChannelParticipants(ctx context.Context, channelId int64, q1 string, q2 string, q3 string) (rList []dataobject.UsersDO, err error)
QueryChannelParticipants select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where id in (select user_id from channel_participants where channel_id = :channelId and state = 0) and (first_name like :q1 or last_name like :q2 or username like :q3) TODO(@benqi): sqlmap
func (*UsersDAO) QueryChannelParticipantsWithCB ¶
func (dao *UsersDAO) QueryChannelParticipantsWithCB(ctx context.Context, channelId int64, q1 string, q2 string, q3 string, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
QueryChannelParticipantsWithCB select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where id in (select user_id from channel_participants where channel_id = :channelId and state = 0) and (first_name like :q1 or last_name like :q2 or username like :q3) TODO(@benqi): sqlmap
func (*UsersDAO) SearchByQueryNotIdList ¶
func (dao *UsersDAO) SearchByQueryNotIdList(ctx context.Context, q2 string, id_list []int64, limit int32) (rList []dataobject.UsersDO, err error)
SearchByQueryNotIdList select id from users where username like :q2 and id not in (:id_list) limit :limit TODO(@benqi): sqlmap
func (*UsersDAO) SearchByQueryNotIdListWithCB ¶
func (dao *UsersDAO) SearchByQueryNotIdListWithCB(ctx context.Context, q2 string, id_list []int64, limit int32, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
SearchByQueryNotIdListWithCB select id from users where username like :q2 and id not in (:id_list) limit :limit TODO(@benqi): sqlmap
func (*UsersDAO) SelectAccountDaysTTL ¶
func (dao *UsersDAO) SelectAccountDaysTTL(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
SelectAccountDaysTTL select account_days_ttl from users where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) SelectById ¶
func (dao *UsersDAO) SelectById(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
SelectById select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where id = :id limit 1 TODO(@benqi): sqlmap
func (*UsersDAO) SelectByPhoneNumber ¶
func (dao *UsersDAO) SelectByPhoneNumber(ctx context.Context, phone string) (rValue *dataobject.UsersDO, err error)
SelectByPhoneNumber select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where phone = :phone limit 1 TODO(@benqi): sqlmap
func (*UsersDAO) SelectByQueryString ¶
func (dao *UsersDAO) SelectByQueryString(ctx context.Context, username string, first_name string, last_name string, phone string) (rList []dataobject.UsersDO, err error)
SelectByQueryString select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where username = :username or first_name = :first_name or last_name = :last_name or phone = :phone limit 20 TODO(@benqi): sqlmap
func (*UsersDAO) SelectByQueryStringWithCB ¶
func (dao *UsersDAO) SelectByQueryStringWithCB(ctx context.Context, username string, first_name string, last_name string, phone string, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
SelectByQueryStringWithCB select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where username = :username or first_name = :first_name or last_name = :last_name or phone = :phone limit 20 TODO(@benqi): sqlmap
func (*UsersDAO) SelectByUsername ¶
func (dao *UsersDAO) SelectByUsername(ctx context.Context, username string) (rValue *dataobject.UsersDO, err error)
SelectByUsername select id from users where username = :username limit 1 TODO(@benqi): sqlmap
func (*UsersDAO) SelectCountryCode ¶
func (dao *UsersDAO) SelectCountryCode(ctx context.Context, id int64) (rValue *dataobject.UsersDO, err error)
SelectCountryCode select country_code from users where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) SelectProfilePhoto ¶
SelectProfilePhoto select photo_id from users where id = :id limit 1 TODO(@benqi): sqlmap
func (*UsersDAO) SelectUsersByIdList ¶
func (dao *UsersDAO) SelectUsersByIdList(ctx context.Context, id_list []int64) (rList []dataobject.UsersDO, err error)
SelectUsersByIdList select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where id in (:id_list) TODO(@benqi): sqlmap
func (*UsersDAO) SelectUsersByIdListWithCB ¶
func (dao *UsersDAO) SelectUsersByIdListWithCB(ctx context.Context, id_list []int64, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
SelectUsersByIdListWithCB select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where id in (:id_list) TODO(@benqi): sqlmap
func (*UsersDAO) SelectUsersByPhoneList ¶
func (dao *UsersDAO) SelectUsersByPhoneList(ctx context.Context, phoneList []string) (rList []dataobject.UsersDO, err error)
SelectUsersByPhoneList select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where phone in (:phoneList) TODO(@benqi): sqlmap
func (*UsersDAO) SelectUsersByPhoneListWithCB ¶
func (dao *UsersDAO) SelectUsersByPhoneListWithCB(ctx context.Context, phoneList []string, cb func(i int, v *dataobject.UsersDO)) (rList []dataobject.UsersDO, err error)
SelectUsersByPhoneListWithCB select id, user_type, access_hash, secret_key_id, first_name, last_name, username, phone, photo_id, country_code, verified, about, is_bot, deleted from users where phone in (:phoneList) TODO(@benqi): sqlmap
func (*UsersDAO) UpdateAbout ¶
func (dao *UsersDAO) UpdateAbout(ctx context.Context, about string, id int64) (rowsAffected int64, err error)
UpdateAbout update users set about = :about where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateAboutTx ¶
func (dao *UsersDAO) UpdateAboutTx(tx *sqlx.Tx, about string, id int64) (rowsAffected int64, err error)
update users set about = :about where id = :id UpdateAboutTx TODO(@benqi): sqlmap
func (*UsersDAO) UpdateAccountDaysTTL ¶
func (dao *UsersDAO) UpdateAccountDaysTTL(ctx context.Context, account_days_ttl int32, id int64) (rowsAffected int64, err error)
UpdateAccountDaysTTL update users set account_days_ttl = :account_days_ttl where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateAccountDaysTTLTx ¶
func (dao *UsersDAO) UpdateAccountDaysTTLTx(tx *sqlx.Tx, account_days_ttl int32, id int64) (rowsAffected int64, err error)
update users set account_days_ttl = :account_days_ttl where id = :id UpdateAccountDaysTTLTx TODO(@benqi): sqlmap
func (*UsersDAO) UpdateFirstAndLastName ¶
func (dao *UsersDAO) UpdateFirstAndLastName(ctx context.Context, first_name string, last_name string, id int64) (rowsAffected int64, err error)
UpdateFirstAndLastName update users set first_name = :first_name, last_name = :last_name where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateFirstAndLastNameTx ¶
func (dao *UsersDAO) UpdateFirstAndLastNameTx(tx *sqlx.Tx, first_name string, last_name string, id int64) (rowsAffected int64, err error)
update users set first_name = :first_name, last_name = :last_name where id = :id UpdateFirstAndLastNameTx TODO(@benqi): sqlmap
func (*UsersDAO) UpdateProfile ¶
func (dao *UsersDAO) UpdateProfile(ctx context.Context, first_name string, last_name string, about string, id int64) (rowsAffected int64, err error)
UpdateProfile update users set first_name = :first_name, last_name = :last_name, about = :about where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateProfilePhoto ¶
func (dao *UsersDAO) UpdateProfilePhoto(ctx context.Context, photo_id int64, id int64) (rowsAffected int64, err error)
UpdateProfilePhoto update users set photo_id = :photo_id where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateProfilePhotoTx ¶
func (dao *UsersDAO) UpdateProfilePhotoTx(tx *sqlx.Tx, photo_id int64, id int64) (rowsAffected int64, err error)
update users set photo_id = :photo_id where id = :id UpdateProfilePhotoTx TODO(@benqi): sqlmap
func (*UsersDAO) UpdateProfileTx ¶
func (dao *UsersDAO) UpdateProfileTx(tx *sqlx.Tx, first_name string, last_name string, about string, id int64) (rowsAffected int64, err error)
update users set first_name = :first_name, last_name = :last_name, about = :about where id = :id UpdateProfileTx TODO(@benqi): sqlmap
func (*UsersDAO) UpdateUser ¶
func (dao *UsersDAO) UpdateUser(ctx context.Context, cMap map[string]interface{}, id int64) (rowsAffected int64, err error)
UpdateUser update users set %s where id = :id TODO(@benqi): sqlmap
func (*UsersDAO) UpdateUserTx ¶
func (dao *UsersDAO) UpdateUserTx(tx *sqlx.Tx, cMap map[string]interface{}, id int64) (rowsAffected int64, err error)
UpdateUserTx update users set %s where id = :id TODO(@benqi): sqlmap
Source Files ¶
- bot_commands_dao.go
- bots_dao.go
- imported_contacts_dao.go
- phone_books_dao.go
- popular_contacts_dao.go
- predefined_users_dao.go
- unregistered_contacts_dao.go
- user_contacts_dao.go
- user_global_privacy_settings_dao.go
- user_notify_settings_dao.go
- user_notify_settings_ext_dao.go
- user_peer_blocks_dao.go
- user_peer_settings_dao.go
- user_presences_dao.go
- user_privacies_dao.go
- user_profile_photos_dao.go
- user_settings_dao.go
- users_dao.go