Comments (4)
Design for this:
def vacuum(conn):
conn.execute("vacuum")
await db.execute_isolated_fn(vacuum)
from datasette.
Implemented in a branch. Needs tests and documentation.
Another neat thing this can be used for is running "unsafe" SQLite extensions safely from within a plugin.
The plugin can define a function which takes the connection, enables the extension, then does things with it - and that extension will never be available to other connections outside of that isolated function execution.
from datasette.
I think I can test if a connection was reused or not with CREATE TEMPORARY TABLE temp_table_name (...
- that should only exist within the same connection.
I'll create one in the write thread, then use the isolated mechanism to see if it's there or not and create a new one, then check if that new one is gone in the write thread again.
from datasette.
Documentation preview: https://datasette--2220.org.readthedocs.build/en/2220/internals.html#await-db-execute-isolated-fn-fn
from datasette.
Related Issues (20)
- `datasette publish` needs support for the new config/metadata split HOT 9
- Discord invite link returns 401 HOT 2
- click-default-group-wheel dependency conflict HOT 3
- --load-extension=spatialite not working with Windows
- Detailed upgrade instructions for metadata.yaml -> datasette.yaml HOT 7
- Discord invite link is invalid
- custom plugin not seen as sql function
- request.post_body() can only be called once
- request.post_vars() method obliterates form keys with multiple values HOT 3
- 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
- Cog is failing with round_trip_load_all() YAML error HOT 3
- datasette install datasette-comments break search-all
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.