---
next_cursor: eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6InNxbGl0ZTMiLCJ2IjoxfQ
has_more: false
next: https://sincecutoff.com/v1/changes.md?tool=sqlite3&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6InNxbGl0ZTMiLCJ2IjoxfQ
items: 5
---
# sincecutoff.com changes: sqlite3

## SQLite adds json_array_insert() (sqlite3, 2026-04-09)
Published 2026-10-19
- slug: sqlite-adds-json-array-insert-f508056c374a
- score: 0.96

How to use it:

When inserting an element at the beginning or middle of a JSON array, call `json_array_insert(json, path, value, ...)`; the path must end with an array element reference such as `[1]`.

Examples:

```
SELECT json_array_insert('[1,2,3]', '$[1]', 'new');
```

- why_it_matters: Insert an element into a JSON array while querying or updating SQLite data.
- sources: <https://sqlite.org/changes.html#version_3_53_0>, <https://sqlite.org/json1.html#jarrayins>
- gotchas: "json (required): JSON value to modify."; "path (required): Path to the target array position; must end with an array element reference (`[…]`)."; "value (required): Value to insert at the specified position."; "additional path/value pairs: More paths and values may be supplied in pairs; edits occur in sequence."; "Prerequisite: SQLite 3.53.0 or later, where `json_array_insert()` was added."

## SQLite date/time `weekday -N` modifier form (sqlite3, 2026-10-09)
Published 2026-10-19
- slug: sqlite-date-time-weekday-n-modifier-form-95e7fda69480
- score: 0.93

How to use it:

When computing a date with a negative weekday offset, use the `weekday -N` modifier. It moves backward to the most recent previous date with that weekday; `N` must be an integer from -6 through 0.

Examples:

```
SELECT date('<time-value>', 'weekday -<N>');
```

- why_it_matters: Compute a date using a negative weekday offset in a SQLite date/time expression.
- sources: <https://sqlite.org/changes.html#version_3_54_0>, <https://sqlite.org/lang_datefunc.html#wdmod>, <https://sqlite.org/lang_datefunc.html>
- gotchas: "Version: 3.54.0"; "time-value (required): Date/time input; date/time functions accept ISO-8601 text or Julian day numbers, and Unix timestamps when followed by `auto` or `unixepoch`."; "weekday -N (required): Weekday modifier: negative N moves backward to the most recent previous weekday. N must be an integer from -6 to +6; if already on that weekday, the date is unchanged."; "date() (required): Returns the resulting date as text in `YYYY-MM-DD` format."; "Prerequisite: Negative weekday values are supported beginning with SQLite 3.54.0."

## SQLite `printf()` and `format()` add JSON string literal conversions (sqlite3, 2026-10-09)
Published 2026-10-19
- slug: sqlite-printf-and-format-add-json-string-literal-conversions-07f856806897
- score: 0.97

How to use it:

When rendering a JSON string literal with SQLite’s built-in formatter, use `%J` to include surrounding double quotes or `%j` to omit them when embedding within a larger JSON literal.

Examples:

```
SELECT printf('%J', <value>);
```

```
SELECT printf('%j', <value>);
```

```
SELECT format('%J', <value>);
```

- why_it_matters: Render a JSON string literal from SQL or built-in printf formatting.
- sources: <https://sqlite.org/changes.html#version_3_54_0>, <https://sqlite.org/printf.html#pj>
- gotchas: "Version: 3.54.0"; "%J (required): Substitution for a zero-terminated string; renders a JSON string literal with double quotes on both ends. A null pointer renders unquoted `null`."; "%j (required): Substitution for a zero-terminated string; renders JSON string content without surrounding double quotes. A null pointer produces no output."; "<value> (required): String argument substituted by `%J` or `%j`."; "Prerequisite: Use SQLite 3.54.0 or later; `%j` and `%J` first appeared in 3.54.0."

## sqlite3 CLI `.diskused` command and optional `diskused()` extension (sqlite3, 2026-10-09)
Published 2026-10-19
- slug: sqlite3-cli-diskused-command-and-optional-diskused-extension-5af5af6cdfe2
- score: 0.90

How to use it:

When you need to inspect space used by a SQLite database’s tables and indexes, run `.diskused` in the CLI or call `diskused('main')` in SQL.

Examples:

```
sqlite3 <database-file> .diskused
```

```
SELECT diskused('main');
```

- why_it_matters: Inspect database space usage from the sqlite3 CLI or use the SQL extension in a database workflow.
- before: Use the separate `sqlite3_analyzer` utility; SQLite 3.54.0 deprecated it and identifies `.diskused` as its replacement.
- sources: <https://sqlite.org/changes.html#version_3_54_0>, <https://www2.sqlite.org/diskusedfunc.html>, <https://www.sqlite.org/cli.html>
- gotchas: "Version: 3.54.0"; "<database-file> (required): SQLite database file to analyze."; "diskused(X) (required): X is the schema containing the database, usually `'main'`."; "Prerequisite: The `diskused()` function is built into the SQLite CLI."; "Prerequisite: For third-party applications, compile `ext/misc/diskused.c` separately and load it using `sqlite3_load_extension()`; SQLite must be compiled with `-DSQLITE_ENABLE_DBSTAT_VTAB`."; "Prerequisite: `.diskused` is available as of SQLite 3.54.0."; "`diskused()` is an optional extension."; "`sqlite3_analyzer` is deprecated."

## sqlite3 CLI `.mode` integer and floating-point format options (sqlite3, 2026-10-09)
Published 2026-10-19
- slug: sqlite3-cli-mode-integer-and-floating-point-format-options-c9819278b69a
- score: 0.95

How to use it:

When inspecting query output, set `.mode`’s `--ifmt` and/or `--fpfmt` options to control integer and floating-point rendering.

Examples:

```
.mode qbox --ifmt ",d" --fpfmt "%.2f"
SELECT * FROM <table>;
```

```
.mode qbox --ifmt %x --fpfmt %.8e
SELECT * FROM <table>;
```

- why_it_matters: Control how integer and floating-point values render when inspecting query output.
- sources: <https://sqlite.org/changes.html#version_3_54_0>, <https://sqlite.org/climode.html>, <https://sqlite.org/climode.html#opt-ifmt>, <https://sqlite.org/climode.html#opt-fpfmt>
- gotchas: "Version: 3.54.0"; "--ifmt STRING: printf-style format for integer values. If set, STRING begins with `%` and ends in `d`, `x`, `X`, or `o`; optional width and precision are each at most 3 digits, precision is ignored, and accepted flags are `+`, `-`, `#`, `0`, and `,`. `auto` uses default integer conversion."; "--fpfmt STRING: printf-style format for floating-point values. If set, STRING begins with `%` and ends in `f`, `e`, `E`, `g`, or `G`; optional width and precision are each at most 3 digits, and accepted flags are `+`, `-`, `#`, and `,`. `auto` uses default floating-point conversion."; "Prerequisite: Use SQLite CLI version 3.54.0 or later for the card’s stated version; the documentation examples identify the CLI as SQLite 3.54."

Next: https://sincecutoff.com/v1/changes.md?tool=sqlite3&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6InNxbGl0ZTMiLCJ2IjoxfQ
Save `next_cursor`; next visit, pass it to get only what was published since.
<!-- end of page -->
