mysql_dao

package
v0.0.0-...-e41513e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthKeysDAO

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

func NewAuthKeysDAO

func NewAuthKeysDAO(db *sqlx.DB) *AuthKeysDAO

func (*AuthKeysDAO) Insert

func (dao *AuthKeysDAO) Insert(do *dataobject.AuthKeysDO) int64

insert into auth_keys(auth_key_id, body) values (:auth_key_id, :body) TODO(@benqi): sqlmap

func (*AuthKeysDAO) SelectByAuthKeyId

func (dao *AuthKeysDAO) SelectByAuthKeyId(auth_key_id int64) *dataobject.AuthKeysDO

select auth_key_id, body from auth_keys where auth_key_id = :auth_key_id TODO(@benqi): sqlmap

type AuthOpLogsDAO

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

func NewAuthOpLogsDAO

func NewAuthOpLogsDAO(db *sqlx.DB) *AuthOpLogsDAO

func (*AuthOpLogsDAO) InsertOrUpdate

func (dao *AuthOpLogsDAO) InsertOrUpdate(do *dataobject.AuthOpLogsDO) int64

insert into auth_op_logs(auth_key_id, ip, op_type, log_text) values (:auth_key_id, :ip, :op_type, :log_text) TODO(@benqi): sqlmap

type AuthUsersDAO

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

func NewAuthUsersDAO

func NewAuthUsersDAO(db *sqlx.DB) *AuthUsersDAO

func (*AuthUsersDAO) Delete

func (dao *AuthUsersDAO) Delete(auth_key_id int64, user_id int32) int64

update auth_users set deleted = 1, date_actived = 0 where auth_key_id = :auth_key_id and user_id = :user_id TODO(@benqi): sqlmap

func (*AuthUsersDAO) DeleteByHash

func (dao *AuthUsersDAO) DeleteByHash(id int32) int64

update auth_users set deleted = 1, date_created = 0, date_actived = 0 where id = :id TODO(@benqi): sqlmap

func (*AuthUsersDAO) InsertOrUpdates

func (dao *AuthUsersDAO) InsertOrUpdates(do *dataobject.AuthUsersDO) int64

insert into auth_users(auth_key_id, user_id, hash, date_created, date_actived) values (:auth_key_id, :user_id, :hash, :date_created, :date_actived) on duplicate key update hash = values(hash), date_actived = values(date_actived), deleted = 0 TODO(@benqi): sqlmap

func (*AuthUsersDAO) Select

func (dao *AuthUsersDAO) Select(auth_key_id int64) *dataobject.AuthUsersDO

select id, auth_key_id, user_id, hash, date_created, date_actived from auth_users where auth_key_id = :auth_key_id and deleted = 0 TODO(@benqi): sqlmap

func (*AuthUsersDAO) SelectAuthKeyIds

func (dao *AuthUsersDAO) SelectAuthKeyIds(user_id int32) []dataobject.AuthUsersDO

select id, auth_key_id, user_id, hash from auth_users where user_id = :user_id and deleted = 0 TODO(@benqi): sqlmap

func (*AuthUsersDAO) SelectByHash

func (dao *AuthUsersDAO) SelectByHash(hash int64) *dataobject.AuthUsersDO

select id, auth_key_id, user_id, hash from auth_users where hash = :hash and deleted = 0 TODO(@benqi): sqlmap

type AuthsDAO

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

func NewAuthsDAO

func NewAuthsDAO(db *sqlx.DB) *AuthsDAO

func (*AuthsDAO) InsertOrUpdate

func (dao *AuthsDAO) InsertOrUpdate(do *dataobject.AuthsDO) int64

insert into auths(auth_key_id, layer, api_id, device_model, system_version, app_version, system_lang_code, lang_pack, lang_code, client_ip) values (:auth_key_id, :layer, :api_id, :device_model, :system_version, :app_version, :system_lang_code, :lang_pack, :lang_code, :client_ip) on duplicate key update layer = values(layer), system_version = values(system_version), app_version = values(app_version), system_lang_code = values(system_lang_code), lang_pack = values(lang_pack), lang_code = values(lang_code), client_ip = values(client_ip) TODO(@benqi): sqlmap

func (*AuthsDAO) SelectLayer

func (dao *AuthsDAO) SelectLayer(auth_key_id int64) *dataobject.AuthsDO

select layer from auths where auth_key_id = :auth_key_id TODO(@benqi): sqlmap

func (*AuthsDAO) SelectSessions

func (dao *AuthsDAO) SelectSessions(idList []int64) []dataobject.AuthsDO

select auth_key_id, layer, api_id, device_model, system_version, app_version, system_lang_code, lang_pack, lang_code, client_ip from auths where auth_key_id in (:idList) TODO(@benqi): sqlmap

Jump to

Keyboard shortcuts

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