Skip to content

Commit dce1c4f

Browse files
committed
Merge branch 'feat-operators'
2 parents 0ab5a4f + aee612a commit dce1c4f

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/Database/Adapter/Postgres.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Exception;
66
use PDO;
77
use PDOException;
8+
use Swoole\Database\PDOStatementProxy;
89
use Utopia\Database\Database;
910
use Utopia\Database\Document;
1011
use Utopia\Database\Exception as DatabaseException;
@@ -2615,12 +2616,12 @@ protected function getOperatorSQL(string $column, Operator $operator, int &$bind
26152616
* Bind operator parameters to statement
26162617
* Override to handle PostgreSQL-specific JSON binding
26172618
*
2618-
* @param \PDOStatement $stmt
2619+
* @param \PDOStatement|PDOStatementProxy $stmt
26192620
* @param Operator $operator
26202621
* @param int &$bindIndex
26212622
* @return void
26222623
*/
2623-
protected function bindOperatorParams(\PDOStatement $stmt, Operator $operator, int &$bindIndex): void
2624+
protected function bindOperatorParams(\PDOStatement|PDOStatementProxy $stmt, Operator $operator, int &$bindIndex): void
26242625
{
26252626
$method = $operator->getMethod();
26262627
$values = $operator->getValues();

src/Database/Adapter/SQL.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Exception;
66
use PDOException;
7+
use Swoole\Database\PDOStatementProxy;
78
use Utopia\Database\Adapter;
89
use Utopia\Database\Change;
910
use Utopia\Database\Database;
@@ -1876,12 +1877,12 @@ abstract protected function getOperatorSQL(string $column, Operator $operator, i
18761877
/**
18771878
* Bind operator parameters to prepared statement
18781879
*
1879-
* @param \PDOStatement $stmt
1880+
* @param \PDOStatement|PDOStatementProxy $stmt
18801881
* @param \Utopia\Database\Operator $operator
18811882
* @param int &$bindIndex
18821883
* @return void
18831884
*/
1884-
protected function bindOperatorParams(\PDOStatement $stmt, Operator $operator, int &$bindIndex): void
1885+
protected function bindOperatorParams(\PDOStatement|PDOStatementProxy $stmt, Operator $operator, int &$bindIndex): void
18851886
{
18861887
$method = $operator->getMethod();
18871888
$values = $operator->getValues();

src/Database/Adapter/SQLite.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Exception;
66
use PDO;
77
use PDOException;
8+
use Swoole\Database\PDOStatementProxy;
89
use Utopia\Database\Database;
910
use Utopia\Database\Document;
1011
use Utopia\Database\Exception as DatabaseException;
@@ -1403,12 +1404,12 @@ private function getSupportForMathFunctions(): bool
14031404
* Bind operator parameters to statement
14041405
* Override to handle SQLite-specific operator bindings
14051406
*
1406-
* @param \PDOStatement $stmt
1407+
* @param \PDOStatement|PDOStatementProxy $stmt
14071408
* @param Operator $operator
14081409
* @param int &$bindIndex
14091410
* @return void
14101411
*/
1411-
protected function bindOperatorParams(\PDOStatement $stmt, Operator $operator, int &$bindIndex): void
1412+
protected function bindOperatorParams(\PDOStatement|PDOStatementProxy $stmt, Operator $operator, int &$bindIndex): void
14121413
{
14131414
$method = $operator->getMethod();
14141415

0 commit comments

Comments
 (0)