Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ragarwalll/hana-orm
HANA ORM for NodeJS Applications with typescript support
https://github.com/ragarwalll/hana-orm
Last synced: 11 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-24T16:26:23.000Z (over 1 year ago)
- Last Synced: 2023-11-27T22:42:58.497Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
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:[email protected]) 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=)