[!IMPORTANT]
LinkedQL is shaping up fast, and currently backed by over 1,200 tests.
Feedback, issues, and PRs help drive us towards the next thousand tests and beyond.
See Contributing
Installation & Overview
LinkedQL is distributed as an npm package:
npm install @linked-db/linked-ql
It provides clients for all supported SQL dialects β including FlashQL, the embeddable SQL engine for local and offline use.
This lets you construct relationships directly in an insert:
β "Given a base row"
β "Insert a related row that automatically references the base"
What this changes
No need for an ORM or manual JOIN logic.
If you've defined foreign key relationships in your tables, you can traverse them directly in the query.
Deeper syntax and traversal patterns are fully covered in DeepRefs β.
3. Run Live Queries
LinkedQL brings live queries to your database: PostgreSQL, FlashQL, MySQL/MariaDB*.
With just a mode switch { live: true }, you get back a live, self-updating result set.
const result = await db.query(`
SELECT p.title, p.category
FROM posts AS p
WHERE p.published = true
ORDER BY p.created_at DESC
`, { live: true });
result.rows updates automatically as the database changes:
new rows appear
removed rows disappear
updated rows mutate in place
What this changes
No need for dedicated GraphQL servers in front of your database.
The query itself is the subscription.
Not limited by query complexity
const result = await db.query(`
SELECT
p.title,
p.category,
author ~> { name, email } AS author
FROM posts AS p
WHERE p.published = true
ORDER BY p.created_at DESC
`, { live: true });
β Supports the full SELECT range β joins, filters, aggregates, etc.
β Supports the full set of LinkedQL syntax shorthands like DeepRefs and JSON Literals
databases: PostgreSQL, FlashQL, etc. (MySQL/MariaDB support coming soon)
runtimes and deployment models: client / server / worker / edge
4. Run SQL locally with FlashQL
Meet FlashQL β a full SQL engine that runs anywhere + inside your application.
It's LinkedQL's embeddable SQL engine.
import { FlashQL } from'@linked-db/linked-ql/flashql';
const db = newFlashQL();
await db.connect();
const result = await db.query(`
CREATE TABLE users (
id INT PRIMARY KEY,
name TEXT
);
INSERT INTO users VALUES (1, 'Ada'), (2, 'Linus');
SELECT * FROM users ORDER BY id;
`);
console.log(result.rows);
await db.disconnect();
FlashQL brings the full LinkedQL feature set into an embedded, local-first runtime.
Built for:
local-first and offline-first architectures
data federation and sync across local/remote boundaries
The application-flavoured SQL that runs anywhere, with pluggable, composable backends, with an offline- and sync-ready model
We found that @linked-db/linked-ql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Package last updated on 04 May 2026
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.
The remediated findings include organization permission bugs, stale project access after transfers, OIDC replay edge cases, audit logging gaps, and an IDOR in API token deletion.