Comments (3)
Consider for example https://fivethirtyeight.datasettes.com/fivethirtyeight/inconvenient-sequel%2Fratings
The idea here is to be able to support querystring parameters like this:
?timestamp___date=2017-07-17
- return every item where the timestamp falls on that date?timestamp___year=2017
- return every item where the timestamp falls within 2017?timestamp___month=1
- return every item where the month component is January?timestamp___day=10
- return every item where the day-of-the-month component is 10
This is similar to #64 but a fair bit more complicated.
SQLite date functions are documented here: https://sqlite.org/lang_datefunc.html
from datasette.
This may be useful:
https://github.com/coleifer/peewee/blob/db85167d93861451a1fe7cde8c4f05748b222634/peewee.py#L162-L185
from datasette.
I've changed my mind about this.
"Select every record on the 3rd day of the month" doesn't strike me as an actually useful feature.
"Select every record in 2018 / in May 2018 / on 1st May 2018", if you are using the SQLite-preferred datestring format, are already supported using LIKE queries (or the startswith filter):
- https://fivethirtyeight.datasettes.com/fivethirtyeight/inconvenient-sequel%2Fratings?timestamp__startswith=2017
- https://fivethirtyeight.datasettes.com/fivethirtyeight/inconvenient-sequel%2Fratings?timestamp__startswith=2017-08
- https://fivethirtyeight.datasettes.com/fivethirtyeight/inconvenient-sequel%2Fratings?timestamp__startswith=2017-08-29
from datasette.
Related Issues (20)
- ModuleNotFoundError: No module named 'click_default_group
- No suggested facets when a column named 'value' is included HOT 1
- Unreachable exception handlers for `sqlite3.OperationalError`
- Can't filter with numbers
- feature request: gzip compression of database downloads HOT 1
- CSV export with ?_labels=on fails at first row with a foreign key that fails to resolve correctly HOT 22
- get_absolute_url should respect "X-Forwarded-Proto" header
- Python APIs for accessing metadata should be async and fully documented
- Mechanism for executing "isolated" database operations without prepared connection stuff HOT 4
- Cog is failing with round_trip_load_all() YAML error HOT 3
- datasette install datasette-comments break search-all
- jinja2_environment_from_request plugin hook HOT 8
- Support for duckdb HOT 1
- Datasette docker errors when db schema uses "strict"
- Tests and docs to guarantee extras used by datasette-search-all
- ?_extra=columns parameter causes all rows to return `"column-name": "column-name"` HOT 6
- black leaves extra whitespace in my rendered documentation HOT 2
- Show how to register a plugin in a test fixture HOT 1
- Empty list in plugin introspection demo
- After releasing 1.0a8 update projects that test against a commit hash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette.