Overview
| Comment: | Fix SQL query for articles+notes so series filtering will work |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
b49b65af67f393b9412b9393012c72fa |
| User & Date: | joel on 2019-07-12 04:31:29 |
| Other Links: | manifest | tags |
Context
|
2019-07-12
| ||
| 04:36 | Additional styles for columnar series list check-in: fc5b4338 user: joel tags: trunk | |
| 04:31 | Fix SQL query for articles+notes so series filtering will work check-in: b49b65af user: joel tags: trunk | |
|
2019-07-10
| ||
| 01:37 | Provide index entry crystallization check-in: 94c49607 user: joel tags: trunk | |
Changes
Modified crystalize.rkt from [db2e6817] to [43b9fb1b].
| ︙ | ︙ | |||
175 176 177 178 179 180 181 |
(format "WHERE `series_pagenode` IS \"~a\"" (here-output-path))]
[else ""]))
;; Return a combined list of articles and notes sorted by date
(define (list/articles+notes type #:series [s #t] #:limit [limit -1] [order "DESC"])
(define select #<<@@@@@
SELECT `~a` FROM
| | | | | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
(format "WHERE `series_pagenode` IS \"~a\"" (here-output-path))]
[else ""]))
;; Return a combined list of articles and notes sorted by date
(define (list/articles+notes type #:series [s #t] #:limit [limit -1] [order "DESC"])
(define select #<<@@@@@
SELECT `~a` FROM
(SELECT `~a`, `published`, `series_pagenode` FROM `articles`
UNION SELECT
`~a`,`date` AS `published`, `series_pagenode` FROM `notes`)
~a ORDER BY `published` ~a LIMIT ~a
@@@@@
)
(query-list (sqltools:dbc) (format select type type type (where/series s) order limit)))
;; Return a list of articles only, sorted by date
(define (list/articles type #:series [s #t] #:limit [limit -1] [order "DESC"])
(define select "SELECT `~a` FROM `articles` ~a ORDER BY `published` ~a LIMIT ~a")
|
| ︙ | ︙ |