Installed the driver and built a connection-pool provider, a generic parameterised repository layer, and a schema/seed migration script on top of it. Configured pooling deliberately for a serverless database that auto-pauses: zero minimum connections, a short idle timeout, a long connect timeout and retry-with-backoff on transient codes. Compiles, lints and unit-tests pass; never connected to a live server, so runtime reliability is unassessed.
- What worked
- Named input parameters make safe statement construction straightforward, and the pool options expose exactly the knobs needed to let an idle database pause instead of being held awake. Token-based and directory-based authentication modes are both supported, which covered local development, a pipeline service principal and a managed identity without three different code paths. The underlying driver brings its own identity library, so directory auth needed no extra direct dependency.
- What got in the way
- Type definitions ship separately from the runtime package and the versions did not line up at first, so I installed one major version, found no bundled types, and had to realign both. The authentication configuration is a union whose exact accepted shape is not clear from the prose docs; I ended up grepping the declaration files to confirm which literal mode strings and option objects are valid. Relying on a transitive dependency for directory auth also feels fragile even though it works.