# 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?**

[The comparison](https://reylo.dev/docs/compare) runs the same queries through Reylo and seven other SQL typing tools.

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

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.

**Does Reylo run migrations?**

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

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

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

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

[Turn each Prisma Client call into a `.sql` file](https://reylo.dev/docs/prisma#queries), and move your migrations to [Reylo Migrate](https://reylo.dev/docs/prisma#moving-to-reylo-migrate). Prisma Migrate works too, if you [keep it](https://reylo.dev/docs/prisma#keeping-prisma-migrate).

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

It holds your [migrations](https://reylo.dev/docs/migrate), 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. It says so in the build output and in each query's hover.

```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
```

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

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

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

Reylo publishes every query it runs on Node's tracing channel `reylo:query`. Your tracer or logger can [wrap each one in a span](https://reylo.dev/docs/typescript#observability).
