Added Joins #2

Merged
jusax23 merged 6 commits from dev into main 2023-02-15 15:06:53 +01:00
Showing only changes of commit a80819b7b8 - Show all commits

View file

@ -122,6 +122,7 @@ TableB.addAttribute("B1", INT, {
let res = await select([TableA.A1, TableB.B1], innerJoinOn(eq(TableA.A1, Tableb.B1)))
.query(db);
```
See: [Joins](#joins)
#### Insert:
```javascript
@ -228,6 +229,24 @@ StringModifier:
(v\* = string, number, boolean, null, Modifier, Aggregation, select Query, Attribute)
#### Joins
- `crossJoin(t1, t2, ...)`
- `naturalJoin(t1, t2, ...)`
- `leftNaturalJoin(t1, t2, ...)`
- `rightNaturalJoin(t1, t2, ...)`
- `fullNaturalJoin(t1, t2, ...)`
- `innerJoinUsing(t1, t2, a1, a2, ...)`
- `leftJoinUsing(t1, t2, a1, a2, ...)`
- `rightJoinUsing(t1, t2, a1, a2, ...)`
- `fullJoinUsing(t1, t2, a1, a2, ...)`
- `innerJoinOn(t1, t2, b)`
- `leftJoinOn(t1, t2, b)`
- `rightJoinOn(t1, t2, b)`
- `fullJoinOn(t1, t2, b)`
(t\* = Table or Join; a\* = Attributes; b = Boolean Modifier)
#### Aggregations
- `count(a)`
- `sum(a)`