| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-11-13 | 2.6 kB | |
| v1.17.0 source code.tar.gz | 2025-11-13 | 346.1 kB | |
| v1.17.0 source code.zip | 2025-11-13 | 468.8 kB | |
| Totals: 3 Items | 817.5 kB | 2 | |
Postgres Update
This version contains the first rewrite of the database modules to allow for running multiple connection configurations in parallel instead of relying on a global configuration. This refactor will eventually make it to the other database modules in future versions.
- The
lapis.db.postgresmodule is now a proxy object for the"default"connection configuration - Add
configurefunction tolapis.db.postgresto define a new connection configuration. (Returns a compatibledbobject) - Add
loggerfield todbobject. Thedbobject will use that logger for any logging actions (queries, connections). Defaults to the modulelapis.logger - Add
db_connectionlogger function tolapis.logger. The default implementation is empty and is designed to be overridden. - Postgres connection now emits
logging.db_connection(db, pgmoon, success, err)so you can add metrics on connections as you see fit - Removed the
pgmoon_connperformance fields, they were unreliable given that multiple connections could be created in a single request - Add explicit
disconnectandconnectfunctions to thedbmodule. The connection configuration can automatically reconnect if the connection has been disconnected. - Note: The entire
lapis.db.postgresmodule has mostly been rewritten, if you were relying on undocumented exports for custom behavior you should review your code before deploying
Other additions
- Added
timer_attolapis.nginx, a safe wrapper aroundngx.timer.atthat runs callbacks underpcall, bubbles errors, and guaranteesafter_dispatchis called to clean up any database connections - After dispatch callbacks are removed after running to prevent double running if manually called
lapis.httpdefaults tosocket.httpunless the cqueues is explicitly running (previously it would try to load lua-http)params_shapeacceptslabel = false, letting you hide the automaticfield:prefix when you want bare error strings or custom labels.- Add support for dot syntax in default Nginx config template syntax, eg.
${config.postgres.database}
Fixes
- Fix a bug where a nested preload could try to load relations on a basic value type that was returned by a relation
CLI
- Top level
lapiscommand supports a--dirflag (requiresluafilesystem), so you can runlapisfrom outside the project root - Add
lapis mcpshortcut for the lapis-mcp package - When using
lapis generate migrationthe name of the generated migration is now printed to stdout