Overview
| Comment: | Minor code doc edits |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
e538e325814725c180d92dd6e77d08fa |
| User & Date: | joel on 2020-02-22 00:04:28 |
| Other Links: | manifest | tags |
Context
|
2020-02-24
| ||
| 07:35 | Variadic make-tag-predicate check-in: 3ed11073 user: joel tags: trunk | |
|
2020-02-22
| ||
| 00:04 | Minor code doc edits check-in: e538e325 user: joel tags: trunk | |
|
2020-02-21
| ||
| 22:43 | Build up listing schema, use for RSS feed ([2f082139]) check-in: d3755213 user: joel tags: trunk | |
Changes
Modified code-docs/cache.scrbl from [1876eb41] to [bc87f6f5].
| ︙ | ︙ | |||
160 161 162 163 164 165 166 |
Delete a particular article, or all notes for a particular article, respectively.
}
@section{Schema}
| | > > | > | > > > > | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
Delete a particular article, or all notes for a particular article, respectively.
}
@section{Schema}
The cache database has four tables: @tt{articles}, @tt{notes}, @tt{index_entries} and @tt{series}.
Each of these has a corresponding schema, shown below. In addition, there is a “virtual” schema,
@tt{listing}, for use with queries which may or may not combine articles and notes intermingled.
The work of picking apart an article’s exported @tt{doc} and @tt{metas} into rows in these tables is
done by @racket[parse-and-cache-article!].
The below are shown as @code{struct} forms but are actually defined with deta’s
@racket[define-schema]. Each schema has an associated struct with the same name and a smart
constructor called @tt{make-@emph{id}}. The struct’s “dumb” constructor is hidden so that invalid
entities cannot be created. For every defined field there is an associated functional setter and
updater named @tt{set-@emph{id}-field} and @tt{update-@emph{id}-field}, respectively.
@defstruct*[cache:article ([id id/f]
[page symbol/f]
[title-plain string/f]
[title-html-flow string/f]
[title-specified boolean/f]
[published string/f]
|
| ︙ | ︙ | |||
243 244 245 246 247 248 249 |
[author string/f]
[published string/f]
[updated string/f]
[html string/f])
#:constructor-name make-listing]{
This is a “virtual” schema targeted by @racket[articles] and @racket[articles+notes] using deta’s
| | | > | 250 251 252 253 254 255 256 257 258 259 260 261 |
[author string/f]
[published string/f]
[updated string/f]
[html string/f])
#:constructor-name make-listing]{
This is a “virtual” schema targeted by @racket[articles] and @racket[articles+notes] using deta’s
@racket[project-onto]. It supplies the minimum set of fields needed to build the RSS feed, and which
are common to both articles and notes; most times (e.g., on @tech{series} pages) only the @tt{html}
field is used, via @racket[fenced-listing] or @racket[listing-htmls].
}
|