cemremengu / fastify-oracle

Attaches an oracledb connection pool to a Fastify server instance.
Other
14 stars 11 forks source link

Question: Multiple oracle pool instances? #3

Closed cemremengu closed 6 years ago

cemremengu commented 6 years ago

Is it possible at the moment to register two oracle plugins with different names for accessing multiple oracledb instances such as in the mongodb plugin?

fastify
  .register(require('fastify-mongodb'), { url: 'mongodb://mongo1/mydb', name: 'MONGO1' })
  .register(require('fastify-mongodb'), { url: 'mongodb://mongo2/otherdb', name: 'MONGO2' })

Couldn't see anything that supports this in the code but just wanted to ask. I am going to attempt to add this feature if it is not present. What do you think?

jsumners commented 6 years ago

It's not something I have ever needed to do so it's not a situation I would have considered when writing the plugin. Feel free add such functionality.