Wykres commitów

76 Commity (b49fa446d683ddcaf6faf2944dacc0d866bf2d70)

Autor SHA1 Wiadomość Data
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