mirror of
https://github.com/Nikhil-Doye/workflow-builder.git
synced 2026-07-22 02:01:56 +02:00
Add database operation configuration to fieldConfigs
- Introduced a new 'operation' entry in fieldConfigs to define various database operations (Query, Insert, Update, Delete, Aggregate, Transaction). - Enhanced user guidance with descriptions, help text, and examples for each operation type. - Updated field mappings to consolidate database operation parameters under a single entry for improved clarity and maintainability.
This commit is contained in:
@@ -220,6 +220,24 @@ export const fieldConfigs: Record<string, FieldConfig> = {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
operation: {
|
||||
technicalName: "operation",
|
||||
userFriendlyName: "Database operation",
|
||||
description: "Choose what type of database operation to perform",
|
||||
helpText:
|
||||
"Select the type of database operation you want to perform. Each operation has different configuration options.",
|
||||
examples: [
|
||||
"Query - Retrieve data from database",
|
||||
"Insert - Add new records",
|
||||
"Update - Modify existing records",
|
||||
"Delete - Remove records",
|
||||
"Aggregate - Count, sum, average data",
|
||||
"Transaction - Multiple operations together",
|
||||
],
|
||||
validation: {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
// Output Fields
|
||||
format: {
|
||||
@@ -353,10 +371,7 @@ export const getFieldsForNodeType = (nodeType: string): string[] => {
|
||||
similaritySearch: ["vectorStore", "topK", "threshold", "label"],
|
||||
structuredOutput: ["schema", "model", "label"],
|
||||
dataOutput: ["format", "filename", "label"],
|
||||
databaseQuery: ["connectionId", "query", "table", "label"],
|
||||
databaseInsert: ["connectionId", "table", "label"],
|
||||
databaseUpdate: ["connectionId", "table", "label"],
|
||||
databaseDelete: ["connectionId", "table", "label"],
|
||||
database: ["connectionId", "operation", "label"],
|
||||
};
|
||||
|
||||
return fieldMappings[nodeType] || [];
|
||||
|
||||
Reference in New Issue
Block a user