added filters

This commit is contained in:
ArnabChatterjee20k
2025-08-22 12:47:00 +05:30
parent 95f67b274d
commit 9fa42e8084
3 changed files with 20 additions and 0 deletions
+5
View File
@@ -92,6 +92,11 @@ Database::addFilter(
$filters = $attribute->getAttribute('filters', []);
$attribute->setAttribute('encrypt', in_array('encrypt', $filters));
break;
case Database::VAR_POINT:
case Database::VAR_LINESTRING:
case Database::VAR_POLYGON:
break;
}
}
+12
View File
@@ -41,3 +41,15 @@ Structure::addFormat(APP_DATABASE_ATTRIBUTE_FLOAT_RANGE, function ($attribute) {
$max = $attribute['formatOptions']['max'] ?? INF;
return new Range($min, $max, Range::TYPE_FLOAT);
}, Database::VAR_FLOAT);
Structure::addFormat(APP_DATABASE_ATTRIBUTE_POINT, function () {
return new \Utopia\Validator\Text(0, 0);
}, Database::VAR_POINT);
Structure::addFormat(APP_DATABASE_ATTRIBUTE_LINE, function () {
return new \Utopia\Validator\Text(0, 0);
}, Database::VAR_LINESTRING);
Structure::addFormat(APP_DATABASE_ATTRIBUTE_POLYGON, function () {
return new \Utopia\Validator\Text(0, 0);
}, Database::VAR_POLYGON);