Wykres commitów

9 Commity (b2dee11fcd989d9e2a7bf4de1e23dbc320c05013)

Autor SHA1 Wiadomość Data
Simon Willison 25c241fa5a Renamed project to immutabase 2017-11-05 18:32:13 -08:00
Simon Willison 186c513a61 Support parameterized SQL and block potentially harmful queries
You can now call arbitrary SQL like this:

    /flights?sql=select%20*%20from%20airports%20where%20country%20like%20:c&c=iceland

Unescaped, those querystring params look like this:

    sql = select * from airports where country like :c
    c = iceland

So SQL can be constructed with named parameters embedded in it, which will
then be read from the querystring and correctly escaped.

This means we can aggressively filter the SQL parameter for potentially
dangerous syntax. For the moment we enforce that it starts with a SELECT
statement and we ban the sequence "pragma" from it entirely.

If you need to use pragma in a query, you can use the new named parameter
mechanism.

Fixes #39
2017-11-04 19:49:18 -07:00
Simon Willison be768f26d0 python setup.py test now runs the tests 2017-11-04 16:40:27 -07:00
Simon Willison 1c5977961f Added glob and like lookups - refs #23 2017-10-24 18:53:01 -07:00
Simon Willison 630b40038e Added support for gt, gte, lt, lte lookups
Refs #23
2017-10-24 18:46:55 -07:00
Simon Willison 1ae8ea0f03 Started implementing ?name__contains=X filters
So far we support __contains=, __startswith=, __endswith= and __exact=

Refs #23
2017-10-24 17:06:23 -07:00
Simon Willison f643f7aee1 base64 encode bytestrings from DB in JSON
Fixes #29
2017-10-24 07:58:41 -07:00
Simon Willison b46e370ee6 Link to pages-per-row
Closes #1
2017-10-24 07:10:58 -07:00
Simon Willison 6a9fdcc071 Added addressable page per row
Refs #1 - only exists for tables with introspectable primary keys.

Still need to link to this page.

Also added first unit tests - refs #9
2017-10-23 22:54:58 -07:00