Hey @manoelpereiraeng
You can certainly pass conditions with Jestor.loadData() searches, the way you do it however is just a little bit different.
When you do something like this:
$conditions = array("status" => "Active"); $search = Jestor.loadData("plans",["where" => $conditions]);
The $conditions array assumes you’re shooting for ==, as you haven’t specified anything else. You can, however, change this by passing the operator right next to the field name. Something like this:
$conditions = array("status !=" => "Active"); $search = Jestor.loadData("plans",["where" => $conditions]);
It works for other standard operators as well (for example “less than” ( < ), which can be really useful for dates).
Hope that helps!
Opa @manoelpereiraeng
Você pode sim passar condições diferentes numa pesquisa Jestor.loadData(), mas a maneira que deve ser realizada é um pouco diferente.
Quando você faz algo assim:
$conditions = array("status" => "Active"); $search = Jestor.loadData("plans",["where" => $conditions]);
O array $conditions assume que você quer usar o operador ==, já que nada diferente foi especificado. Você pode, no entanto, mudar isso ao passar um operador logo em seguida ao nome do campo. Algo assim:
$conditions = array("status !=" => "Active"); $search = Jestor.loadData("plans",["where" => $conditions]);
Funciona para outros operadores padrão também (por exemplo, “menor que” ( < ), o que pode ser bem útil pra datas).
Espero que isso ajude!