diff --git a/src/Appwrite/Platform/Modules/Databases/Constants.php b/src/Appwrite/Platform/Modules/Databases/Constants.php deleted file mode 100644 index b17248bf4d..0000000000 --- a/src/Appwrite/Platform/Modules/Databases/Constants.php +++ /dev/null @@ -1,23 +0,0 @@ -context = $context; @@ -52,7 +53,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getContext() === DATABASE_COLLECTIONS_CONTEXT; + return $this->getContext() === Context::DATABASE_COLLECTIONS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 088490ad02..2ee265a18d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attribu use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response as UtopiaResponse; use Throwable; @@ -28,7 +29,7 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'column' or 'attribute') */ - private ?string $context = DATABASE_ATTRIBUTES_CONTEXT; + private ?string $context = Context::DATABASE_ATTRIBUTES; /** * Get the correct response model. @@ -42,8 +43,8 @@ abstract class Action extends UtopiaAction */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_COLUMNS_CONTEXT, DATABASE_ATTRIBUTES_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_COLUMNS_CONTEXT` or `DATABASE_ATTRIBUTES_CONTEXT`"); + if (!\in_array($context, [Context::DATABASE_COLUMNS, Context::DATABASE_ATTRIBUTES], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_COLUMNS` or `Context::DATABASE_ATTRIBUTES`"); } $this->context = $context; @@ -64,7 +65,7 @@ abstract class Action extends UtopiaAction { // columns in tables context // attributes in collections context - return $this->getContext() === DATABASE_ATTRIBUTES_CONTEXT; + return $this->getContext() === Context::DATABASE_ATTRIBUTES; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index c4e41d415f..341302f779 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -10,18 +11,13 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'row' or 'document') */ - private ?string $context = DATABASE_DOCUMENTS_CONTEXT; + private ?string $context = Context::DATABASE_DOCUMENTS; /** * Get the response model used in the SDK and HTTP responses. */ abstract protected function getResponseModel(): string; - /** - * Get the response model used in the SDK and HTTP responses for bulk action. - */ - abstract protected function getBulkResponseModel(): string; - /** * Set the context to either `row` or `document`. * @@ -29,8 +25,8 @@ abstract class Action extends UtopiaAction */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_ROWS_CONTEXT, DATABASE_DOCUMENTS_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_ROWS_CONTEXT` or `DATABASE_DOCUMENTS_CONTEXT`"); + if (!\in_array($context, [Context::DATABASE_ROWS, Context::DATABASE_DOCUMENTS], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_ROWS` or `Context::DATABASE_DOCUMENTS`"); } $this->context = $context; @@ -61,7 +57,7 @@ abstract class Action extends UtopiaAction { // rows in tables api context // documents in collections api context - return $this->getContext() === DATABASE_DOCUMENTS_CONTEXT; + return $this->getContext() === Context::DATABASE_DOCUMENTS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 07a32ce122..4a40ea6b5f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -10,7 +11,7 @@ abstract class Action extends UtopiaAction /** * The current API context (either 'columnIndex' or 'index'). */ - private ?string $context = DATABASE_INDEX_CONTEXT; + private ?string $context = Context::DATABASE_INDEX; /** * Get the response model used in the SDK and HTTP responses. @@ -20,12 +21,12 @@ abstract class Action extends UtopiaAction /** * Set the current API context. * - * @param string $context Must be either `DATABASE_INDEX_CONTEXT` or `DATABASE_COLUMN_INDEX_CONTEXT`. + * @param string $context Must be either `DATABASE_INDEX` or `DATABASE_COLUMN_INDEX`. */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_INDEX_CONTEXT, DATABASE_COLUMN_INDEX_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Must be either `DATABASE_COLUMN_INDEX_CONTEXT` or `DATABASE_INDEX_CONTEXT`."); + if (!\in_array($context, [Context::DATABASE_INDEX, Context::DATABASE_COLUMN_INDEX], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Must be either `Context::DATABASE_COLUMN_INDEX` or `Context::DATABASE_INDEX`."); } $this->context = $context; @@ -36,9 +37,9 @@ abstract class Action extends UtopiaAction */ final protected function getParentContext(): string { - return $this->getContext() === DATABASE_INDEX_CONTEXT - ? DATABASE_ATTRIBUTES_CONTEXT - : DATABASE_COLUMNS_CONTEXT; + return $this->getContext() === Context::DATABASE_INDEX + ? Context::DATABASE_ATTRIBUTES + : Context::DATABASE_COLUMNS; } /** @@ -54,7 +55,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getParentContext() === DATABASE_ATTRIBUTES_CONTEXT; + return $this->getParentContext() === Context::DATABASE_ATTRIBUTES; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index ada1d83424..e1633da062 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -29,7 +30,7 @@ class Create extends BooleanCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 5316677adc..deead5e1d7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends BooleanUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index a0731f0767..4710031c63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -31,7 +32,7 @@ class Create extends DatetimeCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 495e96f025..f30e627553 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -33,7 +34,7 @@ class Update extends DatetimeUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 68cb00e18b..d2f0c54839 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class Delete extends AttributesDelete public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index 569d641118..fc64c3b215 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends EmailCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index bb3abb10d3..c6425043b5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends EmailUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 47d06d4a53..338cec4f05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -32,7 +33,7 @@ class Create extends EnumCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 18c1db0683..6a35b955d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Update extends EnumUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 217378e274..7e1a502f2e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends FloatCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index be9e2f6b09..05983a8153 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends FloatUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index 630ac01e0f..a0d8a3ce76 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -39,7 +40,7 @@ class Get extends AttributesGet public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 4da949dd74..1bae06a360 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends IPCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index 7adda8a4d5..8174ad7860 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends IPUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 2172b5067b..2c6b7a84e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends IntegerCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 26f7e8625c..8375853e83 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends IntegerUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 76dd80cec9..6d3f26902d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -31,7 +32,7 @@ class Create extends RelationshipCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index b2229bb32d..8bed5013a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends RelationshipUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index cf12e6582d..529f4f270d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -32,7 +33,7 @@ class Create extends StringCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 968b15bbef..7450af9eff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Update extends StringUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 8c9865cde0..07295b2d93 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends URLCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index e461befe0b..990fbee742 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends URLUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 3dde78441d..41b1aee5c9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -28,7 +29,7 @@ class XList extends AttributesXList public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index fcd52d4854..95ef8bea4a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Create extends CollectionCreate public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index c24fad28ef..bb9b859a78 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -28,7 +29,7 @@ class Delete extends CollectionDelete public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index e277db6d3d..cdf7950a1c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -28,7 +29,7 @@ class Get extends CollectionGet public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index b8e22cec71..33692b7a0c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Create extends IndexCreate public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index ed8c355075..80581f7a6f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -33,7 +34,7 @@ class Delete extends IndexDelete public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index cd689316e6..d78761459a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class Get extends IndexGet public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 3d0e7d5139..b16e328f27 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class XList extends IndexXList public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 967e53539c..99fbe99a34 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -25,7 +26,7 @@ class XList extends CollectionLogXList public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 881e562c10..5eb36598b2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -39,7 +40,7 @@ class Create extends DocumentCreate public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index e40046bdf9..799f3cde05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Delete extends DocumentDelete public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 5ff02e96e8..8a8f9f3062 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class Get extends DocumentGet public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 29a92413f9..62466eac13 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -25,7 +26,7 @@ class XList extends DocumentLogXList public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 3c98d3c499..798bfddf51 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends DocumentUpdate public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index c74a87c842..1175515e5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class XList extends DocumentXList public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 70ac9d7b7c..14798f8513 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends CollectionUpdate public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index e67850e361..1baebb23f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class Get extends CollectionUsageGet public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index b2f102cc55..1086f8f80e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class XList extends CollectionXList public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)