Laying out a new way of doing filters so that they appear on the sidebar

This commit is contained in:
Paul Copplestone
2020-01-13 09:42:53 +08:00
parent 27613d3d8e
commit 1838c352e1
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import Collapsable from '../../../src/components/Collapsable'
<!-- prettier-ignore -->
```js {3}
supabase
.from(tableName)
.match(filterObject)
```
Finds rows that exactly match the specified filterObject. Equivilent of `filter('columnName', 'eq', criteria)`.
<Collapsable title="Toggle Example">
<!-- prettier-ignore -->
```js
supabase
.from('countries')
.match({ 'continent': 'Asia' })
```
</Collapsable>
#### `filterObject: object`
An object of `{ 'columnName': 'criteria' }`

View File

@@ -6,6 +6,7 @@ title: 'Reading'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import DummyData from '../common/DummyData.mdx'
import Match from '../common/filters/match.mdx'
import CommonResponses from '../common/CommonResponses.mdx'
import CommonFilters from '../common/CommonFilters.mdx'
import Collapsable from '../../src/components/Collapsable'
@@ -273,6 +274,14 @@ Returns the first row of the table as an object and **not** as an array.
----
### `filter()`
### `match()`
<Match />
## Filtering
<CommonFilters verb="get" />