hgourvest / node-firebird

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

Instantly close all the connections #345

Closed pk-bt closed 3 weeks ago

pk-bt commented 4 weeks 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 4 weeks ago

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

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

aPool.destroy();

pk-bt commented 3 weeks ago

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

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

aPool.destroy();

So simple and effective...

Thank you.