{"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-1739816358", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 1739816358, "node_id": "IC_kwDOBm6k_c5ns32m", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-28T18:29:05Z", "updated_at": "2023-09-28T18:29:05Z", "author_association": "OWNER", "body": "Datasette Cloud really wants this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-869076254", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 869076254, "node_id": "MDEyOklzc3VlQ29tbWVudDg2OTA3NjI1NA==", "user": {"value": 2670795, "label": "brandonrobertz"}, "created_at": "2021-06-27T00:03:16Z", "updated_at": "2021-06-27T00:05:51Z", "author_association": "CONTRIBUTOR", "body": "> Related: Here's an implementation of a `get_metadata()` plugin hook by @brandonrobertz [next-LI@3fd8ce9](https://github.com/next-LI/datasette/commit/3fd8ce91f3108c82227bf65ff033929426c60437)\r\n\r\nHere's a plugin that implements metadata-within-DBs: [next-LI/datasette-live-config](https://github.com/next-LI/datasette-live-config)\r\n\r\nHow it works: If a database has a `__metadata` table, then it gets parsed and included in the global metadata. It also implements a database-action hook with a UI for managing config.\r\n\r\nMore context: https://github.com/next-LI/datasette-live-config/blob/72e335e887f1c69c54c6c2441e07148955b0fc9f/datasette_live_config/__init__.py#L109-L140", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-834636796", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 834636796, "node_id": "MDEyOklzc3VlQ29tbWVudDgzNDYzNjc5Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-07T17:22:52Z", "updated_at": "2021-05-07T17:22:52Z", "author_association": "OWNER", "body": "Related: Here's an implementation of a `get_metadata()` plugin hook by @brandonrobertz https://github.com/next-LI/datasette/commit/3fd8ce91f3108c82227bf65ff033929426c60437", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753524779", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753524779, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzUyNDc3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-02T20:19:26Z", "updated_at": "2021-01-02T20:19:26Z", "author_association": "OWNER", "body": "Idea: version the metadata scheme. If the table is called `_metadata_v1` it gives me a clear path to designing a new scheme in the future.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753402423", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753402423, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzQwMjQyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T23:16:05Z", "updated_at": "2021-01-01T23:16:05Z", "author_association": "OWNER", "body": "One catch: solving the \"show me all metadata for everything in this Datasette instance\" problem.\r\n\r\nIdeally there would be a SQLite table that can be queried for this. But the need to resolve the potentially complex set of precedence rules means that table would be difficult if not impossible to provide at run-time.\r\n\r\nIdeally a denormalized table would be available that featured the results of running those precedence rule calculations. But how to handle keeping this up-to-date? It would need to be recalculated any time a `_metadata` table in any of the attached databases had an update.\r\n\r\nThis is a much larger problem - but one potential fix would be to use triggers to maintain a \"version number\" for the `_metadata` table - similar to SQLite's own built-in `schema_version` mechanism. Triggers could increment a counter any time a record in that table was added, deleted or updated.\r\n\r\nSuch a mechanism would have applications outside of just this `_metadata` system. The ability to attach a version number to any table and have it automatically incremented when that table changes (via triggers) could help with all kinds of other Datasette-at-scale problems, including things like cached table counts.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753401001", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753401001, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzQwMTAwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T23:01:45Z", "updated_at": "2021-01-01T23:01:45Z", "author_association": "OWNER", "body": "I need to prototype this. Could I do that as a plugin? I think so - I could try out the algorithm for loading metadata and display it on pages using some custom templates.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753400420", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753400420, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzQwMDQyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:53:58Z", "updated_at": "2021-01-01T22:53:58Z", "author_association": "OWNER", "body": "Precedence idea:\r\n- First priority is non-_internal metadata from other databases - if those conflict then pick then the alphabetically-ordered-first database name wins\r\n- Next priority: `_internal` metadata, which should have been loaded from `metadata.json`\r\n- Last priority: the `_metadata` table from that database itself, i.e. the default \"baked in\" metadata", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753400306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753400306, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzQwMDMwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:52:44Z", "updated_at": "2021-01-01T22:52:44Z", "author_association": "OWNER", "body": "Also: probably load column metadata as part of the table metadata rather than loading column metadata individually, since it's going to be rare to want the metadata for a single column rather than for an entire table full of columns.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753400265", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753400265, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzQwMDI2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:52:09Z", "updated_at": "2021-01-01T22:52:09Z", "author_association": "OWNER", "body": "From an implementation perspective, I think the way this works is SQL queries read the relevant metadata from ALL available metadata tables, then Python code solves the precedence rules to produce the final, combined metadata for a database/table/column.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753399635", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753399635, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5OTYzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:45:21Z", "updated_at": "2021-01-01T22:50:21Z", "author_association": "OWNER", "body": "Would also need to figure out the precedence rules:\r\n\r\n- What happens if the database has a `_metadata` table with data that conflicts with a remote metadata record from another database? I think the other database should win, because that allows plugins to over-ride the default metadata for something.\r\n- Do JSON values get merged together? So if one table provides a description and another provides a title do both values get returned?\r\n- If a database has a `license`, does that \"cascade\" down to the tables? What about `source` and `about`?\r\n- What if there are two databases (or more) that provide conflicting metadata for a table in some other database? Also, `_internal` may have loaded data from `metadata.json` that conflicts with some other remote table metadata definition.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753399428", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753399428, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5OTQyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:43:14Z", "updated_at": "2021-01-01T22:43:22Z", "author_association": "OWNER", "body": "Could this use a compound primary key on `database, table, column`? Does that work with null values?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753399366", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753399366, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5OTM2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:42:37Z", "updated_at": "2021-01-01T22:42:37Z", "author_association": "OWNER", "body": "So what would the database schema for this look like?\r\n\r\nI'm leaning towards a single table called `_metadata`, because that's a neater fit for baking the metadata into the database file along with the data that it is describing. Alternatively I could have multiple tables sharing that prefix - `_metadata_database` and `_metadata_tables` and `_metadata_columns` perhaps.\r\n\r\nIf it's just a single `_metadata` table, the schema could look like this:\r\n\r\n| database | table | column | metadata |\r\n| --- | --- | --- | --- |\r\n| | mytable | | {\"title\": \"My Table\" } |\r\n| | mytable | mycolumn | {\"description\": \"Column description\" } |\r\n| otherdb | othertable | | {\"description\": \"Table in another DB\" } |\r\n\r\nIf the `database` column is `null` it means \"this is describing a table in the same database file as this `_metadata` table\".\r\n\r\nThe alternative to the `metadata` JSON column would be separate columns for each potential metadata value - `license`, `source`, `about`, `about_url` etc. But that makes it harder for people to create custom metadata fields.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753398542", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753398542, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5ODU0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:37:24Z", "updated_at": "2021-01-01T22:37:24Z", "author_association": "OWNER", "body": "The direction I'm leaning in now is the following:\r\n\r\n- Metadata always lives in SQLite tables\r\n- These tables can be co-located with the database they describe (same DB file)\r\n- ... or they can be in a different DB file and reference the other database that they are describing\r\n- Metadata provided on startup in a `metadata.json` file is loaded into an in-memory metadata table using that same mechanism\r\n\r\nPlugins that want to provide metadata can do so by populating a table. They could even maintain their own in-memory database for this, or they could write to the `_internal` in-memory database, or they could write to a table in a database on disk.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753392102", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753392102, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5MjEwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:06:33Z", "updated_at": "2021-01-01T22:06:33Z", "author_association": "OWNER", "body": "Some SQLite databases include SQL comments in the schema definition which tell you what each column means:\r\n\r\n```sql\r\nCREATE TABLE User\r\n -- A table comment\r\n(\r\n uid INTEGER, -- A field comment\r\n flags INTEGER -- Another field comment\r\n);\r\n```\r\nThe problem with these is that they're not exposed to SQLite in any mechanism other than parsing the `CREATE TABLE` statement from the `sqlite_master` table to extract those columns.\r\n\r\nI had an idea to build a plugin that could return these. That would be easy with a \"get metadata for this column\" plugin hook - in the absence of one a plugin could still run that reads the schemas on startup and uses them to populate a metadata database table somewhere.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753391869", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753391869, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5MTg2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:04:30Z", "updated_at": "2021-01-01T22:04:30Z", "author_association": "OWNER", "body": "The sticking point here seems to be the plugin hook. Allowing plugins to over-ride the way the question \"give me the metadata for this database/table/column\" is answered makes the database-backed metadata mechanisms much more complicated to think about.\r\n\r\nWhat if plugins didn't get to over-ride metadata in this way, but could instead update the metadata in a persistent Datasette-managed storage mechanism?\r\n\r\nThen maybe Datasette could do the following:\r\n\r\n- Maintain metadata in `_internal` that has been loaded from `metadata.json`\r\n- Know how to check a database for baked-in metadata (maybe in a `_metadata` table)\r\n- Know how to fall back on the `_internal` metadata if no baked-in metadata is available\r\n\r\nIf database files were optionally allowed to store metadata about tables that live in another database file this could perhaps solve the plugin needs - since an \"edit metadata\" plugin would be able to edit records in a separate, dedicated `metadata.db` database to store new information about tables in other files.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753390791", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753390791, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5MDc5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T22:00:42Z", "updated_at": "2021-01-01T22:00:42Z", "author_association": "OWNER", "body": "Here are the requirements I'm currently trying to satisfy:\r\n\r\n- It should be possible to query the metadata for ALL attached tables in one place, potentially with pagination and filtering\r\n- Metadata should be able to exist in the current `metadata.json` file\r\n- It should also be possible to bundle metadata in a table in the SQLite database files themselves\r\n- Plugins should be able to define their own special mechanisms for metadata. This is particularly interesting for providing a UI that allows users to edit the metadata for their existing tables.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753390262", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753390262, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM5MDI2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T21:58:11Z", "updated_at": "2021-01-01T21:58:11Z", "author_association": "OWNER", "body": "One possibility: plugins could write directly to that in-memory database table. But how would they know to write again should the server restart? Maybe they would write to it once when called by the `startup` plugin hook, and then update it (and their own backing store) when metadata changes for some reason. Feels a bit messy though.\r\n\r\nAlso: if I want to support metadata optionally living in a `_metadata` table colocated with the data in a SQLite database file itself, how would that affect the `metadata` columns in `_internal`? How often would Datasette denormalize and copy data across from the on-disk `_metadata` tables to the `_internal` in-memory columns?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753389938", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753389938, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM4OTkzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T21:54:15Z", "updated_at": "2021-01-01T21:54:15Z", "author_association": "OWNER", "body": "So what if the `databases`, `tables` and `columns` tables in `_internal` each grew a new `metadata` text column?\r\n\r\nThese columns could be populated by Datasette on startup through reading the `metadata.json` file. But how would plugins interact with them?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753389477", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753389477, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM4OTQ3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T21:49:57Z", "updated_at": "2021-01-01T21:49:57Z", "author_association": "OWNER", "body": "What if metadata was stored in a JSON text column in the existing `_internal` tables? This would allow for users to invent additional metadata fields in the future beyond the current `license`, `license_url` etc fields - without needing a schema change.\r\n\r\nThe downside of JSON columns generally is that they're harder to run indexed queries against. For metadata I don't think that matters - even with 10,000 tables each with their own metadata a SQL query asking for e.g. \"everything that has Apache 2 as the license\" would return in just a few ms.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753388809", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753388809, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM4ODgwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T21:47:51Z", "updated_at": "2021-01-01T21:47:51Z", "author_association": "OWNER", "body": "A database that exposes metadata will have the same restriction as the new `_internal` database that exposes columns and tables, in that it needs to take permissions into account. A user should not be able to view metadata for tables that they are not able to see.\r\n\r\nAs such, I'd rather bundle any metadata tables into the existing `_internal` database so I don't have to solve that permissions problem in two places.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-753366024", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 753366024, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzM2NjAyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-01T18:48:34Z", "updated_at": "2021-01-01T18:48:34Z", "author_association": "OWNER", "body": "Also: in #188 I proposed bundling metadata in the SQLite database itself alongside the data. This is a great way of ensuring metadata travels with the data when it is downloaded as a SQLite `.db` file. But how would that play with the idea of an in-memory `_metadata` table? Could that table perhaps offer views that join data across multiple attached physical databases?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null}