FAQ

Common questions

The comparison runs the same queries through Reylo and seven other SQL typing tools.

No. Reylo has your database prepare each query, which describes it without running it. It 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. Any other tool works too, such as Prisma Migrate, Drizzle Kit or plain SQL files. Reylo types your queries against whatever schema your dev database has. After a migration, a dropped column is a type error wherever a query names it.

Start the database, apply the migrations, and run tsc --noEmit --runExternalCode with DATABASE_URL set, as this GitHub Actions workflow does. 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. Before Reylo v0.8, a Postgres with JIT on can make the type check take minutes. Add ?options=-c%20jit%3Doff to its URL.

Turn each Prisma Client call into a .sql file, and move your migrations to Reylo Migrate. Prisma Migrate works too, if you keep it.

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. It says so in the build output and in each query's hover.

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

Cached types match the schema from that run, so later migrations won't show until the database is reachable again:

  • With a server's URL set, a build reads only entries analyzed on that database.
  • With none, or on SQLite, it reads the newest analysis available.
  • A query missing from reylo/.cache/ fails the build.
  • A host that builds before it migrates, such as Vercel, has no cache: run the build on a dry run of the deploy there.

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 a string, and an instant is an ISO 8601 string 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. Your tracer or logger can wrap each one in a span.