summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-20 17:55:03 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-20 17:55:03 +0100
commit97855d5d6aa19bb1b02934b8415fb56651e63304 (patch)
treeb65955fd82f4019b532948cc9c06d73a3583a811
parentf2e5c7060f55dd9e6949630caf029a963c57bea0 (diff)
updated docs
-rw-r--r--appinfo/database.xml14
-rw-r--r--bl/feedbl.php (renamed from feed.bl.php)0
-rw-r--r--bl/folderbl.php (renamed from folder.bl.php)0
-rw-r--r--db/feed.php2
-rw-r--r--db/item.php1
-rw-r--r--doc/mapper spec.md49
6 files changed, 46 insertions, 20 deletions
diff --git a/appinfo/database.xml b/appinfo/database.xml
index 9a24e0582..8fd44b76f 100644
--- a/appinfo/database.xml
+++ b/appinfo/database.xml
@@ -102,13 +102,6 @@
<unsigned>true</unsigned>
</field>
<field>
- <name>lastmodified</name>
- <type>integer</type>
- <default></default>
- <notnull>false</notnull>
- <unsigned>true</unsigned>
- </field>
- <field>
<name>folder_id</name>
<type>integer</type>
<notnull>true</notnull>
@@ -202,6 +195,13 @@
<name>status</name>
<type>integer</type>
</field>
+ <field>
+ <name>last_modified</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>false</notnull>
+ <unsigned>true</unsigned>
+ </field>
<index>
<name>news_items_feed_id_index</name>
diff --git a/feed.bl.php b/bl/feedbl.php
index 43e0faf6f..43e0faf6f 100644
--- a/feed.bl.php
+++ b/bl/feedbl.php
diff --git a/folder.bl.php b/bl/folderbl.php
index 85c386d90..85c386d90 100644
--- a/folder.bl.php
+++ b/bl/folderbl.php
diff --git a/db/feed.php b/db/feed.php
index 69f62b765..da2a2d904 100644
--- a/db/feed.php
+++ b/db/feed.php
@@ -36,7 +36,7 @@ class Feed extends Entity {
public $title;
public $faviconLink;
public $added;
- public $lastmodified;
public $folderId;
+ public $unreadCount;
} \ No newline at end of file
diff --git a/db/item.php b/db/item.php
index 11a5becf1..6050d0e9b 100644
--- a/db/item.php
+++ b/db/item.php
@@ -42,6 +42,7 @@ class Item extends Entity {
public $feedId;
public $status;
public $feedTitle;
+ public $lastModified;
public function setRead() {
$this->markFieldUpdated('status');
diff --git a/doc/mapper spec.md b/doc/mapper spec.md
index 0b82354e2..f9b28fe94 100644
--- a/doc/mapper spec.md
+++ b/doc/mapper spec.md
@@ -1,24 +1,49 @@
+itemmapper
-update($item)
-delete($item)
-findAllFromUser($userId)
find(int $feedId, $userId)
-create($item)
-findAllFromFeedWithStatus($status, $feedId, $userId);
+
+
+
+findAll()
+
+request: get just starred items of a user
+ SELECT * FROM items
+ WHERE user_id = ? AND status = ?
+ (AND id < ? LIMIT ?)
+ (AND items.lastmodified >= ?)
+
+request: get all items of a user (unread and read)
+ SELECT * FROM items
+ WHERE user_id = ? AND status = ?
+ (AND id < ? LIMIT ?)
+ (AND items.lastmodified >= ?)
+
+request: get all items of a folder of a user (unread and read)
+ SELECT * FROM items
+ JOIN feeds
+ ON feed.id = feed_id
+ WHERE user_id = ? AND status = ? AND feed.folder_id = ?
+ (AND id < ? LIMIT ?)
+ (AND items.lastmodified >= ?)
+
+
+request: get all items of a feed of a user (unread and read)
+ SELECT * FROM items
+ WHERE user_id = ? AND status = ? AND feed_id = ?
+ (AND id < ? LIMIT ?)
+ (AND items.lastmodified >= ?)
+
+
+all requests: can be specified using an (offset (id), limit) or (updatedSince (timestamp))
foldermapper
find($feedId, $userId)
-update($folder)
-delete($folder)
-create($folder)
+findAllFromUser($userId)
feedmapper
find($feedId, $userId)
-update($folder)
-delete($folder)
-create($folder)
findAll()
findAllFromUser($userId)
-
+getStarredCount($userId)