home / github

Menu
  • GraphQL API

commits

Table actions
  • GraphQL API for commits

2 rows where "author_date" is on date 2018-06-15

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: committer_date (date)

author_date (date) 1 ✖

  • 2018-06-15 · 2 ✖
sha ▼ message author_date committer_date raw_author raw_committer repo author committer
3a79ad98eafb9da527a3b9d9d8fbeb81936b02e7 Basic CSV export, refs #266 Tables and custom SQL query results can now be exported as CSV. The easiest way to do this is to use the .csv extension, e.g. /test_tables/facet_cities.csv By default this is served as Content-Type: text/plain so you can see it in your browser. If you want to download the file (using text/csv and with an appropriate Content-Disposition: attachment header) you can do so like this: /test_tables/facet_cities.csv?_dl=1 We link to the CSV and downloadable CSV URLs from the table and query pages. The links use ?_size=max and so by default will return 1,000 rows. Also fixes #303 - table names ending in .json or .csv are now detected and URLs are generated that look like this instead: /test_tables/table%2Fwith%2Fslashes.csv?_format=csv The ?_format= option is available for everything else too, but we link to the .csv / .json versions in most cases because they are aesthetically pleasing. 2018-06-15T06:51:23Z 2018-06-15T06:51:23Z Simon Willison 13ae486343ea6454a93114c6f558ffea2f2c6874 Simon Willison 13ae486343ea6454a93114c6f558ffea2f2c6874 datasette 107914493 simonw 9599 simonw 9599
5bda4a477c52b6d1cd7d0ca25382dbb20bda40ea Fixed CSV tests - Python 3.6.5 and 3.6.3 apparently differ The test used to expect CSV to come back like this: hello world "" With the final blank value encoded in quotes. Judging by Travis failures, this behaviour changed between Python 3.6.3 and 3.6.5: https://travis-ci.org/simonw/datasette/jobs/392586661 2018-06-15T07:01:48Z 2018-06-15T07:01:48Z Simon Willison 13ae486343ea6454a93114c6f558ffea2f2c6874 Simon Willison 13ae486343ea6454a93114c6f558ffea2f2c6874 datasette 107914493 simonw 9599 simonw 9599

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [commits] (
   [sha] TEXT PRIMARY KEY,
   [message] TEXT,
   [author_date] TEXT,
   [committer_date] TEXT,
   [raw_author] TEXT REFERENCES [raw_authors]([id]),
   [raw_committer] TEXT REFERENCES [raw_authors]([id]),
   [repo] INTEGER REFERENCES [repos]([id]),
   [author] INTEGER REFERENCES [users]([id]),
   [committer] INTEGER REFERENCES [users]([id])
);
CREATE INDEX [idx_commits_committer]
                ON [commits] ([committer]);
CREATE INDEX [idx_commits_author]
                ON [commits] ([author]);
CREATE INDEX [idx_commits_repo]
                ON [commits] ([repo]);
CREATE INDEX [idx_commits_raw_committer]
                ON [commits] ([raw_committer]);
CREATE INDEX [idx_commits_raw_author]
                ON [commits] ([raw_author]);
Powered by Datasette · Queries took 91.858ms · About: simonw/datasette-graphql