From 34a1d5e36b736854fadebb08f15c82f3c9bc62d3 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 13 Oct 2022 13:05:45 +0100 Subject: [PATCH] Rename flow to pipeline --- packages/builder/src/components/integration/index.svelte | 6 +++--- packages/server/src/integrations/mongodb.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/components/integration/index.svelte b/packages/builder/src/components/integration/index.svelte index 114cec98e2..2faa3c0ce5 100644 --- a/packages/builder/src/components/integration/index.svelte +++ b/packages/builder/src/components/integration/index.svelte @@ -16,7 +16,6 @@ SQL: "sql", JSON: "json", FIELDS: "fields", - FLOW: "flow", } export let query @@ -65,7 +64,8 @@ } $: shouldDisplayJsonBox = - schema.type === QueryTypes.JSON && query.fields.extra?.actionType !== "flow" + schema.type === QueryTypes.JSON && + query.fields.extra?.actionType !== "pipeline" {#if schema} @@ -98,7 +98,7 @@ {/if} - {:else if query.fields.extra?.actionType === "flow"} + {:else if query.fields.extra?.actionType === "pipeline"}
{#if (query.fields.steps?.length ?? 0) === 0}
diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index f602b78093..d7709a08c7 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -290,7 +290,7 @@ const SCHEMA: Integration = { required: true, }, actionType: { - displayName: "Action Type", + displayName: "Query Type", type: DatasourceFieldType.LIST, required: true, data: { @@ -298,7 +298,7 @@ const SCHEMA: Integration = { create: ["insertOne", "insertMany"], update: ["updateOne", "updateMany"], delete: ["deleteOne", "deleteMany"], - aggregate: ["json", "flow"], + aggregate: ["json", "pipeline"], }, }, }, @@ -559,7 +559,7 @@ class MongoIntegration implements IntegrationBase { const db = this.client.db(this.config.db) const collection = db.collection(query.extra.collection) let response = [] - if (query.extra?.actionType === "flow") { + if (query.extra?.actionType === "pipeline") { for await (const doc of collection.aggregate( query.steps.map(({ key, value }) => { let temp: any = {}