◊(Local Yarn Code "Check-in [f59aba82]")

Overview
Comment:Make most article columns nullable
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f59aba8239991dad886f9b9ffc5d38389fa1543272dcce4107d4691b063d735c
User & Date: joel on 2020-05-11 01:56:42
Other Links: manifest | tags
Context
2020-05-11
01:58
Explicitly preserve footnote and link state per page (Pollen no longer guarantees this) check-in: 8b3cc120 user: joel tags: trunk
01:56
Make most article columns nullable check-in: f59aba82 user: joel tags: trunk
01:55
Bugfix cache-index-entries-only!, add to docs check-in: 70bf798f user: joel tags: trunk
Changes

Modified cache.rkt from [2a6f5661] to [3893f276].

32
33
34
35
36
37
38
39
40
41
42
43
44






45
46
47
48
49
50
51
52
53
54









55
56
57
58
59
60
61
32
33
34
35
36
37
38






39
40
41
42
43
44
45









46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61







-
-
-
-
-
-
+
+
+
+
+
+

-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+








(define DBFILE (build-path (current-project-root) "vitreous.sqlite"))
(define cache-conn (make-parameter (sqlite3-connect #:database DBFILE #:mode 'create)))

(define-schema cache:article #:table "articles"
  ([id                   id/f #:primary-key #:auto-increment]
   [page                 symbol/f]
   [title-plain          string/f]
   [title-html-flow      string/f]
   [title-specified?     boolean/f]
   [published            string/f]
   [updated              string/f]
   [author               string/f]
   [title-plain          string/f  #:nullable]
   [title-html-flow      string/f  #:nullable]
   [title-specified?     boolean/f #:nullable]
   [published            string/f  #:nullable]
   [updated              string/f  #:nullable]
   [author               string/f  #:nullable]
   [conceal              string/f]
   [series-page          symbol/f]
   [noun-singular        string/f]
   [note-count           integer/f]
   [content-html         string/f]
   [disposition          string/f]
   [disp-html-anchor     string/f]
   [listing-full-html    string/f]   ; full content but without notes
   [listing-excerpt-html string/f]   ; Not used for now
   [listing-short-html   string/f])) ; Date and title only
   [series-page          symbol/f  #:nullable]
   [noun-singular        string/f  #:nullable]
   [note-count           integer/f #:nullable]
   [content-html         string/f  #:nullable]
   [disposition          string/f  #:nullable]
   [disp-html-anchor     string/f  #:nullable]
   [listing-full-html    string/f  #:nullable]   ; full content but without notes
   [listing-excerpt-html string/f  #:nullable]   ; Not used for now
   [listing-short-html   string/f  #:nullable])) ; Date and title only

(define-schema cache:note #:table "notes"
  ([id                   id/f #:primary-key #:auto-increment]
   [page                 symbol/f]
   [html-anchor          string/f]
   [title-html-flow      string/f] ; No block-level HTML elements
   [title-plain          string/f]

Modified code-docs/cache.scrbl from [b6327b43] to [bd541e40].

187
188
189
190
191
192
193
194




195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

216
217
218
219
220
221
222
223
224
225
226

227
228
229
230
231
232
233
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

218
219
220
221
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236







-
+
+
+
+




















-
+










-
+







                           [disposition          string/f]
                           [disp-html-anchor     string/f]
                           [listing-full-html    string/f]
                           [listing-excerpt-html string/f]
                           [listing-short-html   string/f])
            #:constructor-name make-cache:article]{

Table holding cached article information.
Table holding cached @tech{article} information.

When creating a @racket[cache:article] (should you ever need to do so directly, which is unlikely),
the only required fields are @racket[_page], @racket[_title], and @racket[_conceal].

}

@defstruct*[cache:note ([id              id/f]
                        [page            symbol/f]
                        [html-anchor     string/f]
                        [title-html-flow string/f]
                        [title-plain     string/f]
                        [author          string/f]
                        [author-url      string/f]
                        [published       string/f]
                        [disposition     string/f]
                        [content-html    string/f]
                        [series-page     symbol/f]
                        [conceal         string/f]
                        [listing-full-html    string/f]
                        [listing-excerpt-html string/f]
                        [listing-short-html   string/f])
                       #:constructor-name make-cache:note]{

Table holding cached information on notes.
Table holding cached information on @tech{notes}.

}

@defstruct*[cache:index-entry ([id id/f]
                               [entry       string/f]
                               [subentry    string/f]
                               [page        symbol/f]
                               [html-anchor string/f])
                              #:constructor-name make-cache:index-entry]{
                              
Table holding cached information about index entries found in articles.
Table holding cached information about index entries found in @tech{articles}.

}

@defstruct*[listing ([path        string/f]
                     [title       string/f]
                     [author      string/f]
                     [published   string/f]