This repository was archived by the owner on Oct 18, 2023. It is now read-only.
Commit 5fcc5ee
328: export sqlite3 dump r=MarinPostma a=MarinPostma
This PR ports the dumping loginc from sqlite to sqld. It allows the dumping of sqld tables to a sqlite compatible format.
sqld now exposes a CLI interface to export dumps, eg:
- print the dump for the database at the default path (`data.sqld`) to stdout:
```
sqld dump
```
- print the dump for the database at the path specified by `--db-path`:
```
sqld --db-path some/path/to/database dump
```
- write the dump for the database at the path specified by `--db-path` at the path specified by path:
```
sqld --db-path some/path/to/database dump --path write/dump/here
```
`dump` is a subcommand, so any argument passed after the `dump` have dump as subject, and any argument passed before `dump` have `sqld` as subject. Any argument with `sqld` as subject other than `--db-path` is ignored.
348: whitelist specific pragmas r=MarinPostma a=MarinPostma
whilelist `foreign_keys` and `writable_schema` pragmas
Co-authored-by: ad hoc <[email protected]>
File tree
8 files changed
+578
-26
lines changed- sqld/src
- database
- dump
- hrana
8 files changed
+578
-26
lines changedLarge diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
6 | | - | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
126 | 145 | | |
127 | 146 | | |
128 | 147 | | |
| |||
162 | 181 | | |
163 | 182 | | |
164 | 183 | | |
165 | | - | |
| 184 | + | |
166 | 185 | | |
167 | 186 | | |
168 | 187 | | |
| |||
215 | 234 | | |
216 | 235 | | |
217 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
218 | 256 | | |
219 | 257 | | |
220 | 258 | | |
| |||
226 | 264 | | |
227 | 265 | | |
228 | 266 | | |
229 | | - | |
230 | 267 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
241 | 278 | | |
242 | | - | |
243 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
244 | 294 | | |
245 | | - | |
246 | | - | |
| 295 | + | |
| 296 | + | |
247 | 297 | | |
248 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
249 | 301 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| |||
0 commit comments