mirror of
https://github.com/Nikhil-Doye/workflow-builder.git
synced 2026-07-22 02:01:56 +02:00
Refactor database node configuration to unify database operations
- Consolidated individual database operation types (query, insert, update, delete) into a single "database" entry for improved clarity and maintainability. - Updated connection suggestions and common patterns to reflect the new unified structure, enhancing the overall configuration of database nodes.
This commit is contained in:
@@ -34,7 +34,7 @@ const NODE_COMPATIBILITY: Record<
|
||||
"llmTask",
|
||||
"embeddingGenerator",
|
||||
"structuredOutput",
|
||||
"databaseQuery",
|
||||
"database",
|
||||
],
|
||||
shouldConnectTo: ["webScraping", "llmTask", "embeddingGenerator"],
|
||||
commonPatterns: ["Start workflows", "Provide data to processing nodes"],
|
||||
@@ -98,39 +98,22 @@ const NODE_COMPATIBILITY: Record<
|
||||
commonPatterns: ["End of workflow"],
|
||||
description: "Data output nodes are typically the end of workflows",
|
||||
},
|
||||
// Database nodes
|
||||
databaseQuery: {
|
||||
// Database node
|
||||
database: {
|
||||
canConnectTo: [
|
||||
"llmTask",
|
||||
"structuredOutput",
|
||||
"dataOutput",
|
||||
"embeddingGenerator",
|
||||
],
|
||||
shouldConnectTo: ["llmTask", "structuredOutput"],
|
||||
shouldConnectTo: ["llmTask", "structuredOutput", "dataOutput"],
|
||||
commonPatterns: [
|
||||
"Query → Process",
|
||||
"Query → Structure",
|
||||
"Query → Generate embeddings",
|
||||
"Insert/Update/Delete → Confirm output",
|
||||
],
|
||||
description: "Database queries typically feed into processing nodes",
|
||||
},
|
||||
databaseInsert: {
|
||||
canConnectTo: ["dataOutput"],
|
||||
shouldConnectTo: ["dataOutput"],
|
||||
commonPatterns: ["Insert → Confirm output"],
|
||||
description: "Database inserts typically end with confirmation output",
|
||||
},
|
||||
databaseUpdate: {
|
||||
canConnectTo: ["dataOutput"],
|
||||
shouldConnectTo: ["dataOutput"],
|
||||
commonPatterns: ["Update → Confirm output"],
|
||||
description: "Database updates typically end with confirmation output",
|
||||
},
|
||||
databaseDelete: {
|
||||
canConnectTo: ["dataOutput"],
|
||||
shouldConnectTo: ["dataOutput"],
|
||||
commonPatterns: ["Delete → Confirm output"],
|
||||
description: "Database deletes typically end with confirmation output",
|
||||
description: "Database operations can feed into processing nodes or output confirmation",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user