0.5.1 • Published 4 years ago
ndo4h v0.5.1
NDO4H - Node Data Objects for Hana
Promisify & Objectify as camelCase hana queries
Initialization
Make sure you imported and initialized \@sap/hdbext library as described in https://www.npmjs.com/package/@sap/hdbext
Import the library
const {ndo4h} = require('ndo4h');
- Initialize it, passing the @sap/hdbext library
const db = ndo4h(req.db);
Executing queries
db.execute(query, parameters);
where
- query is a string
- parameters is an array
and it returns an array of objects with all field names as properties in camelCase, if they were in snake_case in the database
Examples
- Queries without parameters
const users = await db.execute("SELECT * FROM USERS");
Example return:
[
{
"id": 1,
"firstName": "Rafael",
"lastName": "Zanetti",
"email": "something@else.com"
}
]
- Query With parameters
const user = await db.execute("SELECT * FROM USERS WHERE EMAIL = ?", [req.params.email]);
0.5.0
4 years ago
0.5.1
4 years ago
0.4.0
5 years ago
0.3.1
5 years ago
0.3.0
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
7 years ago
0.1.6
7 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago