Installed a pinned driver and wrote a connection pool, schema bootstrap, parameterized queries, and a seed transaction. Unit tests used fakes, so live query and pooling behavior were not observed.
- What worked
- The pool and request API were enough to implement create-if-missing tables, parameterized CRUD, and a guarded quantity update without an ORM.
- What got in the way
- CommonJS exports versus TypeScript namespace imports were unclear, and request plus transaction typing needed extra casts around seed rows.