Fossil

Check-in [2488996f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix SQL to find name for /json/timeline/event
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ben-json-timeline
Files: files | file ages | folders
SHA3-256:2488996f64d78d5fa7120d0125733909c3a6ea10483beff411ef56f0352dbb40
User & Date: ben 2018-06-20 10:29:41
Context
2018-06-20
18:15
Fixed a C99-ism, removed a couple ancient #if blocks. Re-added uuid to /json/timeline/event output (because it's useful in ways which the event name is not). Leaf check-in: 57e75eb7 user: stephan tags: ben-json-timeline
10:29
Fix SQL to find name for /json/timeline/event check-in: 2488996f user: ben tags: ben-json-timeline
09:41
Include name (not uuid) in /json/timeline/event, because the uuid is not terribly useful. check-in: 6f0929ce user: ben tags: ben-json-timeline
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/json_timeline.c.

551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
  /* only for testing! */
  cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
#endif
  db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
  blob_reset(&sql);
  db_prepare(&q, "SELECT"
             // uuid is not useful for events
             " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=tagId AND tagname LIKE 'event-%%'),7) AS name,"
             " mtime AS timestamp,"
#if 0
             " timestampString AS timestampString,"
#endif
             " comment AS comment, "
             " user AS user,"
             " eventType AS eventType"







|







551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
  /* only for testing! */
  cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
#endif
  db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
  blob_reset(&sql);
  db_prepare(&q, "SELECT"
             // uuid is not useful for events
             " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=json_timeline.tagId AND tagname LIKE 'event-%%'),7) AS name,"
             " mtime AS timestamp,"
#if 0
             " timestampString AS timestampString,"
#endif
             " comment AS comment, "
             " user AS user,"
             " eventType AS eventType"