From 2103ce17a5773fec7c075583f1e52838f6bd02c5 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Mon, 8 Aug 2022 12:12:56 +0100 Subject: [PATCH] filtering datasources for execute query actions --- .../ButtonActionEditor/actions/ExecuteQuery.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte index 462ee71cbe..042a55d761 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte @@ -3,6 +3,7 @@ import { datasources, integrations, queries } from "stores/backend" import BindingBuilder from "components/integration/QueryBindingBuilder.svelte" import IntegrationQueryEditor from "components/integration/index.svelte" + import { IntegrationTypes } from "constants/backend" export let parameters export let bindings = [] @@ -11,6 +12,12 @@ $: datasource = $datasources.list.find( ds => ds._id === parameters.datasourceId ) + // Executequery action just works on PostgreSQL and MongoDB datasources + $: executeQueryDatasources = $datasources.list.filter( + x => + x.source === IntegrationTypes.POSTGRES || + x.source === IntegrationTypes.MONGODB + ) function fetchQueryDefinition(query) { const source = $datasources.list.find( @@ -24,7 +31,7 @@