While working on the example app I've run into an issue when interacting with the database in post requests. The initial request seems to work fine (db on startup/on close execute properly in lifespan context), but if I make a post request using a form (e.g. a login) the connection pool isn't acquired. I think this is because the lifespan startup should be run not in the adapter constructor, but rather in the event handler - this seemed to work and makes sense.
I'll make a PR for this change.
While working on the example app I've run into an issue when interacting with the database in post requests. The initial request seems to work fine (db on startup/on close execute properly in lifespan context), but if I make a post request using a form (e.g. a login) the connection pool isn't acquired. I think this is because the lifespan startup should be run not in the adapter constructor, but rather in the event handler - this seemed to work and makes sense.
I'll make a PR for this change.