> ## Documentation index
> Fetch the complete documentation index at: https://goncordia.docs7.io/llms.txt
> Ask it with GET https://goncordia.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Backends and guarantees

> What each backend supports and which transaction guarantee it gives

| Driver | Package | Tx type | Atomic insert | Notes |
|---|---|---|---|---|
| PostgreSQL (pgx v5) | `driver/pgxv5` | `pgx.Tx` | ✅ | LISTEN/NOTIFY, lease leadership, SKIP LOCKED |
| PostgreSQL / MySQL / MariaDB / SQLite | `driver/stdlib` | `*sql.Tx` | ✅ | pgx stdlib, go-sql-driver/mysql (MySQL 8, MariaDB 10.6+), modernc sqlite |
| gorm | `driver/gorm` | `*gorm.DB` | ✅ | thin adapter over stdlib |
| bun | `driver/bun` | `bun.Tx` | ✅ | thin adapter over stdlib |
| MongoDB 4.0+ | `driver/mongodbv2` | `*mongo.Session` (mongo-driver v2) | ✅ | replica set required |
| MongoDB 4.0+ (deprecated) | `driver/mongodb` | `mongo.SessionContext` (mongo-driver v1) | ✅ | use `driver/mongodbv2` |
| Redis | `driver/redis` | `NoTx` | ❌ | at-least-once; Pub/Sub notifications |
| Cassandra 3.11+ | `driver/cassandra` | `NoTx` | ❌ | LWT claiming; ScyllaDB / DSE compatible |
| ClickHouse 23+ | `driver/clickhouse` | `NoTx` | ❌ | ReplacingMergeTree; at-least-once |
| Amazon DynamoDB | `driver/dynamodb` | `NoTx` | ❌ | conditional writes; at-least-once |
| Cloud Firestore | `driver/firestore` | `*firestore.Transaction` | ✅ | RunTransaction; composite index required |
| In-memory | `driver/memory` | `memory.NoTx` | ❌ | synchronized operations, no rollback; for tests |

## Transaction guarantees by backend

| Backend | Guarantee | Mechanism |
|---|---|---|
| Postgres / MySQL / SQLite | Atomic with business tx | Same DB connection, same `BEGIN`/`COMMIT` |
| gorm / bun | Atomic with business tx | Extracts underlying `*sql.Tx` |
| MongoDB | Atomic with business tx | Multi-document transaction on replica set |
| Redis | **None** — at-least-once | Pub/Sub + idempotent workers |
| Cassandra | **None** — at-least-once | LWT for claiming; no cross-statement tx |
| ClickHouse | **None** — at-least-once | ReplacingMergeTree + FINAL; no transactions |
| DynamoDB | **None** — at-least-once | Conditional writes; no cross-table tx |
| Firestore | Atomic with business tx | `RunTransaction` + `EnqueueTx` |
| In-memory | Atomic (in-process) | Single mutex |
