Skip to Content

KalamDB v0.7.0-beta.0

Typed nested data, equality indexes, and in-database TypeScript procedures — plus an everyday CLI for local databases.

This is a beta. Treat it as a new on-disk format, not an in-place upgrade from 0.6.

Server, CLI, pg_kalam, and the TypeScript / Dart / Rust / Python SDKs are all 0.7.0-beta.0 on the same row. See SDK version compatibility.

Breaking: wipe the data directory

0.7 stores USER / SHARED / STREAM row values as compact ordinal payloads (identity stays on the RocksDB key). The server does not dual-decode 0.6 KENV / name-keyed rows.

  • Dev and test clusters: wipe the data directory before starting this binary.
  • There is no in-process cluster migration in this release.
  • HTTP, WebSocket, PGWire, and SDK payloads are unchanged.

What shipped

FeatureDocs
Named typesCREATE TYPE
Scalar indexesIndexes
Server functionsServer Functions, CLI
Everyday CLIInit and Dev, kalam.toml

Server functions

SQL-defined procedures run in a sandboxed V8 isolate, using the same types, row codec, and indexes as tables.

  • CREATE PROCEDURE / CALL / GRANT EXECUTE
  • SQL and PGWire, HTTP POST /v1/functions/{namespace}/{procedure}, topic triggers, and schedules
  • Inline JavaScript, or project TypeScript via kalam schema gen / kalam deploy
SQL
CREATE OR REPLACE PROCEDURE app.inc(x INT)LANGUAGE JAVASCRIPTAS $$  return input.x + 1;$$; CALL app.inc(41);

CREATE TYPE

Named types are the same contract for table columns and procedure signatures: composites, enums, FROM TABLE aliases, implicit table row types, and topic payload types.

SQL
CREATE TYPE app.address AS (  city TEXT NOT NULL,  country TEXT NOT NULL); CREATE SHARED TABLE app.users (  id TEXT PRIMARY KEY,  name TEXT NOT NULL,  home app.address); CREATE TYPE app.user FROM TABLE app.users;

Indexes on USER and SHARED tables

Scalar secondary indexes are equality prefix scans — not vector USING COSINE.

SQL
CREATE INDEX idx_messages_conversation ON app.messages (conversation_id);CREATE INDEX idx_conversation_members_user ON app.conversation_members (user_id);

Everyday CLI

kalam init, kalam dev, kalam up / down, kalam schema gen, kalam deploy, and kalam functions cover local databases, schema, and procedures.

Not in this beta

  • In-place upgrade of existing 0.6 data directories
  • Table AFTER ROW triggers (route writes through a topic instead)
  • Extra function runtimes (V8 only)
  • CREATE TYPE … AS UNION / INTERFACE (reserved)
  • Vector indexes answering scalar equality