Skip to content
Snippets Groups Projects

Merge new updates into master

3 files
+ 52
1
Compare changes
  • Side-by-side
  • Inline

Files

+ 33
1
@@ -69,6 +69,22 @@ rqf.addField({
@@ -69,6 +69,22 @@ rqf.addField({
foreign: 'estado_id',
foreign: 'estado_id',
foreignTable: 'municipio'
foreignTable: 'municipio'
}
}
 
}).addValue({
 
name: 'state_not',
 
table: 'estado',
 
tableField: ['nome', 'id'],
 
resultField: ['state_name', 'state_id'],
 
where: {
 
relation: '<>',
 
type: 'integer',
 
field: 'estado_id',
 
table: 'municipio'
 
},
 
join: {
 
primary: 'id',
 
foreign: 'estado_id',
 
foreignTable: 'municipio'
 
}
}).addField({
}).addField({
name: 'search',
name: 'search',
field: false,
field: false,
@@ -100,7 +116,23 @@ rqf.addField({
@@ -100,7 +116,23 @@ rqf.addField({
type: 'integer',
type: 'integer',
field: 'microrregiao_id'
field: 'microrregiao_id'
}
}
});
}).addValueToField({
 
name: 'region',
 
table: 'estado',
 
tableField: 'regiao_id',
 
resultField: 'region_id',
 
where: {
 
relation: '=',
 
type: 'integer',
 
field: 'regiao_id',
 
table: 'estado'
 
},
 
join: {
 
primary: 'id',
 
foreign: 'estado_id',
 
foreignTable: 'municipio'
 
}
 
}, 'filter');
// Return all cities
// Return all cities
cityApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
cityApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
Loading