hgourvest / node-firebird

Pure javascript and asynchronous Firebird client for Node.js.
Mozilla Public License 2.0
258 stars 130 forks source link

Instantly close all the connections #345

Closed pk-bt closed 2 months ago

pk-bt commented 2 months ago

Is there a way to close all the connections to the database?

The situation is the following :

I am running a firebird connection pool in a nextjs app and I want to close the all connections instantly to do some operations on the database, then reconnect node-firebird. Is this thing possible with node-firebird?

I have tried with Service Manager shutdown but I get errors.

I use firebird version 3.

FabianoCastro commented 2 months ago

const aPool = pool(ISDados.MaximoPool, options);

...... . . . ...

aPool.destroy();

pk-bt commented 2 months ago

const aPool = pool(ISDados.MaximoPool, options);

...... . . . ...

aPool.destroy();

So simple and effective...

Thank you.