mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
added a fallback isnulll
This commit is contained in:
@@ -29,7 +29,7 @@ class XList extends Action
|
||||
|
||||
protected function getDatabaseTypeQueryFilters(): array
|
||||
{
|
||||
return [$this->getDatabaseType()];
|
||||
return [Query::equal('type', [$this->getDatabaseType()])];
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
@@ -96,10 +96,8 @@ class XList extends Action
|
||||
$cursor->setValue($cursorDocument);
|
||||
}
|
||||
|
||||
$queries[] = Query::equal('type', $this->getDatabaseTypeQueryFilters());
|
||||
|
||||
try {
|
||||
$databases = $dbForProject->find('databases', $queries);
|
||||
$databases = $dbForProject->find('databases', $this->getDatabaseTypeQueryFilters());
|
||||
$total = $includeTotal ? $dbForProject->count('databases', $queries, APP_LIMIT_COUNT) : 0;
|
||||
} catch (OrderException $e) {
|
||||
throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null.");
|
||||
|
||||
@@ -9,6 +9,7 @@ use Appwrite\SDK\Method;
|
||||
use Appwrite\SDK\Response as SDKResponse;
|
||||
use Appwrite\Utopia\Database\Validator\Queries\Databases;
|
||||
use Appwrite\Utopia\Response as UtopiaResponse;
|
||||
use Utopia\Database\Query;
|
||||
use Utopia\Http\Adapter\Swoole\Response as SwooleResponse;
|
||||
use Utopia\Validator\Boolean;
|
||||
use Utopia\Validator\Text;
|
||||
@@ -21,9 +22,14 @@ class XList extends DatabaseXList
|
||||
}
|
||||
|
||||
protected function getDatabaseTypeQueryFilters(): array
|
||||
{
|
||||
return [DATABASE_TYPE_TABLESDB, DATABASE_TYPE_LEGACY];
|
||||
}
|
||||
{
|
||||
return [
|
||||
Query::or([
|
||||
Query::equal('type', [DATABASE_TYPE_TABLESDB, DATABASE_TYPE_LEGACY]),
|
||||
Query::isNull('type'),
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user