https://github.com/ragarwalll/hana-orm
HANA ORM for NodeJS Applications with typescript support
https://github.com/ragarwalll/hana-orm
agarwal btp cf hana hana-orm orm ragarwalll rahul sap therahulagarwal
Last synced: 19 days ago
JSON representation
HANA ORM for NodeJS Applications with typescript support
- Host: GitHub
- URL: https://github.com/ragarwalll/hana-orm
- Owner: ragarwalll
- License: gpl-3.0
- Created: 2023-08-16T11:58:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T23:46:55.000Z (about 1 year ago)
- Last Synced: 2025-09-19T03:30:21.726Z (9 months ago)
- Topics: agarwal, btp, cf, hana, hana-orm, orm, ragarwalll, rahul, sap, therahulagarwal
- Language: TypeScript
- Homepage: https://therahulagarwal.com/hana-orm/
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
@ragarwal06/hana-orm - SAP HANA Database Client Wrapper for NodeJS (with Typescipt Support)
==============================================
Table of contents
-------------
* [Install](#install)
* [Getting started](#getting-started)
* [Contact](#contact)
Install
-------
Install from npm:
```bash
npm install @ragarwal06/hana-orm
```
or clone from the [GitHub repository](https://github.com/ragarwal06/hana-orm) to run tests and examples locally:
```bash
git clone https://github.com/ragarwal06/hana-orm.git
cd hana-orm
npm install
```
Getting started
------------
If you do not have access to an SAP HANA server, go to the [SAP HANA Developer Center](https://developers.sap.com/topics/hana.html) 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:
```js
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:
```ts
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({
columnNames: ["name"],
conditions: {
name: "",
},
clause: "AND",
});
});
```
This is a very simple example showing how to use this module in Express:
```ts
app.use(prepareClient({
host: "hostname",
port: 30015,
user: "user",
password: "secret",
}))
```
```ts
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](mailto:agarwal.rahul324@gmail.com) or create a [GitHub issue](https://github.com/ragarwal06/hana-orm/issues/new?assignees=&labels=bug&projects=&template=issue.md&title=)
For feature request please request [here](https://github.com/ragarwal06/hana-orm/issues/new?assignees=&labels=feature&projects=&template=feature.md&title=)