Drivers
One engine. Every language teams ship in.
First-class native drivers for the seven languages we see most in production stacks, plus the Postgres wire protocol so anything that talks to Postgres talks to RedDB.
JavaScript / TypeScript
Python
Stable Python detailsRust
Stable Rust detailsJava
Beta Java detailsKotlin
Beta Kotlin detailsC++
Beta C++ detailsPostgres-wire
Stable Postgres-wire detailsGo
Planned Go details
Stable
JavaScript / TypeScript
First-class driver. Used by the RedDB control plane and the tetis-lair backends.
Source / packagepnpm add @reddb/clientimport { createClient } from '@reddb/client'
const db = createClient({ url: 'red://localhost:5050', token: process.env.RED_TOKEN })
await db.sql`INSERT INTO users (id, name) VALUES (${42}, ${'Alice'})`
const rows = await db.sql`SELECT * FROM users WHERE id = ${42}`
const answer = await db.ask("who owns passport AB1234567?")pip install reddbfrom reddb import Client
db = Client(url="red://localhost:5050", token=os.environ["RED_TOKEN"])
db.sql("INSERT INTO users (id, name) VALUES (?, ?)", 42, "Alice")
rows = db.sql("SELECT * FROM users WHERE id = ?", 42).rows()
answer = db.ask("who owns passport AB1234567?")cargo add reddbuse reddb::Client;
let db = Client::connect("red://localhost:5050").await?;
db.sql("INSERT INTO users (id, name) VALUES (?, ?)")
.bind(42).bind("Alice")
.execute().await?;
let rows = db.sql("SELECT * FROM users WHERE id = ?").bind(42).fetch_all().await?;
let answer = db.ask("who owns passport AB1234567?").await?;implementation("io.reddb:reddb-client:0.2")var db = RedDb.connect("red://localhost:5050", token);
db.sql("INSERT INTO users (id, name) VALUES (?, ?)", 42, "Alice");
var rows = db.sql("SELECT * FROM users WHERE id = ?", 42).rows();
var answer = db.ask("who owns passport AB1234567?");Beta
Kotlin
Coroutine-friendly wrapper around the JVM driver, with Flow and suspend functions.
Source / packageimplementation("io.reddb:reddb-client-kotlin:0.2")val db = RedDb.connect("red://localhost:5050", token)
db.sql("INSERT INTO users (id, name) VALUES (?, ?)", 42, "Alice")
val rows: Flow<Row> = db.sql("SELECT * FROM users WHERE id = ?", 42).rows()
val answer = db.ask("who owns passport AB1234567?")# header-only — copy include/reddb#include <reddb/client.hpp>
reddb::Client db("red://localhost:5050", token);
db.sql("INSERT INTO users (id, name) VALUES (?, ?)", 42, "Alice");
auto rows = db.sql("SELECT * FROM users WHERE id = ?", 42).rows();
auto answer = db.ask("who owns passport AB1234567?");Stable
Postgres-wire
RedDB speaks the Postgres wire protocol on port 5435. Drop-in for tools that already speak Postgres.
Source / package# any Postgres driver — psql, pg, asyncpg, pgx, JDBC, etc.psql "postgres://admin:admin@localhost:5435/reddb"
# or from any Postgres client:
# pg / node-postgres (Node)
# asyncpg / psycopg (Python)
# pgx / lib/pq (Go)
# JDBC PostgreSQL driver (JVM)
# Rust sqlx / tokio-postgresPlanned
Go
Native Go driver is on the roadmap. For now: use the Postgres wire driver via lib/pq or pgx.
Source / packageDon't see your stack?
The Postgres wire protocol covers most production stacks today (Go, .NET, PHP, Ruby, Elixir, …). For a native driver, open an issue and we will scope it.