Files
appwrite/tests/e2e/Scopes/ApiTablesDB.php
ArnabChatterjee20k 905763e755 added tests
2026-02-25 16:08:40 +05:30

86 lines
1.5 KiB
PHP

<?php
namespace Tests\E2E\Scopes;
/**
* API configuration trait for TablesDB database API.
* Uses: /tablesdb, tables, columns, rows
*/
trait ApiTablesDB
{
protected function getApiBasePath(): string
{
return '/tablesdb';
}
protected function getDatabaseType(): string
{
return 'tablesdb';
}
protected function getContainerResource(): string
{
return 'tables';
}
protected function getContainerIdParam(): string
{
return 'tableId';
}
protected function getSchemaResource(): string
{
return 'columns';
}
protected function getSchemaParam(): string
{
return 'column';
}
protected function getRecordResource(): string
{
return 'rows';
}
protected function getRecordIdParam(): string
{
return 'rowId';
}
protected function getSecurityParam(): string
{
return 'rowSecurity';
}
protected function getRelatedIdParam(): string
{
return 'relatedTableId';
}
protected function getRelatedResourceKey(): string
{
return 'relatedTable';
}
protected function getContainerIdResponseKey(): string
{
return '$tableId';
}
protected function getOppositeContainerIdResponseKey(): string
{
return '$collectionId';
}
protected function getIndexAttributesParam(): string
{
return 'columns';
}
protected function getSecurityResponseKey(): string
{
return 'rowSecurity';
}
}