mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--crossdb option for joining across databases (#1232)
* Test for cross-database join, refs #283 * Warn if --crossdb used with more than 10 DBs, refs #283 * latest.datasette.io demo of --crossdb joins, refs #283 * Show attached databases on /_memory page, refs #283 * Documentation for cross-database queries, refs #283
This commit is contained in:
parent
4df548e766
commit
6f41c8a2be
13 changed files with 215 additions and 8 deletions
|
|
@ -115,6 +115,8 @@ class DatabaseView(DataView):
|
|||
links.extend(extra_links)
|
||||
return links
|
||||
|
||||
attached_databases = [d.name for d in await db.attached_databases()]
|
||||
|
||||
return (
|
||||
{
|
||||
"database": database,
|
||||
|
|
@ -139,6 +141,7 @@ class DatabaseView(DataView):
|
|||
"allow_download": self.ds.setting("allow_download")
|
||||
and not db.is_mutable
|
||||
and not db.is_memory,
|
||||
"attached_databases": attached_databases,
|
||||
},
|
||||
(f"database-{to_css_class(database)}.html", "database.html"),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue