-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsqlx-data.json
329 lines (329 loc) · 11.4 KB
/
sqlx-data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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
186
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
{
"db": "SQLite",
"231f8122b0dadd15f2e33c64f5d1a14b8f70081174d9f027e43235eac55b9acc": {
"describe": {
"columns": [
{
"name": "username",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "pwhash",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "session_id",
"ordinal": 2,
"type_info": "Text"
}
],
"nullable": [
false,
false,
true
],
"parameters": {
"Right": 1
}
},
"query": "\n SELECT *\n FROM users\n WHERE username = ?\n "
},
"3fb9d968e52bdbfc981705fd91aa8b6b2c3d573a2e7dce7fe9652c1913a2f5bd": {
"describe": {
"columns": [
{
"name": "url",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "deleted: _",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "created!: _",
"ordinal": 2,
"type_info": "Int64"
}
],
"nullable": [
false,
true,
false
],
"parameters": {
"Right": 4
}
},
"query": "\n SELECT url,\n deleted as \"deleted: _\",\n created as \"created!: _\"\n FROM subscriptions\n WHERE username = ?\n AND device = ?\n AND (\n created > ? OR deleted > ?\n )\n "
},
"498016c291834ae5044f5ba0318ab3779bb0c01e0abedc0b5d40f0a6346f21c8": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 4
}
},
"query": "\n UPDATE subscriptions\n SET\n deleted = ?\n WHERE username = ?\n AND device = ?\n AND url = ?\n AND deleted IS NULL\n "
},
"57d484d4581d50a8d41a914e79e6a0870f73f7915acbe7ba84783bcf15aaadc6": {
"describe": {
"columns": [
{
"name": "podcast",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "episode",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "guid",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "device",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "timestamp: _",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "action!: _",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "started",
"ordinal": 6,
"type_info": "Int64"
},
{
"name": "position",
"ordinal": 7,
"type_info": "Int64"
},
{
"name": "total",
"ordinal": 8,
"type_info": "Int64"
},
{
"name": "modified?: _",
"ordinal": 9,
"type_info": "Int64"
}
],
"nullable": [
false,
false,
true,
true,
true,
false,
true,
true,
true,
false
],
"parameters": {
"Right": 4
}
},
"query": "\n SELECT episodes.podcast, episode,\n guid, episodes.device,\n timestamp as \"timestamp: _\",\n action as \"action!: _\",\n started, position, total,\n modified as \"modified?: _\"\n FROM\n episodes,\n (SELECT ? as podcast, ? as device) as filter\n WHERE username = ?\n AND modified > ?\n AND (filter.podcast IS NULL OR filter.podcast = episodes.podcast)\n AND (filter.device IS NULL OR filter.device = episodes.device)\n "
},
"5b0366048dc4ec797b64826150a81df48540307e98d91d8d84d4045b7f7da76f": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 1
}
},
"query": "UPDATE episodes SET modified = 23 WHERE username = ?"
},
"6a8d46bd6803e85602f7807594dfd7f815db47a9456d127fee88326b254bd007": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 1
}
},
"query": "\n INSERT INTO users\n VALUES (\"bob\", ?, NULL);\n "
},
"71f499aa1de930510305158864820865a904805b9a7ef74533859d320884f3eb": {
"describe": {
"columns": [
{
"name": "modified: _",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "hash!: _",
"ordinal": 1,
"type_info": "Text"
}
],
"nullable": [
false,
false
],
"parameters": {
"Right": 0
}
},
"query": "\n SELECT modified as \"modified: _\", content_hash as \"hash!: _\"\n FROM episodes\n WHERE username = \"u2\"\n "
},
"7ebf96081846963d9a88543df229c8cb687b65d2c1f8ce7285f70324b5a3e0c6": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 4
}
},
"query": "\n INSERT INTO episodes\n (\n username, device,\n podcast, episode,\n timestamp, guid,\n action,\n started, position, total,\n modified\n )\n VALUES\n (\n ?, ?,\n ?, ?,\n NULL, NULL,\n \"New\",\n NULL, NULL, NULL,\n 1 -- `modified` value we expect to be overwritten\n -- `hash` is defaulted to \"\"\n ),\n (\n \"u2\", \"dev2\", -- this row won't be picked up - different user\n \"pod2\", \"ep2\",\n NULL, NULL,\n \"New\",\n NULL, NULL, NULL,\n 2\n )\n "
},
"90be6c101c11fa3847d2a2f7e1f70a7e9d2e686945c12e7382c832f989fce687": {
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "caption!: _",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "type!: _",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "subscriptions!: _",
"ordinal": 3,
"type_info": "Null"
}
],
"nullable": [
false,
true,
false,
null
],
"parameters": {
"Right": 1
}
},
"query": "\n SELECT id, caption as \"caption!: _\", type as \"type!: _\", COUNT(*) as \"subscriptions!: _\"\n FROM devices\n INNER JOIN subscriptions\n ON devices.username = subscriptions.username\n GROUP BY devices.username, devices.id\n HAVING devices.username = ?\n "
},
"91fec3ed5f2965fc18eda1d7f9fea8dbff81d91b9e15b055914c5e6a063cb21e": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 20
}
},
"query": "\n INSERT INTO episodes\n (\n username, device,\n podcast, episode,\n timestamp, guid,\n action,\n started, position, total,\n modified\n )\n VALUES\n (\n ?, ?,\n ?, ?,\n ?, ?,\n ?,\n ?, ?, ?,\n ?\n )\n ON CONFLICT\n DO\n UPDATE SET\n timestamp = coalesce(?, episodes.timestamp),\n guid = coalesce(?, episodes.guid),\n action = coalesce(?, episodes.action),\n started = coalesce(?, episodes.started),\n position = coalesce(?, episodes.position),\n total = coalesce(?, episodes.total),\n modified = ?,\n content_hash = ?\n -- only update if we've changed the contents\n WHERE content_hash <> ?\n "
},
"9e6dec71348701a9b6f9fc4b848aad31d654d1ff7c42cb49f4155cad1866618c": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 8
}
},
"query": "\n INSERT INTO devices\n (id, username, caption, type)\n VALUES\n (?, ?, ?, ?)\n ON CONFLICT\n DO\n UPDATE SET\n caption = coalesce(?, devices.caption),\n type = coalesce(?, devices.type)\n WHERE id = ? AND username = ?\n "
},
"b276f81a7c3c206c558d6d5def3ffb19cf7bb46ad738e6c262ba3b592dd553e1": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 4
}
},
"query": "\n INSERT INTO subscriptions\n (username, device, url, created)\n VALUES\n (?, ?, ?, ?) -- `deleted` <- NULL\n ON CONFLICT\n DO NOTHING\n "
},
"d8efd2d5bcf76f9fdd7e7ad475963148eacd57d4e3415c42508c932b5b516769": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Right": 2
}
},
"query": "\n UPDATE users\n SET session_id = ?\n WHERE username = ?\n "
},
"f2909b05f07252d28cf3cf9f14d2a88a4e2805d3f012794ac7eca6250de084a5": {
"describe": {
"columns": [
{
"name": "username",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "pwhash",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "session_id",
"ordinal": 2,
"type_info": "Text"
}
],
"nullable": [
false,
false,
true
],
"parameters": {
"Right": 1
}
},
"query": "\n SELECT *\n FROM users\n WHERE session_id = ?\n "
},
"f468a7c32b46ff9a0c5013b14d8d0a579195f763d8180ab604aac67569006853": {
"describe": {
"columns": [
{
"name": "modified: _",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "hash!: _",
"ordinal": 1,
"type_info": "Text"
}
],
"nullable": [
false,
false
],
"parameters": {
"Right": 1
}
},
"query": "\n SELECT modified as \"modified: _\", content_hash as \"hash!: _\"\n FROM episodes\n WHERE username = ?\n "
}
}