Wykres commitów

48 Commity (2b44d6a3fcd912bc9c494c58c69e42161cf4b3df)

Autor SHA1 Wiadomość Data
Simon Willison b8cf864fa6 Fixed broken example links in _where= docs 2023-01-04 16:53:39 -08:00
Simon Willison 92b26673d8 Fix blacken-docs errors and warnings, refs #1718 2022-04-24 09:03:14 -07:00
Simon Willison 8d5779acf0 Refactored alternate_url_json mechanism, refs #1620, #1533 2022-02-02 13:32:47 -08:00
Simon Willison b72b2423c7 rel=alternate JSON for queries and database pages, closes #1620 2022-02-02 13:22:45 -08:00
Simon Willison 3ef47a0896 Link rel=alternate header for tables and rows
Also added Access-Control-Expose-Headers: Link to --cors mode.

Closes #1533

Refs https://github.com/simonw/datasette-notebook/issues/2

LL#	metadata.json.1
2022-02-01 23:49:09 -08:00
Simon Willison 992496f261 ?_nosuggest=1 parameter for table views, closes #1557 2021-12-16 11:24:54 -08:00
Simon Willison 81bf9a9f3c Updated --cors documentation, refs #1467 2021-10-14 12:19:03 -07:00
Simon Willison ff29dd55fa ?_trace=1 now depends on trace_debug setting, closes #1359 2021-06-05 13:18:37 -07:00
Simon Willison fd368d3b2c New _nocount=1 option, used to speed up CSVs - closes #1353 2021-06-01 09:12:32 -07:00
Simon Willison 8bde6c5461 Rename ?_nofacets=1 to ?_nofacet=1, refs #1353 2021-06-01 08:56:00 -07:00
Simon Willison c5ae1197a2 ?_nofacets=1 option, closes #1350 2021-05-30 22:39:14 -04:00
Simon Willison 4545120c92 Test and docs for ?_facet_size=max, refs #1337 2021-05-27 09:04:26 -07:00
Simon Willison f1c29fd6a1
?_col=/?_nocol= to show/hide columns on the table page
Closes #615

* Cog icon for hiding columns
* Show all columns cog menu item
* Do not allow hide column on primary keys
* Allow both ?_col= and ?_nocol=
* De-duplicate if ?_col= passed multiple times
* 400 error if user tries to ?_nocol= a primary key
* Documentation for ?_col= and ?_nocol=
2021-05-26 21:17:43 -07:00
Simon Willison 9789b94da4 ?_facet_size=100 parameter, closes #1332 2021-05-22 17:34:33 -07:00
Simon Willison ef2ecc1b89 Standardize on 'query string', not 'querystring', in docs
The request property is request.query_string so this is more consistent.
2021-01-11 13:33:54 -08:00
Simon Willison 4c25b035b2 arraynotcontains filter, closes #1132 2020-12-07 14:41:03 -08:00
Simon Willison e34e84901d Link: HTTP header pagination, closes #1014 2020-10-10 17:18:45 -07:00
Simon Willison 49d6d2f7b0 allow_sql block to control execute-sql upermission in metadata.json, closes #813
Also removed the --config allow_sql:0 mechanism in favour of the new allow_sql block.
2020-06-08 17:05:44 -07:00
Simon Willison b3aa5f4313 Added 'not like' table filter, refs #750 2020-05-02 12:04:54 -07:00
Simon Willison 6cb65555f4
?_searchmode=raw option (#686) 2020-02-24 21:56:03 -08:00
Simon Willison c30f07c58e Removed _group_count=col feature, closes #504 2019-11-05 21:12:55 -08:00
Simon Willison 9db22cdf18 pk__notin= filter, closes #614 2019-11-03 20:11:55 -08:00
Simon Willison 172da009d8 Added ?_through= table argument, closes #355
Also added much more interesting many-to-many fixtures - roadside attractions!
2019-05-22 22:45:12 -07:00
Simon Willison 17243fc355 Release notes for 0.28 - closes #463 2019-05-19 14:24:12 -07:00
Simon Willison 9d73e3c8bd Note that trace data format is very likely to change, refs #435 2019-04-21 10:53:28 -07:00
Simon Willison 58a862cee4 ?_trace=1 now adds SQL trace info to JSON/HTML response
Also added documentation for it. Refs #435
2019-04-21 10:41:16 -07:00
Simon Willison 583b22aa28 New ?column__date=yyyy-mm-dd filter 2019-04-15 15:54:54 -07:00
Simon Willison 1c6649b19b New colname__in=x,y,z filter, closes #433 2019-04-15 15:43:22 -07:00
Simon Willison 2c19a27d15 Documentation for filters, plus new documentation unit test
https://simonwillison.net/2018/Jul/28/documentation-unit-tests/
2019-04-15 15:41:11 -07:00
Simon Willison 9dc7a1824b
Slightly more interesting example link 2019-04-13 15:49:07 -07:00
Simon Willison f2c767c222 Fixed broken link in documentation 2019-04-12 18:57:43 -07:00
Simon Willison bc6a9b4564
?_where= parameter on table views, closes #429
From pull request #430
2019-04-12 18:37:22 -07:00
Simon Willison b5dd83981a Export option: _shape=array&_nl=on for newline-delimited JSON 2019-01-27 17:40:23 -08:00
Simon Willison 788a542d3c
Docs for IndexView, TableView, RowView, closes #299
Also removed xfail from test_view_classes_are_documented, so any future *View
classes that are added without documentation will cause the tests to fail.
2018-07-27 21:21:42 -07:00
Simon Willison 700d83d8ad
?_json_infinity=1 for handling Infinity/-Infinity - fixes #332 2018-07-23 20:07:57 -07:00
Simon Willison e04f5b0d34
Release notes for 0.23 2018-06-18 08:11:57 -07:00
Simon Willison bb4a9fbf36
Docs for CSV export, refs #266 2018-06-18 07:12:21 -07:00
Simon Willison ed631e690b
?_labels= and ?_label=COL to expand foreign keys in JSON/CSV
These new querystring arguments can be used to request expanded foreign keys
in both JSON and CSV formats.

?_labels=on turns on expansions for ALL foreign key columns

?_label=COLUMN1&_label=COLUMN2 can be used to pick specific columns to expand

e.g. `Street_Tree_List.json?_label=qSpecies&_label=qLegalStatus`

    {
        "rowid": 233,
        "TreeID": 121240,
        "qLegalStatus": {
            "value" 2,
            "label": "Private"
        }
        "qSpecies": {
            "value": 16,
            "label": "Sycamore"
        }
        "qAddress": "91 Commonwealth Ave",
        ...
    }

The labels option also works for the HTML and CSV views.

HTML defaults to `?_labels=on`, so if you pass `?_labels=off` you can disable
foreign key expansion entirely - or you can use `?_label=COLUMN` to request
just specific columns.

If you expand labels on CSV you get additional columns in the output:

`/Street_Tree_List.csv?_label=qLegalStatus`

    rowid,TreeID,qLegalStatus,qLegalStatus_label...
    1,141565,1,Permitted Site...
    2,232565,2,Undocumented...

I also refactored the existing foreign key expansion code.

Closes #233. Refs #266.
2018-06-16 15:18:57 -07:00
Simon Willison 76d11eb768
New ?_json=colname argument for returning unescaped JSON
Also extracted docs for special JSON arguments into a new section.

Closes #31
2018-05-28 11:08:39 -07:00
Simon Willison 276913b748
?_shape=arrayfirst, closes #287 2018-05-26 17:32:15 -07:00
Simon Willison b463f60158
?_ttl= parameter and default_cache_ttl config
Refs #285, Closes #289
2018-05-26 15:17:33 -07:00
Simon Willison cef9a9a870
--limit= mechanism plus new limits for facets
Replaced the --max_returned_rows and --sql_time_limit_ms options to
"datasette serve" with a new --limit option, which supports a larger
list of limits.

Example usage:

	datasette serve --limit max_returned_rows:1000 \
		--limit sql_time_limit_ms:2500 \
		--limit default_facet_size:50 \
		--limit facet_time_limit_ms:1000 \
		--limit facet_suggest_time_limit_ms:500

New docs: https://datasette.readthedocs.io/en/latest/limits.html

Closes #270
Closes #264
2018-05-17 22:08:26 -07:00
Simon Willison 1259b8ac0b
Support _search_COLUMN=text searches, closes #237 2018-05-05 19:33:08 -03:00
Simon Willison d4da4c92c8
?_size=max option, closes #249 2018-05-04 15:03:40 -03:00
Simon Willison 349e262bb1 Renamed ?_sql_time_limit_ms= to ?_timelimit, closes #242 2018-05-01 17:20:39 -07:00
Simon Willison a4cc5dc813 New ?_shape=array option + tweaks to _shape, closes #245
* Default is now ?_shape=arrays (renamed from lists)
* New ?_shape=array returns an array of objects as the root object
* Changed ?_shape=object to return the object as the root
* Updated docs
2018-05-01 17:20:39 -07:00
Simon Willison f188ceaa2a
New ?_size=XXX querystring parameter for table view, closes #229
Also added documentation for all of the _special arguments.

Plus deleted some duplicate logic implementing _group_count.
2018-04-25 21:47:12 -07:00
Simon Willison 0abd3abacb
New ?_shape=objects/object/lists param for JSON API (#192)
New _shape= parameter replacing old .jsono extension

Now instead of this:

	/database/table.jsono

We use the _shape parameter like this:

	/database/table.json?_shape=objects

Also introduced a new _shape called 'object' which looks like this:

	/database/table.json?_shape=object

Returning an object for the rows key:

	...
	"rows": {
		"pk1": {
			...
		},
		"pk2": {
			...
		}
	}

Refs #122
2018-04-03 07:52:54 -07:00