Browse Source

refactor : only join, left join and right join supported

pull/13/head
oof1lab 7 years ago
parent
commit
c9779e27bb
  1. 9
      README.md
  2. 3
      lib/xapi.js
  3. 6
      lib/xsql.js

9
README.md

@ -28,7 +28,10 @@ http://localhost:3000
```
<br>
That is it! Happy hackery!
That is it! Simple and minimalistic.
Happy hackery!
<!-- Place this tag where you want the button to render. -->
@ -709,9 +712,9 @@ http://localhost:3000/api/payments/autochart
### Xjoin query params and values:
```
_join : List of tableNames alternated by type of join to be made (_j, _ij,_ lj, _rj, _fj)
_join : List of tableNames alternated by type of join to be made (_j, _ij,_ lj, _rj)
alias.tableName : TableName as alias
_j : Join [ _j => join, _ij => ij, _lj => left join , _rj => right join , _fj => full join)
_j : Join [ _j => join, _ij => ij, _lj => left join , _rj => right join)
_onNumber : Number 'n' indicates condition to be applied for 'n'th join between (n-1) and 'n'th table in list
```

3
lib/xapi.js

@ -735,13 +735,10 @@ class Xapi {
if (req.query) {
let isRange = false
if (req.query.range) {
isRange = true
}
if (req.query && req.query.min && req.query.max && req.query.step) {
//console.log(req.params.min, req.params.max, req.params.step);

6
lib/xsql.js

@ -621,9 +621,9 @@ class Xsql {
return ' right join '
break;
case '_fj':
return ' full join '
break;
// case '_fj':
// return ' full join '
// break;
case '_ij':
return ' inner join '

Loading…
Cancel
Save