| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| lapis-1.19.0-1.rockspec | 2026-08-13 | 5.4 kB | |
| lapis-1.19.0-1.src.rock | 2026-08-13 | 488.5 kB | |
| README.md | 2026-08-13 | 2.6 kB | |
| v1.19.0 source code.tar.gz | 2026-08-13 | 360.9 kB | |
| v1.19.0 source code.zip | 2026-08-13 | 485.8 kB | |
| Totals: 5 Items | 1.3 MB | 4 | |
Models and Database
- Relation and
include_inkeys can now usedb.rawfor the column name, letting you match rows on a computed expression.
moon
class Users extends Model
@relations: {
{"user_emails", has_many: "UserEmails", key: {
[db.raw "lower(email)"]: (u) -> u.email\lower!
}}
}
When preloading, the raw expression is aliased in the generated query so the returned rows can be matched back to their source objects. The alias columns are stripped from the loaded models.
Model:createaccepts anon_conflictoption. Currently only"do_nothing"is supported, which appendsON CONFLICT DO NOTHINGto the insert. If the conflict prevents the row from being inserted thencreatereturnsnilwith no error message. Postgres and SQLite only.
moon
Users\create {
id: 1
profile_color: "blue"
}, on_conflict: "do_nothing"
OpenResty
- Fixed bug where after dispatch lock was stored globally on a worker instead of per ctx, resulting in
you tried add to after_dispatch while running a callbackerror. - Added
lapis.nginx.is_simulate, which returnstruewhen running under a simulated request instead of real Nginx.
CLI
lapis buildvalidates the compiled config withnginx -tbefore reloading a running server. If the config is invalid the Nginx error output is printed and theHUPsignal is not sent, so the running server keeps serving its previous config. Without this check a broken config would appear to reload successfully while the old workers kept running. Pass--test-configto force the check when no server is running, useful as a pre-flight before deploying.
bash
$ lapis build --test-config
lapis migrateaccepts--statement-timeoutto set the Postgresstatement_timeoutbefore migrations run, so a runaway migration is aborted instead of blocking indefinitely. The value is passed to Postgres directly, so it takes milliseconds (--statement-timeout=5000) or a string with units (--statement-timeout=5s). Postgres only, using it with another backend is an error.lapis simulateforcessocket.httpas the HTTP client instead of trying to usengx.location.capture.
Configuration
- The default app module is now selected with
config.default_app_module, replacing the undocumentedconfig.app_class. Loading the app module is unified across the command line and the server backends.
Full Changelog: https://github.com/leafo/lapis/compare/v1.18.0...v1.19.0