Merge branch 'feat-database-indexing' into feat-usage-daemon

This commit is contained in:
Damodar Lohani committed 2021-08-15 10:53:53 +05:45
commit 26c4fe7009
21 files changed
+742 -127

No files matched your search

+4 -4
View File
@@ -26,22 +26,22 @@ class DatabaseV1 extends Worker
Authorization::disable();
switch (strval($type)) {
case CREATE_TYPE_ATTRIBUTE:
case DATABASE_TYPE_CREATE_ATTRIBUTE:
$attribute = $this->args['document'] ?? '';
$attribute = new Document($attribute);
$this->createAttribute($attribute, $projectId);
break;
case DELETE_TYPE_ATTRIBUTE:
case DATABASE_TYPE_DELETE_ATTRIBUTE:
$attribute = $this->args['document'] ?? '';
$attribute = new Document($attribute);
$this->deleteAttribute($attribute, $projectId);
break;
case CREATE_TYPE_INDEX:
case DATABASE_TYPE_CREATE_INDEX:
$index = $this->args['document'] ?? '';
$index = new Document($index);
$this->createIndex($index, $projectId);
break;
case DELETE_TYPE_INDEX:
case DATABASE_TYPE_DELETE_INDEX:
$index = $this->args['document'] ?? '';
$index = new Document($index);
$this->deleteIndex($index, $projectId);