@antonovicha/hdbext-async
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Async wrapper around hana-client connection and statement classes

Supposed to be used in express nodejs applications.

Work in progress. Versions published are alpha still.

Usage

npm install @antonovicha/hdbext-async

hdbext & hana-client typings

Inside of you tsconfig.json file include @sap/hdbext and @sap/hana-client typings provided by this package:

{
  "compilerOptions": {
    ...
    "baseUrl": ".",
    "typeRoots": [
      ...
      "./node_modules/@antonovicha/hdbext-async/dist/@types/@sap",
      "./node_modules/@types",
      ...
    ],
  }
}

Simple code example:

import { HdbextAsync } from "@antonovicha/hdbext-async";
import * as hdbext from "@sap/hdbext";

hdbextAsync = new HdbextAsync(hdbext);
const connection = await hdbextAsync.createConnection(hanaOptions.hana);
const result1 = await connection.exec(sql, params, options);

const procedureFunction = await connection.loadProcedure(schema, procedureName);
const result2 = await procedureFunction([param1, param2]);
const result3 = await procedureFunction({ Param1: "something", Param2: 42 });

connection.close();

Package Sidebar

Install

npm i @antonovicha/hdbext-async

Weekly Downloads

2

Version

1.0.8

License

mit

Unpacked Size

18.2 kB

Total Files

14

Last publish

Collaborators

  • antonovicha