type = Service::TYPE_HTTP; $this->registerDatabaseActions(); $this->registerCollectionAndTableActions(); $this->registerColumnActions(); $this->registerIndexActions(); $this->registerRowActions(); } private function registerDatabaseActions(): void { $this->addAction(CreateDatabase::getName(), new CreateDatabase()); $this->addAction(GetDatabase::getName(), new GetDatabase()); $this->addAction(UpdateDatabase::getName(), new UpdateDatabase()); $this->addAction(DeleteDatabase::getName(), new DeleteDatabase()); $this->addAction(ListDatabases::getName(), new ListDatabases()); $this->addAction(ListDatabaseLogs::getName(), new ListDatabaseLogs()); $this->addAction(GetDatabaseUsage::getName(), new GetDatabaseUsage()); $this->addAction(ListDatabaseUsage::getName(), new ListDatabaseUsage()); } private function registerCollectionAndTableActions(): void { // Collections $this->addAction(CreateCollection::getName(), new CreateCollection()); $this->addAction(GetCollection::getName(), new GetCollection()); $this->addAction(UpdateCollection::getName(), new UpdateCollection()); $this->addAction(DeleteCollection::getName(), new DeleteCollection()); $this->addAction(ListCollections::getName(), new ListCollections()); $this->addAction(ListCollectionLogs::getName(), new ListCollectionLogs()); $this->addAction(GetCollectionUsage::getName(), new GetCollectionUsage()); // Tables $this->addAction(CreateTable::getName(), new CreateTable()); $this->addAction(GetTable::getName(), new GetTable()); $this->addAction(UpdateTable::getName(), new UpdateTable()); $this->addAction(DeleteTable::getName(), new DeleteTable()); $this->addAction(ListTables::getName(), new ListTables()); $this->addAction(ListTableLogs::getName(), new ListTableLogs()); $this->addAction(GetTableUsage::getName(), new GetTableUsage()); } private function registerColumnActions(): void { // Column top level actions $this->addAction(GetColumn::getName(), new GetColumn()); $this->addAction(DeleteColumn::getName(), new DeleteColumn()); $this->addAction(ListColumns::getName(), new ListColumns()); // Column: Boolean $this->addAction(CreateBoolean::getName(), new CreateBoolean()); $this->addAction(UpdateBoolean::getName(), new UpdateBoolean()); // Column: Datetime $this->addAction(CreateDatetime::getName(), new CreateDatetime()); $this->addAction(UpdateDatetime::getName(), new UpdateDatetime()); // Column: Email $this->addAction(CreateEmail::getName(), new CreateEmail()); $this->addAction(UpdateEmail::getName(), new UpdateEmail()); // Column: Enum $this->addAction(CreateEnum::getName(), new CreateEnum()); $this->addAction(UpdateEnum::getName(), new UpdateEnum()); // Column: Float $this->addAction(CreateFloat::getName(), new CreateFloat()); $this->addAction(UpdateFloat::getName(), new UpdateFloat()); // Column: Integer $this->addAction(CreateInteger::getName(), new CreateInteger()); $this->addAction(UpdateInteger::getName(), new UpdateInteger()); // Column: IP $this->addAction(CreateIP::getName(), new CreateIP()); $this->addAction(UpdateIP::getName(), new UpdateIP()); // Column: Relationship $this->addAction(CreateRelationship::getName(), new CreateRelationship()); $this->addAction(UpdateRelationship::getName(), new UpdateRelationship()); // Column: String $this->addAction(CreateString::getName(), new CreateString()); $this->addAction(UpdateString::getName(), new UpdateString()); // Column: URL $this->addAction(CreateURL::getName(), new CreateURL()); $this->addAction(UpdateURL::getName(), new UpdateURL()); } private function registerIndexActions(): void { $this->addAction(CreateIndex::getName(), new CreateIndex()); $this->addAction(GetIndex::getName(), new GetIndex()); $this->addAction(DeleteIndex::getName(), new DeleteIndex()); $this->addAction(ListIndexes::getName(), new ListIndexes()); } private function registerRowActions(): void { $this->addAction(CreateRow::getName(), new CreateRow()); $this->addAction(GetRow::getName(), new GetRow()); $this->addAction(UpdateRow::getName(), new UpdateRow()); $this->addAction(DeleteRow::getName(), new DeleteRow()); $this->addAction(ListRows::getName(), new ListRows()); $this->addAction(ListRowLogs::getName(), new ListRowLogs()); } }