Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
67c583a
added regex query support for the mongodb(schema + schemaless)
ArnabChatterjee20k Dec 31, 2025
dbb3c79
added support for regex in mysql/mariadb
ArnabChatterjee20k Dec 31, 2025
2995d34
add regex support methods for database adapters
ArnabChatterjee20k Dec 31, 2025
4c6dbbb
add support for trigram indexes in Postgres adapter and validation
ArnabChatterjee20k Dec 31, 2025
2e13e92
added cleanup of collection for the testFindRegex
ArnabChatterjee20k Dec 31, 2025
cc90ed1
changed the collection name from movies to moviesRegex to remove clas…
ArnabChatterjee20k Dec 31, 2025
e4b7c45
added trigram index in the index vaidator in the databases
ArnabChatterjee20k Dec 31, 2025
e18512d
updated the size of the attr in testTrigramIndexValidation
ArnabChatterjee20k Dec 31, 2025
d50f1f2
fixed typo
ArnabChatterjee20k Dec 31, 2025
e0e2b9d
fixed mariadb support methods
ArnabChatterjee20k Dec 31, 2025
94c7012
* added object attribute support in mongodb
ArnabChatterjee20k Jan 5, 2026
3b5360b
added elemMatch
ArnabChatterjee20k Jan 5, 2026
7a26698
refactor: improve elemMatch handling and clean up code style
ArnabChatterjee20k Jan 6, 2026
c2e1670
refactor: streamline elemMatch validation and update schemaless tests
ArnabChatterjee20k Jan 6, 2026
e4f00f3
refactor: update ObjectAttributeTests to check for attribute support …
ArnabChatterjee20k Jan 6, 2026
b397af6
feat: add support for object (JSON) indexes across database adapters
ArnabChatterjee20k Jan 7, 2026
3f85b56
updated tests for elemMatch
ArnabChatterjee20k Jan 7, 2026
c579ec5
refactor: enhance object query validation and add corresponding tests
ArnabChatterjee20k Jan 7, 2026
3c04a4b
linting
ArnabChatterjee20k Jan 7, 2026
57507d6
Add support for regex and enhance index validation in database adapter
ArnabChatterjee20k Jan 7, 2026
ccb69f0
Merge remote-tracking branch 'upstream/3.x' into query-regex
ArnabChatterjee20k Jan 7, 2026
1214e56
refactor: improve validation logic for object query values to handle …
ArnabChatterjee20k Jan 7, 2026
9534938
Merge remote-tracking branch 'upstream/3.x' into mongo-object
ArnabChatterjee20k Jan 7, 2026
8bd5e0e
Refactor index validation and enhance support checks in Database and …
ArnabChatterjee20k Jan 7, 2026
7da7023
Enhance index validation tests by adding support checks for spatial a…
ArnabChatterjee20k Jan 7, 2026
d511a60
refactor: enhance validation for object attribute query values to dis…
ArnabChatterjee20k Jan 7, 2026
82f2bac
removed redundant size from the attribute test
ArnabChatterjee20k Jan 8, 2026
6a98a5d
Merge pull request #775 from utopia-php/query-regex
abnegate Jan 8, 2026
473f3c4
Update src/Database/Adapter/Mongo.php
ArnabChatterjee20k Jan 8, 2026
6d6b975
Merge remote-tracking branch 'upstream/3.x' into mongo-object
ArnabChatterjee20k Jan 8, 2026
d52f10e
refactor: rename getSupportForIndexObject to getSupportForObjectIndex…
ArnabChatterjee20k Jan 8, 2026
93ea96f
linting
ArnabChatterjee20k Jan 8, 2026
6cfac6f
linting
ArnabChatterjee20k Jan 8, 2026
838068b
updated index validator
ArnabChatterjee20k Jan 8, 2026
2aadc20
updated database index validator
ArnabChatterjee20k Jan 8, 2026
1556e6e
test: add schemaless nested object attribute queries
ArnabChatterjee20k Jan 9, 2026
887775d
fix: adjust condition for schemaless object attribute support in tests
ArnabChatterjee20k Jan 9, 2026
6de1a2d
test: enhance schemaless nested object attribute queries with additio…
ArnabChatterjee20k Jan 9, 2026
85be9a8
updated tests
ArnabChatterjee20k Jan 9, 2026
43505a1
Merge pull request #777 from utopia-php/mongo-object
abnegate Jan 9, 2026
655c072
Handle bits/sign
abnegate Jan 14, 2026
77b234a
Update lock
abnegate Jan 14, 2026
b06347f
Fix assertions
abnegate Jan 14, 2026
093370b
Fix attribute tests
abnegate Jan 14, 2026
e491ed2
Merge pull request #781 from utopia-php/fix-validator-bits
abnegate Jan 14, 2026
d220e17
Merge remote-tracking branch 'origin/3.x' into chore-sync-3.x
abnegate Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/tasks/operators.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Utopia\Database\Operator;
use Utopia\Database\PDO;
use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\Validator\Integer;
use Utopia\Validator\Text;

Expand Down Expand Up @@ -148,7 +147,7 @@ function setupTestEnvironment(Database $database, string $name, int $seed): void
}
$database->create();

Authorization::setRole(Role::any()->toString());
$authorization->addRole(Role::any()->toString());

// Create test collection
$database->createCollection('operators_test', permissions: [
Expand Down
322 changes: 184 additions & 138 deletions composer.lock

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions src/Database/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,13 @@ abstract public function getSupportForSpatialAttributes(): bool;
*/
abstract public function getSupportForObject(): bool;

/**
* Are object (JSON) indexes supported?
*
* @return bool
*/
abstract public function getSupportForObjectIndexes(): bool;

/**
* Does the adapter support null values in spatial indexes?
*
Expand Down Expand Up @@ -1471,4 +1478,38 @@ public function enableAlterLocks(bool $enable): self
* @return bool
*/
abstract public function getSupportNonUtfCharacters(): bool;

/**
* Does the adapter support trigram index?
*
* @return bool
*/
abstract public function getSupportForTrigramIndex(): bool;

/**
* Is PCRE regex supported?
* PCRE (Perl Compatible Regular Expressions) supports \b for word boundaries
*
* @return bool
*/
abstract public function getSupportForPCRERegex(): bool;

/**
* Is POSIX regex supported?
* POSIX regex uses \y for word boundaries instead of \b
*
* @return bool
*/
abstract public function getSupportForPOSIXRegex(): bool;

/**
* Is regex supported at all?
* Returns true if either PCRE or POSIX regex is supported
*
* @return bool
*/
public function getSupportForRegex(): bool
{
return $this->getSupportForPCRERegex() || $this->getSupportForPOSIXRegex();
}
}
25 changes: 25 additions & 0 deletions src/Database/Adapter/MariaDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,16 @@ public function getSupportForObject(): bool
return false;
}

/**
* Are object (JSON) indexes supported?
*
* @return bool
*/
public function getSupportForObjectIndexes(): bool
{
return false;
}

/**
* Get Support for Null Values in Spatial Indexes
*
Expand Down Expand Up @@ -2240,4 +2250,19 @@ public function getSupportNonUtfCharacters(): bool
{
return true;
}

public function getSupportForTrigramIndex(): bool
{
return false;
}

public function getSupportForPCRERegex(): bool
{
return true;
}

public function getSupportForPOSIXRegex(): bool
{
return false;
}
}
Loading