From a2b90d9fb9882204919ad857c055b073fa8cedd9 Mon Sep 17 00:00:00 2001 From: sirin Date: Tue, 8 Oct 2024 23:43:50 +0700 Subject: [PATCH] feat: query function for dropdown --- src/lib/data/dropdownQuery.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/lib/data/dropdownQuery.ts diff --git a/src/lib/data/dropdownQuery.ts b/src/lib/data/dropdownQuery.ts new file mode 100644 index 0000000..f6ac3dc --- /dev/null +++ b/src/lib/data/dropdownQuery.ts @@ -0,0 +1,16 @@ +import { SupabaseClient } from "@supabase/supabase-js"; + + +function getAllTagsQuery(client: SupabaseClient) { + return client.from("Tag").select("id, value"); +} + +function getALlFundedStatusQuery(client: SupabaseClient) { + return client.from("FundedStatus").select("id, value, description"); +} + +function getAllBusinessTypeQuery(client: SupabaseClient) { + return client.from("BusinessType").select("id, value, description"); +} + +export { getAllTagsQuery, getALlFundedStatusQuery, getAllBusinessTypeQuery }; \ No newline at end of file