Skip to content
Snippets Groups Projects
Commit be0be3d5 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Add generic tables

parent ed6f30ab
No related branches found
No related tags found
No related merge requests found
Pipeline #16859 failed
......@@ -104,7 +104,7 @@ rqf.addField({
where: false
}).addValue({
name: 'adm_dependency',
table: 'docente',
table: '@',
tableField: 'dependencia_adm_id',
resultField: 'adm_dependency_id',
where: {
......@@ -114,7 +114,7 @@ rqf.addField({
}
}).addValue({
name: 'adm_dependency_detailed',
table: 'docente',
table: '@',
tableField: 'dependencia_adm_priv',
resultField: 'adm_dependency_detailed_id',
where: {
......@@ -135,7 +135,7 @@ rqf.addField({
join: {
primary: 'id',
foreign: 'escola_regiao_id',
foreignTable: 'docente'
foreignTable: '@'
}
}).addValue({
name: 'state',
......@@ -150,7 +150,7 @@ rqf.addField({
join: {
primary: 'id',
foreign: 'escola_estado_id',
foreignTable: 'docente'
foreignTable: '@'
}
}).addValueToField({
name: 'city',
......@@ -165,7 +165,7 @@ rqf.addField({
join: {
primary: 'id',
foreign: 'escola_municipio_id',
foreignTable: 'docente'
foreignTable: '@'
}
}, 'dims').addValueToField({
name: 'city',
......@@ -180,7 +180,7 @@ rqf.addField({
join: {
primary: 'id',
foreign: 'escola_municipio_id',
foreignTable: 'docente'
foreignTable: '@'
}
}, 'filter').addValueToField({
name: 'school',
......@@ -329,7 +329,7 @@ employeesApp.get('/', rqf.parse(), (req, res, next) => {
.join('turma', null, 'docente.turma_id=turma.id AND docente.ano_censo=turma.ano_censo')
.group('docente.ano_censo')
.order('docente.ano_censo')
.where('(docente.tipo_docente <= 6) AND (turma.tipo_turma_id <= 3)');
.where('(docente.tipo_docente <= 6) AND (turma.tipo_turma_id <= 3) AND (docente.dependencia_adm_id > 1)');
next();
}, rqf.build(), query, id2str.transform(), (req, res, next) => {
......
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