1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
-
-
|
/**
require() module which returns an array of Object from the
event table. It includes all fields from the event table plus
uuid.
require() module which returns an array of Objects from the event
table. Each includes all fields from the event table plus the
associated blob's uuid.
*/
return Fossil.require(
['fsl/context', 'fsl/db/repo'],
proc(fsl, repo){
return requireS2(
['fsl/db/repo'],
proc(repo){
var rc = [];
repo.each({
mode: 0,
sql:<<<_SQL
SELECT e.*, b.uuid FROM event e JOIN blob b
ON e.objid=b.rid
ORDER BY mtime DESC LIMIT 5 _SQL,
callback:proc(){
SELECT e.*, b.uuid uuid
FROM event e JOIN blob b ON e.objid=b.rid
ORDER BY e.mtime DESC LIMIT 5
_SQL,
callback:'rc[] = this'
rc[] = this;
}
});
return rc;
});
|