Hacker News new | ask | show | jobs
by jeremyloy_wt 872 days ago
Oh is that what the online/offline stuff in their docs mean? I’ve never heard of that technique being used before, that’s really interesting
1 comments

Exactly. Normally it will use whatever database you put in your DATABASE_URL environment variable (or .env), but you can run `cargo sqlx prepare` to save the metadata in a bunch of json files to enable offline development or if you CI environment doesn't have a database instance. However you will need to update this every time you change a SQL query. I find it more convenient to just develop in online mode against a local database.