# FAQ

> "Answers to common questions about Reylo: how it compares, migrations, CI, builds, the cache and value types."

Common questions

**How does Reylo compare with sqlc, PgTyped and other tools?**

[Comparison](https://reylo.dev/compare) shows what Reylo and seven other tools that type SQL infer: nullability, parameters, cardinality and nested JSON.

**Does the type check run my queries?**

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.

**Does Reylo run migrations?**

Yes: [`reylo migrate`](https://reylo.dev/migrate/docs) 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.

**How do I type-check in CI?**

Start the database, apply the migrations, and run `tsc --noEmit --runExternalCode` with `DATABASE_URL` set. Your tests need the database too. [`direct_url`](https://reylo.dev/configuration#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](https://reylo.dev/deployment) has a complete GitHub Actions workflow.

**How do I move a project from Prisma?**

Keep Prisma Migrate for your schema, and turn each Prisma Client call into a `.sql` file. [Migrating from Prisma](https://reylo.dev/prisma) covers the schema changes to make first, the build, each call as SQL, and what to check before you finish.

**What is the reylo directory, and should I commit it?**

It holds your [migrations](https://reylo.dev/migrate/docs), 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.

**Can I build without a database?**

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.

```txt
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](https://reylo.dev/deployment#build-before-migrate) describes.

**Why are dates strings, and 64-bit integers bigints?**

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](https://reylo.dev/inference#primitives).

**How do I add observability to my queries?**

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](https://reylo.dev/typescript#observability) shows how.
