Browse Source

refactor: revert group by change

pull/7304/head
Pranav C 11 months ago
parent
commit
055e6a84a1
  1. 8
      packages/nocodb/src/db/conditionV2.ts

8
packages/nocodb/src/db/conditionV2.ts

@ -684,9 +684,11 @@ const parseConditionV2 = async (
].includes(column.uidt) ].includes(column.uidt)
) { ) {
if (qb.client.config.client === 'pg') { if (qb.client.config.client === 'pg') {
if ((filter as any).groupby) // todo: enbale back if group by date required custom implementation
qb = qb.where(knex.raw('??::timestamp = ?', [field, val])); // if ((filter as any).groupby)
else qb = qb.where(knex.raw('??::date = ?', [field, val])); // qb = qb.where(knex.raw('??::timestamp = ?', [field, val]));
// else
qb = qb.where(knex.raw('??::date = ?', [field, val]));
} else { } else {
qb = qb.where(knex.raw('DATE(??) = DATE(?)', [field, val])); qb = qb.where(knex.raw('DATE(??) = DATE(?)', [field, val]));
} }

Loading…
Cancel
Save