feat(workflow): add database CRUD workflow nodes#441
Open
xpert-ai-dev[bot] wants to merge 1 commit into
Open
Conversation
- Add IWFNDBUpdate, IWFNDBDelete, IWFNDBQuery interfaces with where conditions - Add TDBWhereCondition and TDBOrderBy types for database operations - Implement queryRows, updateRows, deleteRows methods in XpertTableService - Add WorkflowDBUpdateNodeStrategy, WorkflowDBDeleteNodeStrategy, WorkflowDBQueryNodeStrategy - Create frontend panel component for DB Query node - Register all DB CRUD strategies in plugins index Closes #218
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements database CRUD workflow nodes for the Xpert workflow system, addressing GitHub issue #218.
Changes
1. Updated Interfaces (
packages/contracts/src/ai/xpert-table.model.ts)TDBWhereConditiontype for WHERE clause conditionsTDBOrderBytype for ORDER BY clausesIWFNDBUpdatewithwhere?: TDBWhereCondition[]IWFNDBDeletewithwhere?: TDBWhereCondition[]IWFNDBQuerywithcolumns,where,orderBy,limitproperties2. Added Service Methods (
packages/server-ai/src/xpert-table/xpert-table.service.ts)queryRows()- Query rows with columns, where, orderBy, limit optionsupdateRows()- Update rows with SET values and WHERE conditionsdeleteRows()- Delete rows with WHERE conditions3. Backend Strategies
WorkflowDBUpdateNodeStrategy- handles database update operationsWorkflowDBDeleteNodeStrategy- handles database delete operationsWorkflowDBQueryNodeStrategy- handles database query operations4. Frontend Components
db-query.component.ts,.html,.scss)Workflow Node Types Available
DB_INSERTDB_UPDATEDB_DELETEDB_QUERYDB_SQLTesting
WorkflowDBInsertNodeStrategyandWorkflowDBSQLNodeStrategyDBTableDataActionenum from the plugin SDKCloses #218