Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research: Plugin hook for alternative database connections #1250

Closed
simonw opened this issue Mar 8, 2021 · 2 comments
Closed

Research: Plugin hook for alternative database connections #1250

simonw opened this issue Mar 8, 2021 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Mar 8, 2021

The Database class is a natural looking fit for a plugin hook to load custom database connections... potentially even databases other than SQLite. DuckDB (refs #968) could make for a great starting point, since it looks very compatible with the existing SQLite code.

The real win would be if this could lead to running Datasette against PostgreSQL. I made some initial explorations in that direction a while ago in #670.

@simonw simonw added the research label Mar 8, 2021
@simonw
Copy link
Owner Author

simonw commented Mar 8, 2021

DuckDB has a read-only mechanism: https://duckdb.org/docs/api/python

import duckdb
con = duckdb.connect(database="/tmp/blah.db", read_only=True)

@simonw
Copy link
Owner Author

simonw commented Mar 12, 2021

This is a duplicate of #1193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant