Skip to content

feat(sql): UPDATE and DELETE on custom tables - #56

Merged
harehare merged 6 commits into
mainfrom
feat/update-delete-custom-tables
Oct 25, 2026
Merged

harehare merged 6 commits into
mainfrom
feat/update-delete-custom-tables

Conversation

@harehare

Copy link
Copy Markdown
Owner

Rows are rewritten like INSERT does: expressions and WHERE see the table as it was before the statement, NOT NULL and UNIQUE are checked, the change is persisted atomically and a failure leaves the table as it was. Only statements on blocks need --write-back now.

NULL against a number compared as equal, which is not a total order, so
NULLs ended up between numbers (and a sort may panic on that). NULL now
sorts lowest, then booleans, numbers and strings, in both the plain and
the aggregate paths.
Custom table cells are text, so age + 1 was NULL. A string that parses as
a number now counts as that number in + - * /.
Rows are rewritten like INSERT does: expressions and WHERE see the table
as it was before the statement, NOT NULL and UNIQUE are checked, the
change is persisted atomically and a failure leaves the table as it was.
Only statements on blocks need --write-back now.
@harehare
harehare added this pull request to stack #58 October 25, 2026 03:31
@harehare
harehare removed this pull request from stack #58 October 25, 2026 03:31
The test was defined twice, which stopped the test target from compiling.
Both overlap with what SQL (WHERE, under()) and mq already cover.

BREAKING CHANGE: DocumentStore::query(), Query, QueryResult, LintViolation and the `mq-db lint` subcommand are removed.
…d-lint

refactor!: remove the Query builder and the lint command
@harehare
harehare merged commit 02df1d9 into main Oct 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant