You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/control-flow/backend-logic/backend-query/query-collection.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,20 @@
1
1
---
2
2
slug: /resources/backend-query/query-collection
3
-
title: Query Collection
3
+
title: Query Collection / Table
4
4
description: Learn how to query a collection in your FlutterFlow app.
5
5
tags: [Query Collection, Backend Query, Backend Logic, Control Flow, FlutterFlow]
6
6
sidebar_position: 2
7
7
keywords: [Query Collection, Backend Query, Backend Logic, Control Flow, FlutterFlow]
8
8
---
9
-
# Query Collection
9
+
# Query Collection / Table
10
10
11
-
**Query Collection** helps you to retrieve a record (or a list of records) automatically whenever a
11
+
Quering Firestore Collection or Supabase Table helps you to retrieve a record (or a list of records) automatically whenever a
12
12
user navigates to the page containing the query. The information that is present in the record can
13
13
be used to update any widget present inside.
14
14
15
15
:::info[Prerequisites]
16
-
17
-
In order to use this backend query, you should have:
18
-
19
-
1. Completed all the steps of
20
-
[**Firebase Setup**](../../../../ff-integrations/firebase/connect-to-firebase-setup.md) for your
21
-
project.
22
-
2. At least one **Firestore Collection** defined in your project.
16
+
- To query Firestore collection, complete the [**Firebase setup**](../../../../ff-integrations/firebase/connect-to-firebase-setup.md) and have some data in a [**Collection**](../../../../ff-integrations/database/cloud-firestore/creating-collections.md).
17
+
- To query Supabase table, complete the [**Supabase**](../../../../ff-integrations/supabase/supabase-setup.md) Setup and have some data in a [**table**](../../../../ff-integrations/supabase/supabase-setup.md#create-tables-in-supabase).
23
18
:::
24
19
25
20
## Defining the Query
@@ -44,10 +39,13 @@ backend query:
44
39
button. Select a **Field Name** to be used for ordering, and choose the **Order** to be
45
40
either `Increasing` or `Decreasing`.
46
41
9. Click **Save**.
47
-
10. If the selected query returns a list of documents and if it's applied to any flexible widget (
48
-
like `Column`, `Row`, or `ListView`) then FlutterFlow will generate the children widgets
42
+
10. If the selected query returns a list of documents and if it's applied to any flexible widget (like `Column`, `Row`, or `ListView`) then FlutterFlow will generate the children widgets
49
43
dynamically. A dialog will be displayed with a similar message, click **Ok**.
50
44
45
+
:::info
46
+
The instructions to query a Supabase table are almost the same, except that for **Query Type**, you should select **Supabase Query**.
47
+
:::
48
+
51
49
<div style={{
52
50
position: 'relative',
53
51
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
0 commit comments