dirsql 0.4.143 → 0.4.145
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/reference/config.md
CHANGED
|
@@ -224,10 +224,10 @@ what its required `on-file` command emits — dirsql injects nothing (see
|
|
|
224
224
|
| Key | Required | Description |
|
|
225
225
|
|---|---|---|
|
|
226
226
|
| `name` | yes | The table's SQL name — the name you query it by. Declared, never derived from `ddl`: dirsql does not read the DDL text. The `ddl` must create a table by this name; if it doesn't, loading fails. |
|
|
227
|
-
| `ddl` | yes | A SQL batch, run verbatim — any number of statements. It must create a table called `name`; that table holds the file rows, and only the columns it declares are kept (
|
|
227
|
+
| `ddl` | yes | A SQL batch, run verbatim — any number of statements. It must create a table called `name`; that table holds the file rows, and only the columns it declares are kept (a key the `on-file` command emits fills the declared column it names, compared case-insensitively for ASCII letters as SQL identifiers are; a key naming no declared column is dropped). The rest of the batch is yours: indexes, virtual tables, triggers. See [Batch `ddl`](#batch-ddl). |
|
|
228
228
|
| `glob` | yes | Glob pattern, [anchored](#glob-anchor) at the config file's directory, under the [one glob rule](#glob-rule): `*` matches one level, `**` any depth. Every table whose glob matches a file receives that file's rows — a file can populate multiple tables. A `{name}` is a literal, as in bash and a path-table; the [glob page](./glob.md) has the syntax. |
|
|
229
229
|
| `on-file` | **yes** | A command run once per table, with every matched file's absolute path appended as a trailing argument; its stdout (one JSON object per line) is the table's rows. Must be non-empty. A `[[table]]` with no `on-file` is a load error (see [parse errors](#parse-errors)). See [Command hooks](./hooks.md#on-file). |
|
|
230
|
-
| `strict` | no (default `false`) | When `true`, rows whose keys do not
|
|
230
|
+
| `strict` | no (default `false`) | When `true`, rows whose keys do not match the declared columns (compared case-insensitively, as above) are rejected with an error: extra keys error, and every declared column must be supplied by the `on-file` output. When `false`, extra keys are dropped and missing columns become `NULL`. |
|
|
231
231
|
|
|
232
232
|
`on-file` is required because a table's rows come from nowhere else. dirsql
|
|
233
233
|
does not read file contents or merge filesystem facts on your behalf: the
|
package/docs/reference/sdk.md
CHANGED
|
@@ -223,7 +223,9 @@ db.query_with(sql: &str, params: &Params) -> Result<Vec<Row>>
|
|
|
223
223
|
|
|
224
224
|
:::
|
|
225
225
|
|
|
226
|
-
Executes a SQL query and returns rows keyed by column name.
|
|
226
|
+
Executes a SQL query and returns rows keyed by column name. If a result repeats
|
|
227
|
+
a column name, later occurrences receive `:N` suffixes (for example, `a` and
|
|
228
|
+
`a:1`); suffixes avoid names already present in the result.
|
|
227
229
|
|
|
228
230
|
**Bind parameters.** `params` reaches SQLite's own parameter binding; the
|
|
229
231
|
values never enter the SQL text, so text holding quotes needs no escaping.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.145",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -221,10 +221,10 @@
|
|
|
221
221
|
]
|
|
222
222
|
},
|
|
223
223
|
"optionalDependencies": {
|
|
224
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
225
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
226
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
227
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
228
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
224
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.145",
|
|
225
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.145",
|
|
226
|
+
"@dirsql/lib-darwin-x64": "0.4.145",
|
|
227
|
+
"@dirsql/lib-darwin-arm64": "0.4.145",
|
|
228
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.145"
|
|
229
229
|
}
|
|
230
230
|
}
|