You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means clients can ask questions but say "don't bother if it takes longer than X" - which is really handy when you're working against unknown databases that might be small or might be enormous.
simonw
changed the title
Allow shorter time limits to be set using a _sql_limit_ms=20 query string limit
Allow shorter time limits to be set using a ?sql_time_limit_ms =20 query string limit
Nov 15, 2017
simonw
changed the title
Allow shorter time limits to be set using a ?sql_time_limit_ms =20 query string limit
Allow shorter time limits to be set using a ?_sql_time_limit_ms =20 query string limit
Nov 15, 2017
Added a unit test for the sql_time_limit_ms option.
To test this, I needed to add a custom SQLite sleep() function. I've added a
simple mechanism to the Datasette class for registering custom functions.
I also had to modify the sqlite_timelimit() function. It makes use of a magic
value, N, which is the number of SQLite virtual machine instructions that
should execute in between calls to my termination decision function.
The value of N was not finely grained enough for my test to work - so I've
added logic that says that if the time limit is less than 50ms, N is set to 1.
This got the tests working.
Refs #95
This cannot be greater than the configured time limit.
The text was updated successfully, but these errors were encountered: