@@ -176,10 +176,68 @@ querystring arguments:
176176
177177.. _table_arguments :
178178
179- Special table arguments
180- -----------------------
179+ Table arguments
180+ ---------------
181+
182+ The Datasette table view takes a number of special querystring arguments.
183+
184+ Column filter arguments
185+ ~~~~~~~~~~~~~~~~~~~~~~~
186+
187+ You can filter the data returned by the table based on column values using a querystring argument.
188+
189+ ``?column__exact=value `` or ``?_column=value ``
190+ Returns rows where the specified column exactly matches the value.
191+
192+ ``?column__not=value ``
193+ Returns rows where the column does not match the value.
194+
195+ ``?column__contains=value ``
196+ Rows where the string column contains the specified value (``column like "%value%" `` in SQL).
197+
198+ ``?column__endswith=value ``
199+ Rows where the string column ends with the specified value (``column like "%value" `` in SQL).
200+
201+ ``?column__startswith=value ``
202+ Rows where the string column starts with the specified value (``column like "value%" `` in SQL).
203+
204+ ``?column__gt=value ``
205+ Rows which are greater than the specified value.
206+
207+ ``?column__gte=value ``
208+ Rows which are greater than or equal to the specified value.
181209
182- The Datasette table view takes a number of special querystring arguments:
210+ ``?column__lt=value ``
211+ Rows which are less than the specified value.
212+
213+ ``?column__lte=value ``
214+ Rows which are less than or equal to the specified value.
215+
216+ ``?column__like=value ``
217+ Match rows with a LIKE clause, case insensitive and with ``% `` as the wildcard character.
218+
219+ ``?column__glob=value ``
220+ Similar to LIKE but uses Unix wildcard syntax and is case sensitive.
221+
222+ ``?column__arraycontains=value ``
223+ Works against columns that contain JSON arrays - matches if any of the values in that array match.
224+
225+ This is only available if the ``json1 `` SQLite extension is enabled.
226+
227+ ``?column__isnull=1 ``
228+ Matches rows where the column is null.
229+
230+ ``?column__notnull=1 ``
231+ Matches rows where the column is not null.
232+
233+ ``?column__isblank=1 ``
234+ Matches rows where the column is blank, meaning null or the empty string.
235+
236+ ``?column__notblank=1 ``
237+ Matches rows where the column is not blank.
238+
239+ Special table arguments
240+ ~~~~~~~~~~~~~~~~~~~~~~~
183241
184242``?_labels=on/off ``
185243 Expand foreign key references for every possible column. See below.
0 commit comments