Skip to content
Snippets Groups Projects
Commit ba353fce authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Add search parameter to region

parent a64f29c9
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!31Issue/210: Rota para pesquisa de localidade
...@@ -28,7 +28,21 @@ rqf.addField({ ...@@ -28,7 +28,21 @@ rqf.addField({
field: 'pk_regiao_id', field: 'pk_regiao_id',
table: 'regiao' table: 'regiao'
} }
}); }).addField({
name: 'search',
field: false,
where: true
}).addValueToField({
name: 'name',
table: 'regiao',
tableField: 'nome',
where: {
relation: 'LIKE',
type: 'string',
field: 'nome',
table: 'regiao'
}
}, 'search');
regionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { regionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.sql.from('regiao'); req.sql.from('regiao');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment