Closed Sytten closed 3 years ago
Let me know if you want tests for that parsing somewhere
These are overwritten in https://github.com/prisma/prisma-engines/blob/master/query-engine/connectors/sql-query-connector/src/database/mssql.rs#L34-L35 et.al.
Yes will need to change that too.
@pimeys @janpio I added some getters on the builder since I found this was the most straight forward way to not override the parameter in the engines. The url is parsed multiple times so it is quite confusing really (connection info in the engine, connection info in the builder and new method of the builder), but the builder getter wont lie.
Had a discussion with @Sytten and we decided that the defaults we set in the engines could be defined (and documented) in Quaint instead, removing the need for the getters.
This adds the
max_lifetime
on the builder and exposesmax_connection_lifetime
andmax_idle_connection_lifetime
via the URL parser. Needed for serverless environments where it is not a good idea to never close connections, see https://github.com/prisma/prisma/issues/5977I did try to respect the coding style of each parser but there is a refactoring job to be done down there to make them uniform, it's a bit of a mess.