home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 586047525

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/417#issuecomment-586047525 https://api.github.com/repos/simonw/datasette/issues/417 586047525 MDEyOklzc3VlQ29tbWVudDU4NjA0NzUyNQ== 9599 2020-02-14T01:03:43Z 2020-02-14T01:59:02Z OWNER OK, I have a plan. I'm going to try and implement this is a core Datasette feature (no plugins) with the following design: - You can tell Datasette "load any databases you find in this directory" by passing the `--dir=path/to/dir` option to `datasette` that are valid SQLite files and will attach them to Datasette - Every 10 seconds Datasette will re-scan those directories to see if any new files have been added - That 10s will be the default for a new `--config directory_scan_s:10` config option. You can set this to `0` to disable scanning entirely, at which point Datasette will only run the scan once on startup. To check if a file is valid SQLite, Datasette will first check if the first few bytes of the file are `b"SQLite format 3\x00"`. If they are, it will open a connection to the file and attempt to run `select * from sqlite_master` against it. If that runs without any errors it will assume the file is usable and connect it. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 421546944  
Powered by Datasette · Queries took 0.871ms