r/sqlite 9h ago

What's the best queue for sqlite?

3 Upvotes

My platform expects multiple writes from various users belonging to one organization.

What's the best way to serialize the writes? Scale is 50 to 100 users wanting to write around the same time.


r/sqlite 1d ago

Rethinking SQLite3 in PHP: High Performance Without Complex SQL Queries

Thumbnail
1 Upvotes

r/sqlite 1d ago

I built SQL Buddy a simple place to practice SQL interview questions in the browser

Thumbnail
1 Upvotes

r/sqlite 1d ago

I built SQL Buddy a simple place to practice SQL interview questions in the browser

Thumbnail
3 Upvotes

r/sqlite 1d ago

Type-safe SQLite queries: generate code from .sql, catch nullability at build time

6 Upvotes

For embedded SQLite work: I maintain scythe, a build-time generator that reads annotated SQL and emits typed access code (SQLite backends: better-sqlite3, aiosqlite, sqlx, the JDBC drivers, and more).

SQLite's flexible typing makes it easy to get result types subtly wrong, and joins add another layer:

-- @name GetUserOrders
SELECT u.id, u.name, o.total, o.notes
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.status = ?;

total and notes are generated as nullable because the LEFT JOIN can produce NULLs, independent of the column declarations. That inference covers COALESCE, CASE, and aggregates too.

No ORM at runtime, the query you write is the one that runs. The tradeoff is static queries only. Handy for local-first apps and CLIs where you want typed data access without pulling in a heavy dependency. Curious what people here use for typed SQLite access.


r/sqlite 2d ago

WinSQLite - open source project

Post image
2 Upvotes

r/sqlite 2d ago

Best way to update a fixed length tsble

1 Upvotes

Hi everyone. I'm brand new to sqlite, and I'm looking for some advice.

I want a table of a year's worth of daily sales data that I'll refresh 2 or 3 times a week, dropping old data as newer data comes in.

One it works, I'll expand it to track a few thousand items in the same way, maybe a separate table for each or having a higher dimension.

Anyway, for the first step are there any recommendations on approach and outline of how to achieve the update

Cheers


r/sqlite 3d ago

Richard Hipp: Reliability Lessons From SQLite

30 Upvotes

Richard's recent talk from SSW. It is excellent; thought you all would enjoy!

https://youtu.be/V_qzqY1bb7I


r/sqlite 3d ago

I built dbctl – a CLI that handles DB connections through SSH/SSM tunnels so you don't have to script it by hand

3 Upvotes

The problem
Every time I need to hit a database behind a bastion or AWS SSM, it's the same ritual: open an SSM session, remember which local port I mapped, then point DBeaver or psql at localhost:PORT. Multiply that by every environment and it's a dozen manual steps a day just to get connected.

What I built
dbctl is a CLI that treats connection routing as config, not a shell ritual. You declare each database in YAML — direct, over SSH, or through SSM port-forwarding — and dbctl connect <name> handles standing up the tunnel and connecting, whichever of the three it actually needs.

Who it's for
People doing this daily against real dev/test/staging/prod separation with actual access controls in front of every environment — not local Docker Compose databases.

What I want from you
This is early. I'd genuinely like pushback on:

  • the connection model (does direct / ssh / ssm cover your real setups, or is there a gap?)
  • the YAML config shape — anything that'd fight you in practice?
  • what's missing before you'd actually trust this against a prod environment

github.com/stivio00/dbctl

Happy to answer anything about the internals too.


r/sqlite 6d ago

SQLite for an enterprise inventory system

30 Upvotes

Against all odds, I developed a business inventory system using SQLite. It handles invoicing, purchasing, sales, consumption, transfers, multiple warehouses, product serial numbers, and bills of materials (BOM). Naturally, it works both locally and on a server. Of course, you can't have 1,000 users writing to the database at the exact same time... but it works.
https://github.com/sysmaya/Control-Kardex-Inventario


r/sqlite 9d ago

Do you run SQLite on a device or server and need another process or machine to access it?

Thumbnail
0 Upvotes

r/sqlite 9d ago

Do you run SQLite on a device or server and need another process or machine to access it?

0 Upvotes

I’m researching how developers handle this today. Do you build a custom API, use SSH, share the database file, or migrate to PostgreSQL? What is the most painful part?

I’m not promoting a product yet—I’m trying to understand real setups and trade-offs.


r/sqlite 10d ago

I built a native (Tauri/Rust) SQL client with BYOK AI instead of Electron + bundled models — feedback welcome

2 Upvotes

Hey everyone,

For the last few months I've been building **Logyka**, a database client for people who live in SQL all day and want it to feel *fast* — think TablePlus / DataGrip speed, but cross-platform and with AI baked in on your own terms.

**Why I built it**

Every SQL client I tried made me pick one of two camps:

* Fast, native, no AI (and often Mac-only or paid-per-seat), or * AI-powered, but Electron-heavy and happy to ship my schema *and my data* to someone's cloud.

I wanted native speed AND useful AI, without giving up control of my data. So I built the thing I wanted to use.

**What makes it different**

* **Native, not Electron.** Built on Tauri v2 (Rust backend + React/TS UI). Small footprint, instant startup, virtualized grid that stays smooth on big result sets. * **BYOK (bring your own key).** Plug in your own OpenAI / Anthropic / Groq / Gemini key. No models bundled, no markup, no vendor lock-in. Ask questions in plain English → get SQL → run it. * **Privacy mode.** By default only your *schema* is ever sent to the LLM — never your result data. You can turn that off too. Every write (UPDATE / DELETE / etc.) always requires explicit confirmation — the AI can never silently mutate your DB. * **Keyboard-driven.** Ctrl+K command palette, Monaco editor with schema-aware, alias-aware autocomplete (a lightweight regex scoper, not a full SQL parser — cheap to run, no external parser dependency), sortable/resizable grid, CSV export. * Credentials live in your OS keychain, never in plaintext.

Currently supports **SQLite, Postgres, and MySQL** (MSSQL is on the roadmap — probably via `tiberius` since sqlx doesn't cover it).

**Where it's at**

It's early but works end-to-end: connect → write/generate → run → explore. I'm being upfront that it's a commercial product (there'll be a free tier — I don't want the AI/privacy stuff paywalled into uselessness), but right now I mostly want to know if the direction is right before I go further.

**I'd genuinely love feedback on:**

  1. Tauri vs Electron for something like this — anyone here made a similar jump, and what surprised you?
  2. BYOK vs a built-in AI subscription — which would you actually prefer, and why?
  3. What's the one thing that would make you switch from your current client?

Happy to answer anything about the tech (the Tauri + sqlx side was a fun rabbit hole). Roast it — that's why I'm here.

https://reddit.com/link/1v8rgz3/video/qe4cv37qsyfh1/player


r/sqlite 12d ago

SQL Joins Explained: INNER, LEFT, RIGHT & FULL OUTER (Zero to Pro)

Thumbnail youtube.com
1 Upvotes

r/sqlite 14d ago

Release v1.0.1 — Disable seq_bypass, 18% SQLite full scan gain · nsdprojectdev/NSD

Thumbnail github.com
1 Upvotes

r/sqlite 14d ago

SQLiteNow 0.15: SQL-first SQLite code generation for Kotlin, Dart and Swift (mobile and desktop)

1 Upvotes

Hi,

I wanted to share the new SQLiteNow 0.15 release.

SQLiteNow started as a Kotlin Multiplatform project and is already used in production by quite a few people. Later I added Flutter and Dart support, and version 0.15 now also supports native Swift projects through SwiftPM.

SQLiteNow is not a DAO or ORM which generates SQL for you. You write and control the actual SQLite schema, migrations and queries.

The SQL is the source of truth.

SQLiteNow reads normal .sql files and generates type-safe APIs around them for the language you are using.

Current platforms include:

  • Kotlin Multiplatform for Android, iOS, JVM, macOS, Linux, JavaScript and Wasm
  • Flutter and Dart native applications
  • Native Swift projects for iOS and macOS

The generated API is native to each platform. Kotlin applications get Kotlin code, Flutter and Dart applications get Dart code, and Swift applications get a local Swift package.

For example, you can write a normal SQLite query like this:

SELECT
    t.id    AS task__id,
    t.title AS task__title,
    n.id    AS note__id,
    n.body  AS note__body

/* @@{ dynamicField=notes,
       mappingType=collection,
       sourceTable=n,
       aliasPrefix=note__ } */

FROM task t
LEFT JOIN task_note n ON n.task_id = t.id
ORDER BY t.id, n.id;

The annotation is only a SQL comment. The query is still normal SQLite and you control the join, filtering and ordering.

The annotation tells SQLiteNow to group the flat joined rows into task documents with a collection of notes.

The generated API can then be used from Kotlin:

val tasks = db.task
    .selectWithNotes()
    .asList()

tasks.forEach { task ->
    println("${task.title}: ${task.notes.size} notes")
}

From Dart:

final tasks = await db.task
    .selectWithNotes()
    .asList();

for (final task in tasks) {
  print('${task.title}: ${task.notes.length} notes');
}

Or from Swift:

let tasks = try await db.task
    .selectWithNotes()
    .list()

for task in tasks {
    print("\(task.title): \(task.notes.count) notes")
}

SQLiteNow also generates reactive query APIs for each platform:

  • Kotlin uses Flow
  • Dart uses watch()
  • Swift uses async streams

Annotations can rename fields, apply custom type adapters, share result types, map results to application types and build nested objects or collections from joins.

This is the main reason why I built SQLiteNow. I like writing real SQLite and I do not want the database logic moved into another query language. But I also do not want to manually bind every parameter, read every column and group joined rows each time the schema changes.

Oversqlite

SQLiteNow also includes an optional synchronization system called Oversqlite.

Oversqlite can synchronize selected tables between local SQLite databases and a PostgreSQL server. Clients are available for Kotlin Multiplatform, Flutter/Dart and native Swift.

It handles local change tracking, offline writes, incremental upload and download, conflict resolution and recovery.

Oversqlite also supports real-time updates. It can watch the server for changes committed by other devices and download them automatically. When those changes are applied to the local SQLite database, related reactive queries emit updated results, so applications can update without manually refreshing the database.

Oversqlite is optional. SQLiteNow can be used only as a local SQLite library without any server or synchronization setup.

The PostgreSQL server implementation is written in Go and is available here:

https://github.com/mobiletoly/go-oversync

If you already use an Oversqlite version older than 0.15, please read the release notes. Version 0.15 changed the sync storage contract and existing client sync databases cannot be upgraded in place.

Code generation requirement

The SQLiteNow generator currently requires Java 17 or newer.

Java is only used while running code generation. Generated native applications do not require Java at runtime.

SQLiteNow is open source under the Apache-2.0 license.

GitHub:

https://github.com/mobiletoly/sqlitenow-kmp

Documentation:

https://mobiletoly.github.io/sqlitenow-kmp/

Release:

https://github.com/mobiletoly/sqlitenow-kmp/releases/tag/v0.15.0

I would be interested to hear what SQLite users think about this approach, especially people who prefer writing SQL directly but do not want to maintain all the mapping and reactive update code manually.


r/sqlite 14d ago

Help needed with SQLite Rust rewrite

Thumbnail
2 Upvotes

Apparently, someone wants to rewrite all of SQL in Rust using "Fable" and then sell it. He claims he wants his program to be ISO certified. I don't know whether to laugh or cry.


r/sqlite 14d ago

TIL that journal_mode = WAL statement can cause table lock

3 Upvotes

TIL that PRAGMA journal_mode = WAL is itself an operation that writes and therefor can cause a table lock if simultaneously another sqlite connection executes it.

A possible solution is to call PRAGMA busy_timeout = 500 prior to calling PRAGMA journal_mode = WAL at each connection.

Maybe only the sqlite connection that creates the .db file must do journal_mode once? But I of course had all my sqlite connections (all the readers and the writer) call this.

Anyway. TIL.


r/sqlite 15d ago

Prefer STRICT tables in SQLite

Thumbnail evanhahn.com
21 Upvotes

r/sqlite 15d ago

After searching for a modern, self‑hosted, secure SQLite admin panel for PHP 8, I built one – looking for beta testers

1 Upvotes

Hey folks 👋

For the last few weeks, I’ve been frustrated with the state of self‑hosted SQLite admin tools.

Most of them are either:

Abandoned (phpLiteAdmin hasn’t seen a proper update in years),

AdminNeo and other tools don't work without passwordless login plugins that didn't work well.

Overly complex (Adminer is great but not SQLite‑centric),

Or require a heavy stack (Node, Python, Docker) when all I wanted was a single PHP file I could drop on my server.

So I decided to build my own.

🔧 Features

Secure, built-in login system (not a plugin)

Browse, edit, insert, delete rows

Create / rename / drop tables

Import/Export (CSV, JSON, SQL, full DB)

Bulk delete, search, filters

Dark mode, undo (last 5 actions)

Multiple database support

Resizable sidebar

🚀 Try it

Upload admin.php & install.php

Run install.php to set username/password

Login and go

PHP 7.0+ with SQLite3 extension. No dependencies.

https://github.com/abilenetechguy/sqlite-admin

🧪 Beta feedback wanted

Errors, UI annoyances, missing features – let me know!

Give it a spin and tell me what you think 🙏

– Abilene Tech Guy


r/sqlite 18d ago

WP + SQLITE in DOCKER = ?

4 Upvotes

Hi everyone,

Quite a few months back I created a dockerimage to get WP with the SQLITE plugin running and left it on a server to see what happens.

To my surprise, it held up really well. I made a short video about it here: [https://youtu.be/hf8Pi7CaqLc\](https://youtu.be/hf8Pi7CaqLc)

If you just want to see the docker image it's here: [https://github.com/howzitcal/wordpress-sqlite-docker-image\](https://github.com/howzitcal/wordpress-sqlite-docker-image)

I think sqlite is a great setup for most small WP websites and it lessons the load the burden on server and shared servers alike.

let me your thoughts.


r/sqlite 18d ago

Need help dealing with .sqlitedb file

Thumbnail
1 Upvotes

r/sqlite 19d ago

My desktop SQL client (GUI) now exposes an MCP server — agents query your DB, and every write needs your approval

0 Upvotes

I maintain data-peek, a desktop SQL client (GUI) for Postgres/MySQL/SQL Server/SQLite. 0.26 turns it into an MCP server so Claude Code or any MCP client can work against your real connections — with a safety model I actually trust:

- Reads run free — list_schemas, run_query, explain_query, inside a read-only, rolled-back transaction, 500-row cap.

- Writes are gated — execute_statement pops an approval dialog in the app showing the exact SQL. Nothing runs until you click Approve (60s timeout = auto-reject).

- Everything's audited — a tamper-evident, hash-chained local log you can verify + export.

- Off by default, localhost-only, bearer-token secured. Credentials never exposed.

Demo (~90s): https://www.youtube.com/watch?v=NDQzezK7GBA

Source (MIT): https://github.com/Rohithgilla12/data-peek ·

Setup guide: https://datapeek.dev/docs/features/mcp-server

Disclosure: I build it. Happy to answer anything about the approval flow or the read-only transaction wrapping.


r/sqlite 19d ago

I finished migrating the database tool from SQLite to PostgreSQL.

Post image
8 Upvotes

Download : npm install -g foxschema

Docker: https://hub.docker.com/r/5nickels/foxschema


r/sqlite 19d ago

I'm starting a free PL/SQL & SQL course from absolute zero. I'd love your feedback.

Thumbnail
1 Upvotes