feat: enhance query handling with modules and plugins
- Added ManyToMany relationship for plugins in Query entity. - Updated QueryExecuterController to accept structured query data. - Enhanced QueryExecuterService to support plugin initialization and execution. - Implemented QueryHandlerService methods for creating and updating queries, modules, and plugins. - Introduced new endpoints for creating and adding modules and plugins to queries. - Created Plugin base class and DatabasePlugin implementation for database interactions. - Updated VM class to integrate plugin functionality during script execution. - Added test cases for project, query, module, and plugin operations.
This commit is contained in:
@ -2,10 +2,12 @@ import { Module } from "@nestjs/common";
|
||||
import { TypeOrmModule } from "@nestjs/typeorm";
|
||||
import { Project } from "./entities/project.entity";
|
||||
import { ProjectService } from "./project.service";
|
||||
import { ProjectController } from "./project.controller";
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Project])],
|
||||
controllers: [],
|
||||
controllers: [ProjectController],
|
||||
providers: [ProjectService],
|
||||
exports: [ProjectService],
|
||||
})
|
||||
export class ProjectModule {}
|
||||
|
||||
@ -14,4 +14,8 @@ export class ProjectService {
|
||||
const project = this.projectRepository.create({ name });
|
||||
return this.projectRepository.save(project);
|
||||
}
|
||||
|
||||
findByToken(token: string) {
|
||||
return this.projectRepository.findOne({ where: { token } });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user