Login
basic.s2 at [a1dabf682d]
Login

File s2/require.d/fsl/timeline/basic.s2 artifact b7b3dc622f part of check-in a1dabf682d


/**
   require() module which returns an array of Object from the
   event table. It includes all fields from the event table plus
   uuid.
*/
return Fossil.require(
    ['fsl/context', 'fsl/db/repo'],
    proc(fsl, 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(){
                rc[] = this;
            }
        });
        return rc;
});