Skip to content
Snippets Groups Projects
Commit cee0eee2 authored by Fernando Gbur dos Santos's avatar Fernando Gbur dos Santos
Browse files

[ADD] Adding rqf builders to the route, where it can build the query with filters/dims

parent ef7e957c
No related branches found
No related tags found
3 merge requests!434Homologa,!429Dev -> Hom,!427Course aggregate fix
...@@ -79,11 +79,12 @@ rqf.addField({ ...@@ -79,11 +79,12 @@ rqf.addField({
} }
}); });
uniLocalOfferAggregateApp.get('/', (req, res, next) => { uniLocalOfferAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.sql.from('curso_superior_agregado') req.sql.from('curso_superior_agregado')
.field('DISTINCT curso_superior_agregado.cod_ies', 'cod') .field('DISTINCT curso_superior_agregado.cod_ies', 'cod')
.field('ies_ens_superior.nome_ies', 'nome') .field('ies_ens_superior.nome_ies', 'nome')
.join('ies_ens_superior', null, 'curso_superior_agregado.cod_ies = ies_ens_superior.cod_ies and curso_superior_agregado.ano_censo = ies_ens_superior.ano_censo') .join('ies_ens_superior', null, 'curso_superior_agregado.cod_ies = ies_ens_superior.cod_ies and curso_superior_agregado.ano_censo = ies_ens_superior.ano_censo')
.order('curso_superior_agregado.cod_ies')
next(); next();
}, query, response('uni_offer_aggregate')); }, query, response('uni_offer_aggregate'));
......
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