mirror of
https://github.com/nkanaev/yarr.git
synced 2025-12-15 08:37:21 +00:00
bulk-insert items
This commit is contained in:
46
main.go
46
main.go
@@ -6,10 +6,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
storage, err := storage.New()
|
||||
store, err := storage.New()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Print(store)
|
||||
/*
|
||||
folder := storage.CreateFolder("foo")
|
||||
storage.RenameFolder(folder.Id, "bar")
|
||||
@@ -20,4 +21,47 @@ func main() {
|
||||
"title", "description", "link", "feedlink", "icon", 1)
|
||||
storage.RenameFeed(feed.Id, "newtitle")
|
||||
*/
|
||||
/*
|
||||
items := make([]storage.Item, 3, 3)
|
||||
items = append(items, storage.Item{
|
||||
Id: "id",
|
||||
FeedId: 0,
|
||||
Title: "title",
|
||||
Link: "link",
|
||||
Description: "description",
|
||||
Content: "content",
|
||||
Author: "author",
|
||||
Date: 1,
|
||||
DateUpdated: 1,
|
||||
Status: storage.UNREAD,
|
||||
Image: "image",
|
||||
})
|
||||
items = append(items, storage.Item{
|
||||
Id: "id2",
|
||||
FeedId: 0,
|
||||
Title: "title",
|
||||
Link: "link",
|
||||
Description: "description",
|
||||
Content: "content",
|
||||
Author: "author",
|
||||
Date: 1,
|
||||
DateUpdated: 50,
|
||||
Status: storage.UNREAD,
|
||||
Image: "image",
|
||||
})
|
||||
items = append(items, storage.Item{
|
||||
Id: "id",
|
||||
FeedId: 0,
|
||||
Title: "title",
|
||||
Link: "link",
|
||||
Description: "description",
|
||||
Content: "content",
|
||||
Author: "author",
|
||||
Date: 1,
|
||||
DateUpdated: 100,
|
||||
Status: storage.UNREAD,
|
||||
Image: "image",
|
||||
})
|
||||
log.Print(store.CreateItems(items))
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user