0.5.1 • Published 3 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
3 years ago
0.5.1
3 years ago
0.4.0
4 years ago
0.3.1
4 years ago
0.3.0
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago