Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to LowQuery are documented here. The format follows [Keep a

## [Unreleased]

## [0.5.6] - 2026-11-13

### Fixed
- **New versions show up within a minute.** The app checks every minute instead of every 10, and again when the window comes back from the tray. A check that hung (after sleep or a network change) no longer blocks the later ones, a failed background download is not repeated every minute, and checks no longer keep their discarded results in memory.

### Security
- SQLite 3.54.1, bundled through `rusqlite` 0.41.1: opening a database together with a crafted `-wal` file no longer returns uninitialized page-cache memory (RUSTSEC-2026-0459).

## [0.5.5] - 2026-11-11

### Fixed
Expand Down Expand Up @@ -179,7 +187,8 @@ First public release, with PostgreSQL and Oracle.
- Schema browser for tables, views, sequences, routines, packages and columns.
- Drafts restored on restart, light and dark themes, and a layout for narrow windows.

[Unreleased]: https://github.com/LowBloat/LowQuery/compare/v0.5.5...HEAD
[Unreleased]: https://github.com/LowBloat/LowQuery/compare/v0.5.6...HEAD
[0.5.6]: https://github.com/LowBloat/LowQuery/compare/v0.5.5...v0.5.6
[0.5.5]: https://github.com/LowBloat/LowQuery/compare/v0.5.4...v0.5.5
[0.5.4]: https://github.com/LowBloat/LowQuery/compare/v0.5.3...v0.5.4
[0.5.3]: https://github.com/LowBloat/LowQuery/compare/v0.5.2...v0.5.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The [latest release](https://github.com/LowBloat/LowQuery/releases/latest) inclu
gh attestation verify LowQuery-<version>-linux-x64.AppImage --repo LowBloat/LowQuery
```

**Updates.** Installed copies on Windows, macOS, AppImage, `.deb` and `.rpm` update themselves: LowQuery checks for a new release every few minutes and when the window regains focus, downloads it in the background and offers **Restart to update** once it is ready. Updates are signed and verified before installation. `.deb` and `.rpm` installs ask for the administrator password, since dpkg or rpm installs the new package. The Arch package and portable copies are told when a new version is out and link to the download.
**Updates.** Installed copies on Windows, macOS, AppImage, `.deb` and `.rpm` update themselves: LowQuery checks for a new release every minute and when the window comes back, downloads it in the background and offers **Restart to update** once it is ready. Updates are signed and verified before installation. `.deb` and `.rpm` installs ask for the administrator password, since dpkg or rpm installs the new package. The Arch package and portable copies are told when a new version is out and link to the download.

**First launch on Windows and macOS.** The installers are not code-signed yet, so the system warns on first launch:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowquery",
"version": "0.5.5",
"version": "0.5.6",
"description": "LowQuery: a lightweight multi-database SQL client (Oracle and PostgreSQL).",
"homepage": "https://github.com/LowBloat/LowQuery",
"repository": {
Expand Down
34 changes: 17 additions & 17 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lowquery"
version = "0.5.5"
version = "0.5.6"
description = "Lightweight SQL client for multiple databases"
authors = ["LowBloat"]
license = "AGPL-3.0-only"
Expand Down Expand Up @@ -50,7 +50,7 @@ redis = { version = "1.7", default-features = false, features = ["aio", "tokio-c
# Apache Cassandra: native CQL protocol (v4/v5), TLS through rustls.
scylla = { version = "1.9", default-features = false, features = ["rustls-023"] }
# SQLite: embedded engine compiled into the app.
rusqlite = { version = "0.40", features = ["bundled", "column_decltype", "column_metadata"] }
rusqlite = { version = "0.41", features = ["bundled", "column_decltype", "column_metadata"] }
keyring = { version = "=3.6.3", features = ["apple-native", "windows-native", "sync-secret-service"] }
# DBeaver import: credentials-config.json is AES-128-CBC.
aes = "0.9"
Expand Down
3 changes: 0 additions & 3 deletions src-tauri/src/drivers/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ impl LiteSession {
}
let info = stmt
.columns()
.iter()
.map(|c| {
let decl = c
.decl_type()
Expand Down Expand Up @@ -422,7 +421,6 @@ fn statement(

let declared: Vec<(String, Option<String>)> = stmt
.columns()
.iter()
.map(|c| {
(
c.name().to_string(),
Expand Down Expand Up @@ -654,7 +652,6 @@ fn column_origins(stmt: &Statement<'_>) -> Option<Vec<Option<(String, String, St
// rusqlite panics on names that are not UTF-8.
std::panic::catch_unwind(AssertUnwindSafe(|| {
stmt.columns_with_metadata()
.iter()
.map(|m| {
Some((
m.database_name()?.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "LowQuery",
"version": "0.5.5",
"version": "0.5.6",
"identifier": "dev.lowbloat.lowquery",
"build": {
"beforeDevCommand": "bun run dev",
Expand Down
61 changes: 46 additions & 15 deletions src/lib/state/updates.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@ export interface UpdatePolicy {

const RELEASES_URL = "https://github.com/LowBloat/LowQuery/releases/latest";
const FIRST_CHECK_MS = 5_000;
const CHECK_EVERY_MS = 10 * 60 * 1000;
/** The manifest is a small file on GitHub; checking every minute means a new
* release reaches open windows within a minute of being published. */
const CHECK_EVERY_MS = 60 * 1000;
/** Focus comes and goes quickly; at most one extra check per this long. */
const FOCUS_GAP_MS = 2 * 60 * 1000;
const FOCUS_GAP_MS = 15 * 1000;
/** A check that hangs (a network that changed under it, a sleeping laptop)
* would otherwise keep every later check waiting. */
const CHECK_TIMEOUT_MS = 30 * 1000;
/** The same for a stalled background download; installing from the dialog
* downloads again without a limit. */
const DOWNLOAD_TIMEOUT_MS = 15 * 60 * 1000;

/** Each check holds the update (and its download) on the Rust side until
* closed; checks run every minute, so the ones not kept are released. */
function discard(update: Update | null) {
update?.close().catch(() => {});
}

/** Why an installation cannot update itself, shown next to the download link. */
const MANUAL_HINT: Record<string, string> = {
Expand All @@ -26,7 +40,7 @@ const MANUAL_HINT: Record<string, string> = {

/**
* Automatic updates from GitHub Releases. The app checks shortly after it
* opens, every few minutes and whenever the window regains focus. A copy that
* opens, every minute and whenever the window comes back. A copy that
* can update itself (Windows installer, macOS app, writable AppImage, .deb or
* .rpm) downloads the signed update in the background; once it is verified and
* ready, the sidebar offers "restart to update", which installs it right away.
Expand Down Expand Up @@ -73,14 +87,23 @@ class Updates {
getVersion().then((v) => (this.currentVersion = v)).catch(() => {});
setTimeout(() => this.check(false), FIRST_CHECK_MS);
this.timer = setInterval(() => this.check(false), CHECK_EVERY_MS);
window.addEventListener("focus", () => {
const checkSoon = () => {
if (Date.now() - this.lastCheck > FOCUS_GAP_MS) void this.check(false);
};
window.addEventListener("focus", checkSoon);
// The window can come back from the tray or another desktop without focus.
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") checkSoon();
});
}

/** `interactive`: the user asked, so report "up to date" and errors. */
async check(interactive: boolean): Promise<void> {
if (this.checking || this.downloading || this.installing) return;
if (this.checking || this.downloading || this.installing) {
// Still downloading what was found: show it rather than nothing.
if (interactive && this.available) this.dialogOpen = true;
return;
}
this.checking = true;
this.lastCheck = Date.now();
if (interactive) this.error = null;
Expand All @@ -89,18 +112,23 @@ class Updates {
// Copies that cannot install still read the AppImage entry to learn
// the version and notes.
const target = this.policy.target ?? (this.policy.canInstall ? undefined : "linux-x86_64-appimage");
const update = await check(target ? { target } : undefined);
const update = await check({ timeout: CHECK_TIMEOUT_MS, ...(target ? { target } : {}) });
if (!update) {
discard(this.update);
this.update = null;
this.available = null;
this.ready = false;
return;
}
// Already downloaded this one: nothing to do until the restart.
if (this.ready && this.available?.version === update.version) {
// Already found this one: nothing to do until the restart. A background
// download that failed is not repeated every minute; installing from
// the dialog downloads it again.
if (this.update && this.available?.version === update.version) {
discard(update);
if (interactive) this.dialogOpen = true;
return;
}
discard(this.update);
this.update = update;
this.ready = false;
this.available = { version: update.version, notes: update.body ?? "" };
Expand All @@ -120,13 +148,16 @@ class Updates {
let total = 0;
let received = 0;
try {
await update.download((event) => {
if (event.event === "Started") total = event.data.contentLength ?? 0;
else if (event.event === "Progress") {
received += event.data.chunkLength;
this.progress = total > 0 ? Math.min(1, received / total) : null;
}
});
await update.download(
(event) => {
if (event.event === "Started") total = event.data.contentLength ?? 0;
else if (event.event === "Progress") {
received += event.data.chunkLength;
this.progress = total > 0 ? Math.min(1, received / total) : null;
}
},
{ timeout: DOWNLOAD_TIMEOUT_MS },
);
if (this.update === update) this.ready = true;
} catch {
// The dialog falls back to download-and-install in one go.
Expand Down
Loading