fix(ad pause): add pause in sql query

This commit is contained in:
Fanch 2024-05-17 10:45:17 +02:00 committed by Fanch
parent b52644ee3b
commit 25ba855cca
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,7 @@ export class PassengerOrientedSelector extends Selector {
private _createWhere = (role: Role): string =>
[
this._wherePause(), // TODO where clause should be ordered for db index optimisation ...
this._whereRole(role),
this._whereStrict(),
this._whereDate(role),
@ -157,6 +158,8 @@ export class PassengerOrientedSelector extends Selector {
private _whereRole = (role: Role): string =>
role == Role.PASSENGER ? 'driver=True' : 'passenger=True';
private _wherePause = (): string => 'pause=False'; // TODO: find if we want to add this as parameter/config or not
private _whereStrict = (): string =>
this.query.strict
? this.query.frequency == Frequency.PUNCTUAL