Skip to content

Commit 363cc8d

Browse files
committed
Simplify encode
1 parent ed69345 commit 363cc8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Adapter/Postgres.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ protected function getVectorDistanceOrder(Query $query, array &$binds, string $a
17151715

17161716
$values = $query->getValues();
17171717
$vectorArray = $values[0] ?? [];
1718-
$vector = '[' . implode(',', \array_map(\floatval(...), $vectorArray)) . ']';
1718+
$vector = \json_encode(\array_map(\floatval(...), $vectorArray));
17191719
$binds[":vector_{$placeholder}"] = $vector;
17201720

17211721
return match ($query->getMethod()) {

0 commit comments

Comments
 (0)