Enhancement
Allow simple queries in Topincs::all
Issue description
Currently topics are found by iterating over instance of a topic type and making comparisons. It would be better if the search would be performed closer to the database. In a first step it should be possible to query instances with a certain computation result.
Developer comments
Given the [8632, recent improvements] with holding the data of a topic in memory, this might be superfluous.
It could look like this:
[%Tobject::all_orders(["customer" => $kunde,
"type" => $art,
"contact" => $kontakt,
"declared_weight_in_kg" => ["min" => $kg_min,
"max" => $kg_max],
"driver_reference" => $reference]);%]
It should be possible to do this:
[%Tobject::all_orders(["customer" => ["phonenr" => "/6135/"]);%]
Also this:
[%Tobject::all_orders(["extra-costs" => null);
Tobject::all_orders(["extra-costs" => not_null);%]
This is definitely not superfluous. Even when all data is held in memory, iteration (full scan) over all instances is slower than consulting an index.
Or this:
[%Tobject::all_kids(["age" => ["min" => 10, "max" => 12]);%]
|
Work sessions3
Start |
2019-10-15T13:21:57
|
End |
2019-10-15T15:22:05
|
Participant |
Robert Cerny
|
Start |
2020-02-15T06:44:03
|
End |
2020-02-15T08:27:36
|
Participant |
Robert Cerny
|
Start |
2020-02-16T09:42:21
|
End |
2020-02-16T10:11:09
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.