Laying out a new way of doing filters so that they appear on the sidebar
This commit is contained in:
25
web/docs/common/filters/match.mdx
Normal file
25
web/docs/common/filters/match.mdx
Normal 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' }`
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user