From 28e256f18f96d9afdcb903b3bc3daf93747c2195 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Fri, 19 Feb 2021 01:00:53 -0800 Subject: cleaned up db functions --- main.go | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index fec34f0..58e8f3d 100644 --- a/main.go +++ b/main.go @@ -1301,58 +1301,6 @@ func GetActor(id string) Actor { return respActor } -func GetActorCollectionCache(db *sql.DB, actor Actor) Collection { - var collection Collection - - collection.OrderedItems = GetObjectFromCache(db, actor.Id).OrderedItems - - collection.Actor = &actor - - collection.TotalItems = GetObjectPostsTotalCache(db, actor) - collection.TotalImgs = GetObjectImgsTotalCache(db, actor) - - return collection -} - -func GetActorCollectionCacheCatalog(db *sql.DB, actor Actor) Collection { - var collection Collection - - collection.OrderedItems = GetObjectFromCacheCatalog(db, actor.Id).OrderedItems - - collection.Actor = &actor - - collection.TotalItems = GetObjectPostsTotalCache(db, actor) - collection.TotalImgs = GetObjectImgsTotalCache(db, actor) - - return collection -} - -func GetActorCollectionDB(db *sql.DB, actor Actor) Collection { - var collection Collection - - collection.OrderedItems = GetObjectFromDB(db, actor.Id).OrderedItems - - collection.Actor = &actor - - collection.TotalItems = GetObjectPostsTotalDB(db, actor) - collection.TotalImgs = GetObjectImgsTotalDB(db, actor) - - return collection -} - -func GetActorCollectionDBCatalog(db *sql.DB, actor Actor) Collection { - var collection Collection - - collection.OrderedItems = GetObjectFromDBCatalog(db, actor.Id).OrderedItems - - collection.Actor = &actor - - collection.TotalItems = GetObjectPostsTotalDB(db, actor) - collection.TotalImgs = GetObjectImgsTotalDB(db, actor) - - return collection -} - func GetActorCollection(collection string) Collection { var nCollection Collection -- cgit v1.2.3