Injecting custom DataSource object to get DatabaseConnection from queryDSL

Goal :
I am trying to create a custom Database connection pool for the specific tasks to be executed during the migration so it can be easily tracked.

I am looking for a way to create a DatabaseAccessor object that held the DatabaseConnection object based on information I have provided as DataSource (or something similar).

I am using pocket-knife 5.0.0 version.