Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplify the computation of descendants using a recursive CTE. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
31fcde837d45500d8681f4660ca4f7a0 |
User & Date: | drh 2015-05-24 00:53:37.924 |
Context
2015-05-25
| ||
09:52 | Close <a> tag, as reported by Svyatoslav Mishyn ... (check-in: d10b1e02 user: jan.nijtmans tags: trunk) | |
2015-05-24
| ||
00:53 | Simplify the computation of descendants using a recursive CTE. ... (check-in: 31fcde83 user: drh tags: trunk) | |
2015-05-23
| ||
18:12 | Fix harmless compiler warnings. ... (check-in: e3560443 user: mistachkin tags: trunk) | |
Changes
Changes to src/descendants.c.
︙ | ︙ | |||
253 254 255 256 257 258 259 | } /* ** Load the record ID rid and up to N-1 closest descendants into ** the "ok" table. */ void compute_descendants(int rid, int N){ | | | | | | | | | | | < < < < < < < < < < | < < | < < < < < | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | } /* ** Load the record ID rid and up to N-1 closest descendants into ** the "ok" table. */ void compute_descendants(int rid, int N){ db_multi_exec( "WITH RECURSIVE" " dx(rid,mtime) AS (" " SELECT %d, 0" " UNION" " SELECT plink.cid, plink.mtime FROM dx, plink" " WHERE plink.pid=dx.rid" " ORDER BY 2" " )" "INSERT OR IGNORE INTO ok SELECT rid FROM dx LIMIT %d", rid, N ); } /* ** COMMAND: descendants* ** ** Usage: %fossil descendants ?CHECKIN? ?OPTIONS? ** |
︙ | ︙ |