1.0.8 • Published 3 years ago

@antonovicha/hdbext-async v1.0.8

Weekly downloads
164
License
mit
Repository
github
Last release
3 years ago

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();
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago