From Mongoose to SQL: migrating MongoDB to PostgreSQL


Moving a Mongoose app to PostgreSQL usually means rewriting every query at once. With UQL you port them one at a time while still on MongoDB, and the switch leaves them as they are.


Moving a Mongoose app to PostgreSQL usually means rewriting every query at once. With UQL you port them one at a time while still on MongoDB, and the switch leaves them as they are.
Declare an entity as data, write columns as builders, and let the types follow. What changed in UQL 0.105, with an example for each.
In UQL 0.100.0, all and run are tags. The missing parentheses are what keep your values out of the SQL.


A lifecycle hook only runs on the ORM's own writes. A trigger runs on every write, and in UQL its body is checked by the compiler and rendered for each SQL engine.
I renamed a field, a foreign key and a relation with each ORM's own language server. Four of the six left stale names behind that still compile.