Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddFav(c context.Context, fr *model.Favorite) (rows int64, err error)
- func (d *Dao) AddFidsRedis(c context.Context, typ int8, mid int64, fs ...*model.Folder) (err error)
- func (d *Dao) AddFolder(c context.Context, f *model.Folder) (fid int64, err error)
- func (d *Dao) AddFoldersCache(c context.Context, tp int8, mid int64, folders []*model.Folder) (err error)
- func (d *Dao) AddRelation(c context.Context, fr *model.Favorite) (rows int64, err error)
- func (d *Dao) AddRelationCache(c context.Context, m *model.Favorite) (err error)
- func (d *Dao) AddRelationOidCache(c context.Context, tp int8, mid, oid int64) (err error)
- func (d *Dao) BatchOids(c context.Context, typ int8, mid int64, limit int) (oids []int64, err error)
- func (d *Dao) BatchOidsMc(c context.Context, typ int8, mid int64) (oids []int64, err error)
- func (d *Dao) BatchOidsRedis(c context.Context, tp int8, mid int64, limit int) (oids []int64, err error)
- func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)
- func (d *Dao) Close()
- func (d *Dao) CntAllRelations(c context.Context, mid, fid int64) (count int, err error)
- func (d *Dao) CntAllRelationsCache(c context.Context, mid, fid int64) (cnt int, err error)
- func (d *Dao) CntRelations(c context.Context, mid, fid int64, typ int8) (count int, err error)
- func (d *Dao) CntRelationsCache(c context.Context, mid, fid int64) (cnt int, err error)
- func (d *Dao) CntUsers(c context.Context, typ int8, oid int64) (count int, err error)
- func (d *Dao) CopyRelations(c context.Context, typ int8, oldmid, mid, oldfid, newfid int64, oids []int64) (rows int64, err error)
- func (d *Dao) DefaultFolder(c context.Context, tp int8, mid int64) (f *model.Folder, err error)
- func (d *Dao) DelAllRelationsCache(c context.Context, mid, fid int64) (err error)
- func (d *Dao) DelFav(c context.Context, tp int8, mid, fid, oid int64) (rows int64, err error)
- func (d *Dao) DelFidsRedis(c context.Context, typ int8, mid int64) (err error)
- func (d *Dao) DelFolder(c context.Context, tp int8, mid, fid int64) (rows int64, err error)
- func (d *Dao) DelFolderMc(c context.Context, typ int8, mid, fid int64) (err error)
- func (d *Dao) DelFolderSortMc(c context.Context, typ int8, mid int64) (err error)
- func (d *Dao) DelRecentOidsMc(c context.Context, typ int8, mid int64) (err error)
- func (d *Dao) DelRecentResMc(c context.Context, typ int8, mid int64) (err error)
- func (d *Dao) DelRelation(c context.Context, tp int8, mid, fid, oid int64) (rows int64, err error)
- func (d *Dao) DelRelationFidsMc(c context.Context, typ int8, mid int64, oids ...int64) (err error)
- func (d *Dao) DelRelationOidsCache(c context.Context, typ int8, mid int64) (err error)
- func (d *Dao) DelRelationsCache(c context.Context, mid, fid int64) (err error)
- func (d *Dao) ExpireAllRelations(c context.Context, mid, fid int64) (ok bool, err error)
- func (d *Dao) ExpireFolder(c context.Context, tp int8, mid int64) (ok bool, err error)
- func (d *Dao) ExpireRelationOids(c context.Context, tp int8, mid int64) (ok bool, err error)
- func (d *Dao) ExpireRelations(c context.Context, mid, fid int64) (ok bool, err error)
- func (d *Dao) FavedBit(c context.Context, tp int8, mid int64) (unfaved bool, err error)
- func (d *Dao) FidsRedis(c context.Context, tp int8, mid int64) (fids []int64, err error)
- func (d *Dao) Folder(c context.Context, tp int8, mid, fid int64) (f *model.Folder, err error)
- func (d *Dao) FolderAllRelations(c context.Context, mid, fid int64, start, end int) (fr []*model.Favorite, err error)
- func (d *Dao) FolderAllRelationsCache(c context.Context, typ int8, mid, fid int64, start, end int) (res []*model.Favorite, err error)
- func (d *Dao) FolderByName(c context.Context, tp int8, mid int64, name string) (f *model.Folder, err error)
- func (d *Dao) FolderCnt(c context.Context, tp int8, mid int64) (count int, err error)
- func (d *Dao) FolderMc(c context.Context, typ int8, mid, fid int64) (f *model.Folder, err error)
- func (d *Dao) FolderRelations(c context.Context, typ int8, mid, fid int64, start, end int) (fr []*model.Favorite, err error)
- func (d *Dao) FolderRelationsCache(c context.Context, typ int8, mid, fid int64, start, end int) (res []*model.Favorite, err error)
- func (d *Dao) FolderSort(c context.Context, typ int8, mid int64) (fst *model.FolderSort, err error)
- func (d *Dao) FolderSortMc(c context.Context, typ int8, mid int64) (fst *model.FolderSort, err error)
- func (d *Dao) FolderStats(c context.Context, fvmids []*model.ArgFVmid) (fs map[int64]*model.Folder, err error)
- func (d *Dao) FolderStatsMc(c context.Context, fvmids []*model.ArgFVmid) (fs map[int64]*model.Folder, missFvmids []*model.ArgFVmid, err error)
- func (d *Dao) Folders(c context.Context, fvmids []*model.ArgFVmid) (fs map[string]*model.Folder, err error)
- func (d *Dao) FoldersMc(c context.Context, fvmids []*model.ArgFVmid) (fs map[string]*model.Folder, missFvmids []*model.ArgFVmid, err error)
- func (d *Dao) IsCleaned(c context.Context, typ int8, mid, fid int64) (cleanedTime int64, err error)
- func (d *Dao) IsFavedCache(c context.Context, tp int8, mid int64, oid int64) (isFaved bool, err error)
- func (d *Dao) IsFavedsCache(c context.Context, tp int8, mid int64, oids []int64) (favoreds map[int64]bool, err error)
- func (d *Dao) MultiAddRelations(c context.Context, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
- func (d *Dao) MultiDelRelations(c context.Context, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
- func (d *Dao) MultiExpireAllRelations(c context.Context, mid int64, fids []int64) (map[int64]bool, error)
- func (d *Dao) MultiExpireRelations(c context.Context, mid int64, fids []int64) (map[int64]bool, error)
- func (d *Dao) OidCount(c context.Context, typ int8, oid int64) (count int64, err error)
- func (d *Dao) OidCountMc(c context.Context, typ int8, oid int64) (count int64, err error)
- func (d *Dao) OidsCount(c context.Context, typ int8, oids []int64) (counts map[int64]int64, err error)
- func (d *Dao) OidsCountMc(c context.Context, typ int8, oids []int64) (counts map[int64]int64, misOids []int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubAddFav(c context.Context, tp int8, mid, fid, oid int64, attr int32, ts int64, ...)
- func (d *Dao) PubAddFolder(c context.Context, typ int8, mid, fid int64, attr int32)
- func (d *Dao) PubClean(c context.Context, typ int8, mid, fid, ftime int64)
- func (d *Dao) PubCopyFavs(c context.Context, typ int8, mid, ofid, nfid, rows int64, oids []int64, ...)
- func (d *Dao) PubDelFav(c context.Context, tp int8, mid, fid, oid int64, attr int32, ts int64, ...)
- func (d *Dao) PubDelFolder(c context.Context, typ int8, mid, fid int64, attr int32, ts int64)
- func (d *Dao) PubInitAllFolderRelations(c context.Context, tp int8, mid, fid int64)
- func (d *Dao) PubInitFolderRelations(c context.Context, tp int8, mid, fid int64)
- func (d *Dao) PubInitRelationFids(c context.Context, tp int8, mid int64)
- func (d *Dao) PubMoveFavs(c context.Context, typ int8, mid, ofid, nfid, rows int64, oids []int64, ...)
- func (d *Dao) PubMultiAddFavs(c context.Context, typ int8, mid, fid, rows int64, attr int32, oids []int64, ...)
- func (d *Dao) PubMultiDelFavs(c context.Context, typ int8, mid, fid, rows int64, attr int32, oids []int64, ...)
- func (d *Dao) PubSortFavs(c context.Context, tp int8, mid, fid int64, sorts []model.SortFav)
- func (d *Dao) RecentOids(c context.Context, mid, fid int64, typ int8) (oids []int64, err error)
- func (d *Dao) RecentOidsCache(c context.Context, typ int8, mid int64, fids []int64) (rctFidsMap map[int64][]int64, missFids []int64, err error)
- func (d *Dao) RecentRes(c context.Context, mid, fid int64) (res []*model.Resource, err error)
- func (d *Dao) RelaitonFidsMc(c context.Context, typ int8, mid, oid int64) (fids []int64, err error)
- func (d *Dao) Relation(c context.Context, tp int8, mid, fid, oid int64) (m *model.Favorite, err error)
- func (d *Dao) RelationFidsByOid(c context.Context, tp int8, mid, oid int64) (fids []int64, err error)
- func (d *Dao) RelationFidsByOids(c context.Context, tp int8, mid int64, oids []int64) (fidsMap map[int64][]int64, err error)
- func (d *Dao) RemFidsRedis(c context.Context, typ int8, mid int64, fs ...*model.Folder) (err error)
- func (d *Dao) RemRelationOidCache(c context.Context, tp int8, mid, oid int64) (err error)
- func (d *Dao) SearchArcs(c context.Context, keyword string, ids []int64, pn, ps int) (res *schmdl.IDsResp, err error)
- func (d *Dao) SetBatchOidsMc(c context.Context, typ int8, mid int64, oids []int64) (err error)
- func (d *Dao) SetCleanedCache(c context.Context, typ int8, mid, fid, ftime, expire int64) (err error)
- func (d *Dao) SetFavedBit(c context.Context, tp int8, mid int64) (err error)
- func (d *Dao) SetFolderSortMc(c context.Context, fst *model.FolderSort) (err error)
- func (d *Dao) SetFolderStatsMc(c context.Context, stats map[int64]*model.Folder) (err error)
- func (d *Dao) SetFoldersMc(c context.Context, vs ...*model.Folder) (err error)
- func (d *Dao) SetOidCountMc(c context.Context, typ int8, oid, count int64) (err error)
- func (d *Dao) SetOidsCountMc(c context.Context, typ int8, cnts map[int64]int64) (err error)
- func (d *Dao) SetRelaitonFidsMc(c context.Context, typ int8, mid, oid int64, fids []int64) (err error)
- func (d *Dao) SetUnFavedBit(c context.Context, tp int8, mid int64) (err error)
- func (d *Dao) SetUserRecentOidsMc(c context.Context, typ int8, mid int64, oids []int64) (err error)
- func (d *Dao) SetUserRecentResourcesMc(c context.Context, typ int8, mid int64, recents []*model.Resource) (err error)
- func (d *Dao) TxCopyRelations(tx *sql.Tx, typ int8, oldmid, mid, oldfid, newfid int64, oids []int64) (rows int64, err error)
- func (d *Dao) TxMultiDelRelations(tx *sql.Tx, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
- func (d *Dao) UpFolderAttr(c context.Context, typ int8, mid, fid int64, attr int32) (rows int64, err error)
- func (d *Dao) UpFolderName(c context.Context, typ int8, mid, fid int64, name string) (rows int64, err error)
- func (d *Dao) UpFolderSort(c context.Context, fst *model.FolderSort) (rows int64, err error)
- func (d *Dao) UpdateFolder(c context.Context, f *model.Folder) (fid int64, err error)
- func (d *Dao) UserFolders(c context.Context, typ int8, mid int64) (fs map[int64]*model.Folder, err error)
- func (d *Dao) UserRecentOidsMc(c context.Context, typ int8, mid int64) (oids []int64, err error)
- func (d *Dao) UserRecentResourcesMc(c context.Context, typ int8, mid int64) (recents []*model.Resource, err error)
- func (d *Dao) Users(c context.Context, typ int8, oid int64, start, end int) (us []*model.User, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao favorite dao.
func (*Dao) AddFidsRedis ¶
AddFidsRedis set user's fids to redis
func (*Dao) AddFoldersCache ¶
func (d *Dao) AddFoldersCache(c context.Context, tp int8, mid int64, folders []*model.Folder) (err error)
AddFoldersCache add the user all folders to redis.
func (*Dao) AddRelation ¶
AddRelation add a favorite relation to mysql.
func (*Dao) AddRelationCache ¶
AddRelationCache add a relation to redis.
func (*Dao) AddRelationOidCache ¶
AddRelationOidCache add favoured oid.
func (*Dao) BatchOids ¶
func (d *Dao) BatchOids(c context.Context, typ int8, mid int64, limit int) (oids []int64, err error)
BatchOids get batch oids from mysql.
func (*Dao) BatchOidsMc ¶
BatchOidsMc return oids from mc.
func (*Dao) BatchOidsRedis ¶
func (d *Dao) BatchOidsRedis(c context.Context, tp int8, mid int64, limit int) (oids []int64, err error)
BatchOidsRedis return the user's 1000 oids from redis.
func (*Dao) CntAllRelations ¶
CntRelations get favoried folders count in relation from mysql.
func (*Dao) CntAllRelationsCache ¶
CntAllRelationsCache return the folder all relation count from redis.
func (*Dao) CntRelations ¶
CntRelations get favoried folders count in relation from mysql.
func (*Dao) CntRelationsCache ¶
CntRelationsCache return the folder all relation count from redis.
func (*Dao) CopyRelations ¶
func (d *Dao) CopyRelations(c context.Context, typ int8, oldmid, mid, oldfid, newfid int64, oids []int64) (rows int64, err error)
CopyRelations copy resources from oldfid to newfid by oids.
func (*Dao) DefaultFolder ¶
DefaultFolder get default folder from mysql.
func (*Dao) DelAllRelationsCache ¶
DelRelationsCache delete the folder relation cache.
func (*Dao) DelFidsRedis ¶
DelFidsRedis delete user's all fids from redis.
func (*Dao) DelFolderMc ¶
DelFolderMc delete folder mc cache.
func (*Dao) DelFolderSortMc ¶
DelFolderSortMc delete folder's sort mc cache.
func (*Dao) DelRecentOidsMc ¶
DelRecentOidsMc delete recent oids mc cache.
func (*Dao) DelRecentResMc ¶
DelRecentResMc delete recent oids mc cache.
func (*Dao) DelRelation ¶
DelRelation delete a favorite relation to mysql.
func (*Dao) DelRelationFidsMc ¶
DelRelationFidsMc delete oid's fid mc cache.
func (*Dao) DelRelationOidsCache ¶
DelRelationOidsCache .
func (*Dao) DelRelationsCache ¶
DelRelationsCache delete the folder relation cache.
func (*Dao) ExpireAllRelations ¶
ExpireAllRelations expire folder relations cache.
func (*Dao) ExpireFolder ¶
ExpireFolder expire folder cache.
func (*Dao) ExpireRelationOids ¶
ExpireRelationOids set expire for faved oids.
func (*Dao) ExpireRelations ¶
ExpireRelations expire folder relations cache.
func (*Dao) FolderAllRelations ¶
func (d *Dao) FolderAllRelations(c context.Context, mid, fid int64, start, end int) (fr []*model.Favorite, err error)
FolderAllRelations get favorite relations from mysql.
func (*Dao) FolderAllRelationsCache ¶
func (d *Dao) FolderAllRelationsCache(c context.Context, typ int8, mid, fid int64, start, end int) (res []*model.Favorite, err error)
FolderRelationsCache return the folder all relations from redis.
func (*Dao) FolderByName ¶
func (d *Dao) FolderByName(c context.Context, tp int8, mid int64, name string) (f *model.Folder, err error)
FolderByName get a Folder by name from mysql.
func (*Dao) FolderRelations ¶
func (d *Dao) FolderRelations(c context.Context, typ int8, mid, fid int64, start, end int) (fr []*model.Favorite, err error)
FolderRelations get favorite relations from mysql.
func (*Dao) FolderRelationsCache ¶
func (d *Dao) FolderRelationsCache(c context.Context, typ int8, mid, fid int64, start, end int) (res []*model.Favorite, err error)
FolderRelationsCache return the folder all relations from redis.
func (*Dao) FolderSort ¶
FolderSort return user's folders sort by type & mid.
func (*Dao) FolderSortMc ¶
func (d *Dao) FolderSortMc(c context.Context, typ int8, mid int64) (fst *model.FolderSort, err error)
FolderSortMc return folder sort binary from mc.
func (*Dao) FolderStats ¶
func (d *Dao) FolderStats(c context.Context, fvmids []*model.ArgFVmid) (fs map[int64]*model.Folder, err error)
FolderStats get folders from mysql.
func (*Dao) FolderStatsMc ¶
func (d *Dao) FolderStatsMc(c context.Context, fvmids []*model.ArgFVmid) (fs map[int64]*model.Folder, missFvmids []*model.ArgFVmid, err error)
FolderStatsMc return folders stat by mid & fid from mc.
func (*Dao) Folders ¶
func (d *Dao) Folders(c context.Context, fvmids []*model.ArgFVmid) (fs map[string]*model.Folder, err error)
Folders get folders from mysql.
func (*Dao) FoldersMc ¶
func (d *Dao) FoldersMc(c context.Context, fvmids []*model.ArgFVmid) (fs map[string]*model.Folder, missFvmids []*model.ArgFVmid, err error)
FoldersMc return folders by mid & fid from mc.
func (*Dao) IsFavedCache ¶
func (d *Dao) IsFavedCache(c context.Context, tp int8, mid int64, oid int64) (isFaved bool, err error)
IsFavedCache return true or false to judge object whether faved by user.
func (*Dao) IsFavedsCache ¶
func (d *Dao) IsFavedsCache(c context.Context, tp int8, mid int64, oids []int64) (favoreds map[int64]bool, err error)
IsFavedsCache return true or false to judge object whether faved by user.
func (*Dao) MultiAddRelations ¶
func (d *Dao) MultiAddRelations(c context.Context, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
MultiAddRelations insert relations to mysql.
func (*Dao) MultiDelRelations ¶
func (d *Dao) MultiDelRelations(c context.Context, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
MultiDelRelations delete relations to mysql.
func (*Dao) MultiExpireAllRelations ¶
func (d *Dao) MultiExpireAllRelations(c context.Context, mid int64, fids []int64) (map[int64]bool, error)
MultiExpireRelations expire folders's relations cache.
func (*Dao) MultiExpireRelations ¶
func (d *Dao) MultiExpireRelations(c context.Context, mid int64, fids []int64) (map[int64]bool, error)
MultiExpireRelations expire folders's relations cache.
func (*Dao) OidCountMc ¶
OidCountMc return oid count from mc.
func (*Dao) OidsCount ¶
func (d *Dao) OidsCount(c context.Context, typ int8, oids []int64) (counts map[int64]int64, err error)
OidsCount get oids's count from mysql.
func (*Dao) OidsCountMc ¶
func (d *Dao) OidsCountMc(c context.Context, typ int8, oids []int64) (counts map[int64]int64, misOids []int64, err error)
OidsCountMc return oids's count from mc.
func (*Dao) PubAddFav ¶
func (d *Dao) PubAddFav(c context.Context, tp int8, mid, fid, oid int64, attr int32, ts int64, otype int8)
PubAddFav push the add resource event into databus.
func (*Dao) PubAddFolder ¶
PubAddFolder push the add folder action event into databus.
func (*Dao) PubCopyFavs ¶
func (d *Dao) PubCopyFavs(c context.Context, typ int8, mid, ofid, nfid, rows int64, oids []int64, ts int64)
PubCopyFavs push the copy resources event into databus.
func (*Dao) PubDelFav ¶
func (d *Dao) PubDelFav(c context.Context, tp int8, mid, fid, oid int64, attr int32, ts int64, otype int8)
PubDelFav push the delete favorite event into databus.
func (*Dao) PubDelFolder ¶
PubDelFolder push the del folder action event into databus.
func (*Dao) PubInitAllFolderRelations ¶
PubInitAllFolderRelations push the folder relations cache event into databus.
func (*Dao) PubInitFolderRelations ¶
PubInitFolderRelations push the folder relations cache event into databus.
func (*Dao) PubInitRelationFids ¶
PubInitRelationFids push the relationfids cache event into databus.
func (*Dao) PubMoveFavs ¶
func (d *Dao) PubMoveFavs(c context.Context, typ int8, mid, ofid, nfid, rows int64, oids []int64, ts int64)
PubMoveFavs push the move resources event into databus.
func (*Dao) PubMultiAddFavs ¶
func (d *Dao) PubMultiAddFavs(c context.Context, typ int8, mid, fid, rows int64, attr int32, oids []int64, ts int64)
PubMultiAddFavs push the multi add fav relations event into databus.
func (*Dao) PubMultiDelFavs ¶
func (d *Dao) PubMultiDelFavs(c context.Context, typ int8, mid, fid, rows int64, attr int32, oids []int64, ts int64)
PubMultiDelFavs push the multi del fav relations event into databus.
func (*Dao) PubSortFavs ¶
PubAddFav push the add resource event into databus.
func (*Dao) RecentOids ¶
RecentOids return user's three newest fav from a folder.
func (*Dao) RecentOidsCache ¶
func (d *Dao) RecentOidsCache(c context.Context, typ int8, mid int64, fids []int64) (rctFidsMap map[int64][]int64, missFids []int64, err error)
RecentOidsCache return three recent oids of all user's folders from redis.
func (*Dao) RelaitonFidsMc ¶
RelaitonFidsMc return fids from mc.
func (*Dao) Relation ¶
func (d *Dao) Relation(c context.Context, tp int8, mid, fid, oid int64) (m *model.Favorite, err error)
Relation get a relation from mysql.
func (*Dao) RelationFidsByOid ¶
func (d *Dao) RelationFidsByOid(c context.Context, tp int8, mid, oid int64) (fids []int64, err error)
RelationFidsByOid get favortied folders in relations by oid from mysql.
func (*Dao) RelationFidsByOids ¶
func (d *Dao) RelationFidsByOids(c context.Context, tp int8, mid int64, oids []int64) (fidsMap map[int64][]int64, err error)
RelationFidsByOids get favortied folders in relations by oid from mysql.
func (*Dao) RemFidsRedis ¶
RemFidsRedis del user's fids in redis
func (*Dao) RemRelationOidCache ¶
RemRelationOidCache del faved oid.
func (*Dao) SearchArcs ¶
func (d *Dao) SearchArcs(c context.Context, keyword string, ids []int64, pn, ps int) (res *schmdl.IDsResp, err error)
SearchArcs return archive ids by aids.
func (*Dao) SetBatchOidsMc ¶
SetBatchOidsMc set oids binary data to mc.
func (*Dao) SetCleanedCache ¶
func (d *Dao) SetCleanedCache(c context.Context, typ int8, mid, fid, ftime, expire int64) (err error)
SetCleanedCache set cleand flag.
func (*Dao) SetFavedBit ¶
SetFavedBit set unfaved user bit to 0
func (*Dao) SetFolderSortMc ¶
SetFolderSortMc set folder's sort binary data to mc.
func (*Dao) SetFolderStatsMc ¶
SetFolderStatsMc add folders mc cache.
func (*Dao) SetFoldersMc ¶
SetFoldersMc add folders mc cache.
func (*Dao) SetOidCountMc ¶
SetOidCountMc set oid count to mc.
func (*Dao) SetOidsCountMc ¶
SetOidsCountMc set oids count to mc.
func (*Dao) SetRelaitonFidsMc ¶
func (d *Dao) SetRelaitonFidsMc(c context.Context, typ int8, mid, oid int64, fids []int64) (err error)
SetRelaitonFidsMc set fids binary data to mc.
func (*Dao) SetUnFavedBit ¶
SetUnFavedBit set unfaved user bit to 1
func (*Dao) SetUserRecentOidsMc ¶
SetUserRecentOidsMc set oids binary data to mc.
func (*Dao) SetUserRecentResourcesMc ¶
func (d *Dao) SetUserRecentResourcesMc(c context.Context, typ int8, mid int64, recents []*model.Resource) (err error)
SetUserRecentOidsMc set oids binary data to mc.
func (*Dao) TxCopyRelations ¶
func (d *Dao) TxCopyRelations(tx *sql.Tx, typ int8, oldmid, mid, oldfid, newfid int64, oids []int64) (rows int64, err error)
TxCopyRelations copy resources from oldfid to newfid by oids.
func (*Dao) TxMultiDelRelations ¶
func (d *Dao) TxMultiDelRelations(tx *sql.Tx, tp int8, mid, fid int64, oids []int64) (rows int64, err error)
TxMultiDelRelations delete relations to mysql.
func (*Dao) UpFolderAttr ¶
func (d *Dao) UpFolderAttr(c context.Context, typ int8, mid, fid int64, attr int32) (rows int64, err error)
UpFolderAttr update user's folder attr to mysql.
func (*Dao) UpFolderName ¶
func (d *Dao) UpFolderName(c context.Context, typ int8, mid, fid int64, name string) (rows int64, err error)
UpFolderName rename user's folder name to mysql.
func (*Dao) UpFolderSort ¶
UpFolderSort update user's folder sort.
func (*Dao) UpdateFolder ¶
UpdateFolder add a new favorite folder to mysql.
func (*Dao) UserFolders ¶
func (d *Dao) UserFolders(c context.Context, typ int8, mid int64) (fs map[int64]*model.Folder, err error)
UserFolders get user's folders.
func (*Dao) UserRecentOidsMc ¶
UserRecentOidsMc return oids from mc.