Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the library to support Promises for all methods. #715

Closed
vchouhan opened this issue Oct 26, 2020 · 4 comments
Closed

Convert the library to support Promises for all methods. #715

vchouhan opened this issue Oct 26, 2020 · 4 comments

Comments

@vchouhan
Copy link

Currently, some of the code base uses callbacks and some promises and it is hard to write clean code around Promises and Callbacks. It would be better to convert the library with Promises so we can leverage Async/Await rather than having to write code with callbacks and querySync and query.
E.g.

  1. Pool
  2. Transactions
  3. Prepare and Execute
@huineng
Copy link

huineng commented Nov 12, 2021

i second this , i used ibm_db for many many years, but i guess it's now the last one i have with callbacks.

@huineng
Copy link

huineng commented May 6, 2022

is this not something that can be closed ? i'm already since a while using await for query and statements

@bimalkjha
Copy link
Member

There are few APIs which do not return Promise. So, we kept it open to address those gaps and close it. Thanks.

bimalkjha added a commit that referenced this issue Sep 6, 2022
 * fix: update binaries for windows and vscode (Bimal Jha)
 * fix: Reloading driver causes failures on async functions #514 (Bimal Jha)
 * fea: Convert the library to support Promises for all methods. #715 (Bimal Jha)
 * fea: add result.close API (Bimal Jha)
 * promisify describe related methods (Bimal Jha)
 * update mac binaries for vscode ibmdb/vscode-extension#50 (Bimal Jha)
 * test: update test files (Bimal Jha)
 * fix: Empty Strings in Batch inserts result in corrupt values being inserted #875 (Bimal Jha)
 * fea: Add support for Buffer() for insert and select for binary data. #702, #859, #860, #862, #864 (Bimal Jha)
 * fea: allow installation using specific version of clidriver (Bimal Jha)
@bimalkjha
Copy link
Member

@vchouhan This support is added in ibm_db@3.0.0. Please refer test file https://github.com/ibmdb/node-ibm_db/blob/master/test/test-asyc-await.js to see the usage. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants