1.0.0 • Published 2 years ago
@ragarwal06/hana-orm v1.0.0
@ragarwal06/hana-orm - SAP HANA Database Client Wrapper for NodeJS (with Typescipt Support)
Table of contents
Install
Install from npm:
npm install @ragarwal06/hana-ormor clone from the GitHub repository to run tests and examples locally:
git clone https://github.com/ragarwal06/hana-orm.git
cd hana-orm
npm installGetting started
If you do not have access to an SAP HANA server, go to the SAP HANA Developer Center and choose one of the options to use SAP HANA Express or deploy a new SAP HANA Cloud server.
This is a very simple example showing how to use this module in Javascript:
const hanaOrm = require("@ragarwal06/hana-orm");
const client = hanaOrm.createClient({
host: "hostname",
port: 30015,
user: "user",
password: "secret",
});
client.then(() => {
const { insert, remove, find, update, prepareForTable } =
hanaOrm.databaseOperations();
insert({
columnNames: ["name"],
conditions: {
name: "",
},
clause: "AND",
})
});This is a very simple example showing how to use this module in Typescript:
import { createClient, databaseOperations } from "@ragarwal06/hana-orm";
const client = createClient({
host: "hostname",
port: 30015,
user: "user",
password: "secret",
});
interface Users {
name: string;
}
client.then(() => {
const { insert, remove, find, update, prepareForTable } =
databaseOperations();
find<Users>({
columnNames: ["name"],
conditions: {
name: "",
},
clause: "AND",
});
});This is a very simple example showing how to use this module in Express:
app.use(prepareClient({
host: "hostname",
port: 30015,
user: "user",
password: "secret",
}))router.get('/user', async (req: Request, res: Response) => {
const { insert, remove, find, update, prepareForTable } =
req.db;
});Contact
If you face any issue please write to owner or create a GitHub issue
For feature request please request here
1.0.0
2 years ago
0.0.4-beta
2 years ago
0.0.3-beta
2 years ago
0.0.2-beta
2 years ago
0.0.1-beta
2 years ago
0.0.1
2 years ago