---
title: "Change Data Capture in SQLite, Without the Triggers"
description: "Turso Database, a Rust rewrite of SQLite, has built-in change data capture enabled with a single PRAGMA."
url: "https://swe.quest/articles/change-data-capture-in-sqlite-without-the-triggers-241b82cfb5d25e99"
canonical: "https://turso.tech/blog/change-data-capture-in-sqlite-without-the-triggers"
source: "Turso"
published: "2026-11-05"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 8
tags: ["sqlite","event-driven","data-pipelines","caching"]
---

# Change Data Capture in SQLite, Without the Triggers

A post on [Turso](https://swe.quest/sources/turso.md), published 2026-11-05, 8 min read, Deep dive. Original: [https://turso.tech/blog/change-data-capture-in-sqlite-without-the-triggers](https://turso.tech/blog/change-data-capture-in-sqlite-without-the-triggers)

## Summary

Turso Database, a Rust rewrite of SQLite, has built-in change data capture enabled with a single PRAGMA. It records every committed insert, update, delete and schema change into a regular \`turso\_cdc\` table with transaction IDs, before/after row images and commit markers, so no triggers or WAL decoding are needed. The post compares this to trigger-based sqlite-cdc, the session extension and update hooks, and lists rough edges: decoding uses the current schema, the change table grows until pruned, and capture is per connection. It ends with a restart-safe polling consumer that groups changes by transaction, advances a watermark only at transaction boundaries, needs an idempotent apply step and prunes against the slowest consumer.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)

## Prerequisites

- SQLite basics ([easy posts on SQLite](https://swe.quest/tags/sqlite.md?difficulty=easy))
- transactions and commits ([easy posts on Consistency models](https://swe.quest/tags/consistency.md?difficulty=easy))
- event-driven architecture basics ([easy posts on Event-driven architecture](https://swe.quest/tags/event-driven.md?difficulty=easy))

## Keywords

Turso Database, SQLite, change data capture, turso\_cdc, sqlite-cdc, Turso Sync, Debezium

## Related posts

- [Introducing Change Data Capture for SQLite in Turso](https://swe.quest/articles/introducing-change-data-capture-for-sqlite-in-turso-c6756296fac94071.md): Turso · 2025-07-16 · Medium · 5 min read · SQLite, Event-driven architecture, Databases
  Turso's SQLite rewrite gains an unstable, built-in Change Data Capture feature enabled per connection via PRAGMA unstable\_capture\_data\_changes\_conn.
- [Turso Sync: Local-First SQLite with Push and Pull](https://swe.quest/articles/turso-sync-local-first-sqlite-with-push-and-pull-8967f9053b2dc6bc.md): Turso · 2026-11-16 · Medium · 10 min read · Local-first & sync, SQLite, Replication, Event-driven architecture, Performance engineering
  Turso Sync replaces libSQL's page-based Embedded Replicas with logical row-level changes captured via CDC in Turso Database, a Rust rewrite of SQLite, so reads and writes stay local and apps call push() and pull() explicitly.
- [Turso Sync: a much, much, much better way to sync](https://swe.quest/articles/turso-sync-a-much-much-much-better-way-to-sync-f7b69ab545fa6e56.md): Turso · 2026-04-24 · Medium · 8 min read · SQLite, Local-first & sync, Replication, Performance engineering
  Turso, a Rust rewrite of SQLite, replaces libSQL's Embedded Replicas with a sync model built on change data capture, shipping logical changes instead of physical pages and splitting sync into separate push() and pull() operations.
- [Turso v0.4.0](https://swe.quest/articles/turso-v0-4-0-191cca637e457c1d.md): Turso · 2026-01-05 · Medium · 3 min read · SQLite, Storage engines, Query engines, Local-first & sync, Concurrency
  Turso v0.4.0 overhauls its experimental MVCC mode, which lifts SQLite's single-writer limit, adding index support, checkpointing and recovery.
- [How Turso made connections to SQLite databases 575x faster](https://swe.quest/articles/how-turso-made-connections-to-sqlite-databases-575x-faster-271f1e3891c5cf67.md): Turso · 2025-07-29 · Medium · 4 min read · SQLite, Performance engineering, Rust, Concurrency
  SQLite re-reads and parses the sqlite\_schema table on every new connection, so opening a connection to a database with 10,000 tables takes about 23ms.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
