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

This commit is contained in:
Damodar Lohani
2021-08-15 10:53:53 +05:45
21 changed files with 742 additions and 127 deletions
+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);