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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthSeqUpdatesDAO

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

func NewAuthSeqUpdatesDAO

func NewAuthSeqUpdatesDAO(db *sqlx.DB) *AuthSeqUpdatesDAO

func (*AuthSeqUpdatesDAO) Insert

insert into auth_seq_updates(auth_id, user_id, seq, update_type, update_data, date2) values (:auth_id, :user_id, :seq, :update_type, :update_data, :date2) TODO(@benqi): sqlmap

func (*AuthSeqUpdatesDAO) SelectByGtSeq

func (dao *AuthSeqUpdatesDAO) SelectByGtSeq(auth_id int64, user_id int32, seq int32) []dataobject.AuthSeqUpdatesDO

select auth_id, user_id, seq, update_type, update_data, date2 from user_seq_updates where auth_id = :auth_id and user_id = :user_id and seq > :seq order by seq asc TODO(@benqi): sqlmap

func (*AuthSeqUpdatesDAO) SelectLastSeq

func (dao *AuthSeqUpdatesDAO) SelectLastSeq(auth_id int64, user_id int32) *dataobject.AuthSeqUpdatesDO

select seq from auth_seq_updates where auth_id = :auth_id and user_id = :user_id order by seq desc limit 1 TODO(@benqi): sqlmap

type AuthUpdatesStateDAO

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

func NewAuthUpdatesStateDAO

func NewAuthUpdatesStateDAO(db *sqlx.DB) *AuthUpdatesStateDAO

func (*AuthUpdatesStateDAO) Insert

insert into auth_updates_state(auth_key_id, user_id, pts, pts2, qts, qts2, seq, seq2, `date`) values (:auth_key_id, :user_id, :pts, :pts2, :qts, :qts2, :seq, :seq2, :date) TODO(@benqi): sqlmap

func (*AuthUpdatesStateDAO) SelectByAuthId

func (dao *AuthUpdatesStateDAO) SelectByAuthId(auth_key_id int64) *dataobject.AuthUpdatesStateDO

select pts, pts2, qts, qts2, seq, seq2, `date` from auth_updates_state where auth_key_id = :auth_key_id TODO(@benqi): sqlmap

func (*AuthUpdatesStateDAO) UpdatePts2AndQts2

func (dao *AuthUpdatesStateDAO) UpdatePts2AndQts2(pts2 int32, qts2 int32, auth_key_id int64) int64

update auth_updates_state set pts2 = :pts2, qts2 = :qts2 where auth_key_id = :auth_key_id TODO(@benqi): sqlmap

func (*AuthUpdatesStateDAO) UpdatePtsAndQts

func (dao *AuthUpdatesStateDAO) UpdatePtsAndQts(pts int32, qts int32, auth_key_id int64) int64

update auth_updates_state set pts = :pts, pts2 = :pts, qts = :qts, qts2 = :qts where auth_key_id = :auth_key_id TODO(@benqi): sqlmap

type ChannelPtsUpdatesDAO

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

func NewChannelPtsUpdatesDAO

func NewChannelPtsUpdatesDAO(db *sqlx.DB) *ChannelPtsUpdatesDAO

func (*ChannelPtsUpdatesDAO) Insert

insert into channel_pts_updates(channel_id, pts, pts_count, update_type, update_data, date2) values (:channel_id, :pts, :pts_count, :update_type, :update_data, :date2) TODO(@benqi): sqlmap

func (*ChannelPtsUpdatesDAO) SelectByGtPts

func (dao *ChannelPtsUpdatesDAO) SelectByGtPts(channel_id int32, pts int32) []dataobject.ChannelPtsUpdatesDO

select channel_id, pts, pts_count, update_type, update_data from channel_pts_updates where channel_id = :channel_id and pts > :pts order by pts asc TODO(@benqi): sqlmap

func (*ChannelPtsUpdatesDAO) SelectLastPts

func (dao *ChannelPtsUpdatesDAO) SelectLastPts(channel_id int32) *dataobject.ChannelPtsUpdatesDO

select pts from channel_pts_updates where channel_id = :channel_id order by pts desc limit 1 TODO(@benqi): sqlmap

type CommonDAO

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

func NewCommonDAO

func NewCommonDAO(db *sqlx.DB) *CommonDAO

func (*CommonDAO) CheckExists

func (dao *CommonDAO) CheckExists(table string, params map[string]interface{}) bool

检查是否存在 TODO(@benqi): SELECT count(id) 是否会快一点?

type UserPtsUpdatesDAO

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

func NewUserPtsUpdatesDAO

func NewUserPtsUpdatesDAO(db *sqlx.DB) *UserPtsUpdatesDAO

func (*UserPtsUpdatesDAO) Insert

insert into user_pts_updates(user_id, pts, pts_count, update_type, update_data, date2) values (:user_id, :pts, :pts_count, :update_type, :update_data, :date2) TODO(@benqi): sqlmap

func (*UserPtsUpdatesDAO) SelectByGtPts

func (dao *UserPtsUpdatesDAO) SelectByGtPts(user_id int32, pts int32) []dataobject.UserPtsUpdatesDO

select user_id, pts, pts_count, update_type, update_data from user_pts_updates where user_id = :user_id and pts > :pts order by pts asc TODO(@benqi): sqlmap

func (*UserPtsUpdatesDAO) SelectLastPts

func (dao *UserPtsUpdatesDAO) SelectLastPts(user_id int32) *dataobject.UserPtsUpdatesDO

select pts from user_pts_updates where user_id = :user_id order by pts desc limit 1 TODO(@benqi): sqlmap

type UserQtsUpdatesDAO

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

func NewUserQtsUpdatesDAO

func NewUserQtsUpdatesDAO(db *sqlx.DB) *UserQtsUpdatesDAO

func (*UserQtsUpdatesDAO) Insert

insert into user_qts_updates(user_id, qts, update_type, update_data, date2) values (:user_id, :qts, :update_type, :update_data, :date2) TODO(@benqi): sqlmap

func (*UserQtsUpdatesDAO) SelectByGtQts

func (dao *UserQtsUpdatesDAO) SelectByGtQts(user_id int32, qts int32) []dataobject.UserQtsUpdatesDO

select user_id, qts, update_type, update_data, date2 from user_qts_updates where user_id = :user_id and qts > :qts order by qts asc TODO(@benqi): sqlmap

func (*UserQtsUpdatesDAO) SelectLastQts

func (dao *UserQtsUpdatesDAO) SelectLastQts(user_id int32) *dataobject.UserQtsUpdatesDO

select qts from user_qts_updates where user_id = :user_id order by qts desc limit 1 TODO(@benqi): sqlmap

Jump to

Keyboard shortcuts

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