Skip to content

Commit

Permalink
search meta.* json path without $.
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed Feb 24, 2024
1 parent 3ef48a1 commit 5e842ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion glued/Controllers/ServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,11 @@ public function objects_r1(Request $request, Response $response, array $args = [

$qp = $request->getQueryParams();
foreach ($qp as $k=>$v) {
$kp = explode('.', str_replace('_', '.', $k), 2);
if ($kp[0] != 'meta') { continue; }
$path = $kp[1] ?? '';
$wm .= "AND CAST(JSON_EXTRACT(om.data, ?) as CHAR) = ?";
$pa[] = str_replace('_', '.', $k);
$pa[] = "$.{$path}";
$pa[] = $v;
}

Expand Down

0 comments on commit 5e842ae

Please sign in to comment.