summaryrefslogtreecommitdiffstats
path: root/doc/mapper spec.md
blob: 2996dc6c6b9059d0cf884d8f3dea56756107cd5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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))