Skip to content

The endConnection method

Ana Paula Oliveira de Lima edited this page Nov 10, 2021 · 1 revision

endConnection

endConnection terminate Client and Pool connections to the database. After its use, in order to use the insert, select, update, deleteFrom, beginTransaction, commit and rollback methods, it is necessary to use the startConnection method again. Both methods return an object with the keys:

  • success: stores a boolean, true if EndPoo or EndClient was performed successfully, or false in case of error;
  • error: stores the error message obtained during EndPool or EndClient, stores false if the EndPool or EndClient was executed successfully.

It is recommended that connections be closed after all database selections, updates, inserts and deletes have been completed.

Clone this wiki locally