FAQ

Common questions

Comparison shows what Reylo and seven other tools that type SQL infer: nullability, parameters, cardinality and nested JSON.

No. Reylo has your database prepare each query, which checks it and describes its parameters and columns without running it, and reads the rest from the catalog. On SQLite, Reylo prepares the query in its own copy of SQLite, from the schema in your database file.

Yes: reylo migrate writes each migration from your schema.sql, and checks and runs it. Your own tool works just as well, such as Prisma Migrate, Drizzle Kit, Atlas, dbmate or plain SQL files, since Reylo types your queries against whatever schema your dev database has. After a migration, the next type check sees the new schema: a dropped column is an error in the .sql file that names it, and in the code that reads it.

Start the database, apply the migrations, and run tsc --noEmit --runExternalCode with DATABASE_URL set. Your tests need the database too. direct_url names the database it reads. To skip analyzing what hasn't changed, keep reylo/.cache/ in your CI's cache: a database built by the same migrations reads its entries. Before Reylo 0.8.0, a Postgres built with JIT, as most Docker images are, can make the type check take minutes: add ?options=-c%20jit%3Doff to its URL. Deployment / CI has a complete GitHub Actions workflow.

Keep Prisma Migrate for your schema, and turn each Prisma Client call into a .sql file. Migrating from Prisma covers the schema changes to make first, the build, each call as SQL, and what to check before you finish.

It holds your migrations, which you commit, and Reylo's cache of each query's analysis in reylo/.cache/. The cache has its own .gitignore, so git skips it: don't commit it.

Yes, where reylo/.cache/ already holds each query's analysis. A type check or a build that can't reach the database reads its types from there, and says so: every build step prints one line, and a query's hover shows it.

reylo: cannot connect to the database at localhost:5432/app (DATABASE_URL in .env): connection refused; building from reylo/.cache/, analyzed 2026-11-07

The types are then as old as that analysis, so a migration since doesn't show. With a server's URL set, a build reads only what was analyzed on that database. With none, or where the database is a file, as on SQLite, it reads the newest analysis of any. A query that reylo/.cache/ doesn't hold is an error.

A host that builds before it migrates, such as Vercel, starts with no reylo/.cache/, so build against a database of its own there, as Deployment / CI describes.

Reylo decodes its own queries' values itself, so every driver gives the same types. A 64-bit integer is a bigint, since a number loses precision past 2^53; a decimal is its exact text; and an instant is its ISO 8601 text in UTC. No value is a Date, which a driver reads in a time zone nobody chose. Every SQL type's TypeScript type is in Inference.

Reylo publishes every query it runs on Node's tracing channel reylo:query, so your tracer, logger or other o11y tool can wrap each one in a span. Tracing shows how.

Released under the MIT License. Copyright © 2026 Colin McDonnell.