Login
Changes To SQLSnippets
Login

Changes to "SQLSnippets" between 2014-02-09 17:22:43 and 2014-05-07 18:09:13

75
76
77
78
79
80
81
82

83
84
85
86
87
88


89
90
91
92
93




94
95
96
97
98
99
100
75
76
77
78
79
80
81

82






83
84
85
86
87


88
89
90
91
92
93
94
95
96
97
98







-
+
-
-
-
-
-
-
+
+



-
-
+
+
+
+







     UNION ALL
     SELECT p.pid, b.uuid, e.mtime, e.user,
            coalesce(e.ecomment,e.comment)
     FROM plink p, blob b, ancestors a, event e
        WHERE p.cid=b.rid
        AND p.cid=a.rid
        AND e.objid=p.pid

 )
-- Optionally limit it to the first N
-- ancestors (including the original checkin):
     LIMIT 6
 )
SELECT a.rowid, b.rid,
       substr(b.uuid,0,8) uuid,
SELECT a.rid,
       substr(a.uuid,0,8) uuid,
       datetime(a.tm,'localtime') time,
       user,
       substr(comment,0,20)||'...' comment
from blob b, ancestors a
WHERE b.rid=a.rid
from ancestors a
-- Optionally limit it to the first N
-- ancestors (including the original checkin):
     LIMIT 6
;
</pre></nowiki>


Example output:
<nowiki><pre>
rowid|rid|uuid|time|user|comment