sql.rest

Tools for SQL at rest

sql.rest builds open-source tools that treat SQL as the universal language for data management—from testing PostgreSQL schemas to reimagining how data is modeled, queried, and stored.
Projects
001
Universal Data Management

VaryD

A data management system that supports multiple data models through SQL dialect extensions—designed to model any and all data with a unified interface.

VaryD extends standard SQL with specialized dialects: graphSQL for traversal, timeSQL for temporal queries, spaceSQL for spatial operations, docSQL for document search, fuzzSQL for probabilistic reasoning, and more.

Each dialect answers a fundamental question about data—what, where, when, why, how, and what-if—through declarative SQL syntax. Written in Go with gRPC interfaces.

graphSQL timeSQL spaceSQL docSQL fuzzSQL cellSQL streamSQL mlSQL vectorSQL eventSQL
-- answer what, where, when, why, how, and what-if
SELECT graph.shortest_path(a, b)
  FROM nodes a, nodes b
 WHERE time.as_of('2025-01-01')
   AND space.within(a.loc, radius('10km'));
002
SQL Testing Framework

Loam

A hierarchical SQL testing framework for PostgreSQL. Tests are pure SQL files—no Go harness, no ORM, no abstraction layer.

Loam discovers tests by convention: file naming and directory structure drive everything. Seeds inherit through the directory hierarchy. Three test modes—data-driven, simple, and full-control—cover the spectrum from snapshot comparisons to assertion-based testing.

Every test runs in a transaction that rolls back. No side effects, no flaky ordering dependencies, no configuration files. Just SQL files in directories.

*.test.sql *.seed.sql *.expect.tsv data-driven transaction isolation
-- tests are just SQL files
tests/
  seed.sql                -- shared setup
  users/
    seed.sql              -- inherits parent
    01-create.test.sql     -- pure SQL
    01-create.expect.tsv   -- expected output