1
0
Fork 0
mirror of synced 2024-06-13 16:05:06 +12:00

Rename flow to pipeline

This commit is contained in:
Mel O'Hagan 2022-10-13 13:05:45 +01:00
parent cd5930450e
commit 34a1d5e36b
2 changed files with 6 additions and 6 deletions

View file

@ -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"
</script>
{#if schema}
@ -98,7 +98,7 @@
<Input thin outline disabled value={urlDisplay} />
</div>
{/if}
{:else if query.fields.extra?.actionType === "flow"}
{:else if query.fields.extra?.actionType === "pipeline"}
<br />
{#if (query.fields.steps?.length ?? 0) === 0}
<div class="controls">

View file

@ -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 = {}