Hi, is it possible to use two different connection...
# exposed
m
Hi, is it possible to use two different connection pools? I need to compare data on two different databases to do migrations
s
Cant you just measure for one, change to different pool, measure again ? If not then you can use
Database.connect
with this signature:
Copy code
fun connect(
            datasource: DataSource,
            setupConnection: (Connection) -> Unit = {},
            databaseConfig: DatabaseConfig? = null,
            manager: (Database) -> TransactionManager = { ThreadLocalTransactionManager(it) }
        )
m
In my current project, there are two connection pools - one to Oracle and one to SQL server, and there is a bit of ETL type of work. I am wondering how to supply the datasource to the
Table
based on some condition
a
You can pass an explicit
Database
instance to a
transaction
block
👍🏾 1