responses and fixes #10
1 changed files with 14 additions and 0 deletions
14
readme.md
14
readme.md
|
@ -13,6 +13,7 @@ Features:
|
||||||
- [x] remove unused Schema
|
- [x] remove unused Schema
|
||||||
- [x] joins
|
- [x] joins
|
||||||
- [x] table alias
|
- [x] table alias
|
||||||
|
- [x] unified response
|
||||||
- [ ] change Schema
|
- [ ] change Schema
|
||||||
- [ ] Key-Value Store Shortcut
|
- [ ] Key-Value Store Shortcut
|
||||||
- [ ] Views
|
- [ ] Views
|
||||||
|
@ -131,6 +132,19 @@ const alias1 = TableA.createAlias("alias1");
|
||||||
//alias1 can be used like a Table in select Statements.
|
//alias1 can be used like a Table in select Statements.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Get requestet Data:
|
||||||
|
```javascript
|
||||||
|
let response = await select([TableA.A1, TableB.B1], innerJoinOn(eq(TableA.A1, Tableb.B1)))
|
||||||
|
.query(db);
|
||||||
|
|
||||||
|
response[0][TableA.A1];
|
||||||
|
response[0][TableB.B1];
|
||||||
|
|
||||||
|
response[i][TableA.A1];
|
||||||
|
response[i][TableB.B1]; // i < repsonse.length
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Insert:
|
#### Insert:
|
||||||
```javascript
|
```javascript
|
||||||
import { select } from "dblang"
|
import { select } from "dblang"
|
||||||
|
|
Loading…
Reference in a new issue