-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update precompiled binaries (Bimal Jha) * fea: add support for pool.initAsync() API, PR #953, issue #952 (Bimal Jha) * fix: compilation issue on z/OS, define SQL_BOOLEAN, issue #961 (Bimal Jha) * build(deps): bump axios from 1.5.0 to 1.6.0 (#964) (dependabot[bot]) * fix promise bug of executeNonQuery api, issue #960 (Bimal Jha) * read Db2 credential from Env var for testing (Bimal Jha)
- Loading branch information
Showing
8 changed files
with
71 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// To run this test.ts file, follow below steps | ||
// npm install -g typescript | ||
// update database connection info in ../test/config.json file | ||
// tsc test.ts --lib es2015,dom | ||
// node test.js | ||
|
||
import * as ibmdb from '../' | ||
import * as common from '../test/common.js' | ||
|
||
let cn = common.connectionString | ||
, pool = new ibmdb.Pool(); | ||
|
||
async function main(){ | ||
const query = `SELECT * FROM employee WHERE phoneno = ?;` | ||
|
||
await pool.initAsync(1, cn) | ||
const conn = await pool.open(cn) | ||
const stmt = await conn.prepare(query) | ||
const result = await stmt.execute([3978]) | ||
|
||
const fetched = await result.fetchAll() | ||
console.log(fetched); | ||
await conn.close() | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters