dirsql 0.3.98 → 0.3.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/howto/define-tables.md +4 -3
- package/docs/reference/config.md +1 -1
- package/docs/reference/sdk.md +3 -1
- package/package.json +11 -11
|
@@ -42,9 +42,10 @@ zero-config default — only the tables you define are served.
|
|
|
42
42
|
|
|
43
43
|
## Multiple tables
|
|
44
44
|
|
|
45
|
-
Add one `[[table]]` entry per table. When a file matches several globs,
|
|
46
|
-
|
|
47
|
-
for that and the remaining keys
|
|
45
|
+
Add one `[[table]]` entry per table. When a file matches several globs, it
|
|
46
|
+
populates every matching table — each table is an independent view. See
|
|
47
|
+
[`[[table]]`](../reference/config.md#table) for that and the remaining keys
|
|
48
|
+
(`strict`, `on-file`).
|
|
48
49
|
|
|
49
50
|
## Going further
|
|
50
51
|
|
package/docs/reference/config.md
CHANGED
|
@@ -97,7 +97,7 @@ per-file command.
|
|
|
97
97
|
| Key | Required | Description |
|
|
98
98
|
|---|---|---|
|
|
99
99
|
| `ddl` | yes | A SQLite `CREATE TABLE` statement. The table name is parsed from it. Only columns declared here are populated; auto-injected facts not in the DDL are dropped. |
|
|
100
|
-
| `glob` | yes | Glob pattern matched against root-relative paths. May contain `{name}` [capture segments](./columns.md#glob-captures).
|
|
100
|
+
| `glob` | yes | Glob pattern matched against root-relative paths. May contain `{name}` [capture segments](./columns.md#glob-captures). Every table whose glob matches a file receives that file's rows — a file can populate multiple tables. |
|
|
101
101
|
| `strict` | no (default `false`) | When `true`, rows whose keys do not exactly match the declared columns are rejected with an error: extra keys error, and every declared column must be supplied (by the command/extract output, a glob capture, or a stat column). When `false`, extra keys are dropped and missing columns become `NULL`. |
|
|
102
102
|
| `on-file` | no | A command run once per matched file; its stdout (a JSON array of row objects) becomes the file's rows. Must be non-empty. See [Command hooks](./hooks.md#on-file). |
|
|
103
103
|
|
package/docs/reference/sdk.md
CHANGED
|
@@ -318,7 +318,9 @@ Maps files to table rows.
|
|
|
318
318
|
- `ddl` — A SQLite `CREATE TABLE` statement; the table name is parsed from
|
|
319
319
|
it. Table names must be unique across all tables.
|
|
320
320
|
- `glob` — Glob pattern matched against root-relative paths. May contain
|
|
321
|
-
`{name}` [captures](./columns.md#glob-captures).
|
|
321
|
+
`{name}` [captures](./columns.md#glob-captures). Every table whose glob
|
|
322
|
+
matches a file receives that file's rows — a file can populate multiple
|
|
323
|
+
tables.
|
|
322
324
|
- `extract` — Callback receiving the matched file's full path (the root
|
|
323
325
|
joined with the file's relative path — absolute when `root` is absolute)
|
|
324
326
|
and returning the rows that file contributes. `dirsql` never reads file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.100",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -212,15 +212,15 @@
|
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
214
|
"optionalDependencies": {
|
|
215
|
-
"@dirsql/lib-linux-x64-gnu": "0.3.
|
|
216
|
-
"@dirsql/lib-linux-arm64-gnu": "0.3.
|
|
217
|
-
"@dirsql/lib-darwin-x64": "0.3.
|
|
218
|
-
"@dirsql/lib-darwin-arm64": "0.3.
|
|
219
|
-
"@dirsql/lib-win32-x64-msvc": "0.3.
|
|
220
|
-
"@dirsql/cli-linux-x64-gnu": "0.3.
|
|
221
|
-
"@dirsql/cli-linux-arm64-gnu": "0.3.
|
|
222
|
-
"@dirsql/cli-darwin-x64": "0.3.
|
|
223
|
-
"@dirsql/cli-darwin-arm64": "0.3.
|
|
224
|
-
"@dirsql/cli-win32-x64-msvc": "0.3.
|
|
215
|
+
"@dirsql/lib-linux-x64-gnu": "0.3.100",
|
|
216
|
+
"@dirsql/lib-linux-arm64-gnu": "0.3.100",
|
|
217
|
+
"@dirsql/lib-darwin-x64": "0.3.100",
|
|
218
|
+
"@dirsql/lib-darwin-arm64": "0.3.100",
|
|
219
|
+
"@dirsql/lib-win32-x64-msvc": "0.3.100",
|
|
220
|
+
"@dirsql/cli-linux-x64-gnu": "0.3.100",
|
|
221
|
+
"@dirsql/cli-linux-arm64-gnu": "0.3.100",
|
|
222
|
+
"@dirsql/cli-darwin-x64": "0.3.100",
|
|
223
|
+
"@dirsql/cli-darwin-arm64": "0.3.100",
|
|
224
|
+
"@dirsql/cli-win32-x64-msvc": "0.3.100"
|
|
225
225
|
}
|
|
226
226
|
}
|