GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix exact number filters, multi-cell BLOB paste and export write errors by deepsidhu1313 · Pull Request #4245 · sqlitebrowser/sqlitebrowser

Conversation

@deepsidhu1313

@deepsidhu1313 deepsidhu1313 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Three independent commits.

  1. Don't quote numbers in exact-match filters. = filters quoted every value, so a computed column such as COUNT(*) never matched. A value stays unquoted only if it round-trips as an integer or a 15-digit double (so 007, 1.50, 1e5 and 0x10 stay quoted). In a column without type affinity that holds the text '5', =5 now matches only the number 5, like <>5 and >=5 already did.
  2. Keep binary data as BLOB when pasting several cells (the loop used setData(), which stores text). New test-paste.
  3. Detect incomplete writes when exporting to CSV and JSON. JSON ignored the result of write(), CSV missed errors in its last buffered chunk, and an existing file was replaced by the truncated one. New writeAll()/flushStream() helpers; commit() is skipped on error.

Fixes #3608, #3243; related to #3307

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
claude added 3 commits October 30, 2026 04:53
@claude
Don't quote numbers in exact-match filters
9559b85
An exact filter such as =2 always put the value in quotes. SQLite never
considers a number equal to a quoted string when the column has no type
affinity, e.g. the result of COUNT(*) in a view, so such a filter never
matched anything.

Leave numbers unquoted, but only those which are the same number when
read as text or as a number. Values like 007, 1.50 or 12345678901234567890123
are kept as text, otherwise they would stop matching the text stored in a
text column.

Fixes sqlitebrowser#3608
@claude
Keep binary data as BLOB when pasting several cells
9d76c8a
Pasting a single cell already stores binary data as a BLOB, but pasting
several cells went through setData(), which always stores the value as
text. Binary data copied from a BLOB cell ended up as corrupt TEXT in the
destination cells, which other applications can not read back.

Use setTypedData() for each cell, like the single cell cases do, and
keep the editability check that setData() did.

Add test-paste, which copies and pastes cells through the key shortcuts
of the table view.

Fixes the multi-cell case of sqlitebrowser#3307
@claude
Detect incomplete writes when exporting to CSV and JSON
2cc3d1d
When the disk is full, write() first writes as much as still fits and
returns the smaller number. The JSON export ignored this, so it reported
success and left a truncated file. The CSV export did not notice a
failure to write the last chunk of data either, because a QTextStream
only writes it when it is flushed, which happened after the last check.

Check the result of writing the JSON document and flush the CSV stream
before checking it. Don't commit the QSaveFile when something went
wrong, because that replaced an existing file with the incomplete one.

Add writeAll() and flushStream() for this and test them with a device
that behaves like a full disk.

Fixes sqlitebrowser#3243

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Exact filter on COUNT() column doesn't work

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@deepsidhu1313 @claude
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.