home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1646656246

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/sqlite-utils/issues/565#issuecomment-1646656246 https://api.github.com/repos/simonw/sqlite-utils/issues/565 1646656246 IC_kwDOCGYnMM5iJfr2 9599 2023-07-22T19:32:07Z 2023-07-22T19:32:07Z OWNER

Trying out a simple first implementation: ```pycon

from sqlite_utils import Database db = Database(memory=True, tracer=print) PRAGMA recursive_triggers=on; None db["foo"].insert({"id": 1}) select name from sqlite_master where type = 'view' None select name from sqlite_master where type = 'table' None select name from sqlite_master where type = 'view' None select name from sqlite_master where type = 'table' None select name from sqlite_master where type = 'view' None CREATE TABLE [foo] ( [id] INTEGER ); None select name from sqlite_master where type = 'view' None INSERT INTO [foo] ([id]) VALUES (?); [1] select name from sqlite_master where type = 'table' None select name from sqlite_master where type = 'table' None PRAGMA table_info([foo]) None

<Table foo (id)> >>> db.rename_table("foo", "baz") ALTER TABLE [foo] RENAME TO [baz] None >>> print(db.schema) select sql from sqlite_master where sql is not null None CREATE TABLE "baz" ( [id] INTEGER ); ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1786258502  
Powered by Datasette · Queries took 1.21ms · About: github-to-sqlite