You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Performance is not ideal with the current Connection behavior.
Describe the solution you'd like
Currently, Connection objects connect/disconnect on each call. We should have an option to have it connect once and stay open until the user explicitly disconnects for the transports that support such things (idb, odbc, ssh). This would have to be opt-in, as the user would then be necessary for closing out connections that would otherwise be leaked.
The proposed solution would be something like
constconn=newConnection({transport: 'ssh',transportOptions: {host: 'myhost',username: 'myuser',password: 'mypassword'},persistent: true,// or keepOpen or whatever});conn.add(...);conn.run(...);// transport is implicitly openedconn.run(...);// transport is re-usedconn.close();conn.run(...);// transport is implicitly opened again
In this example the connection still implicitly opens the connection, it's just the user responsible for closing it. Alternatively, we could have the user explicitly open it as well.
When using the existing behavior, close() would be a no-op.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Performance is not ideal with the current Connection behavior.
Describe the solution you'd like
Currently, Connection objects connect/disconnect on each
call
. We should have an option to have it connect once and stay open until the user explicitly disconnects for the transports that support such things (idb, odbc, ssh). This would have to be opt-in, as the user would then be necessary for closing out connections that would otherwise be leaked.The proposed solution would be something like
In this example the connection still implicitly opens the connection, it's just the user responsible for closing it. Alternatively, we could have the user explicitly open it as well.
When using the existing behavior,
close()
would be a no-op.The text was updated successfully, but these errors were encountered: