home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1279863844

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
1279863844 I_kwDOCGYnMM5MSSwk 449 Utilities for duplicating tables and creating a table with the results of a query 1690072 closed 0     4 2022-06-22T09:41:43Z 2022-07-15T21:46:13Z 2022-07-15T21:21:36Z CONTRIBUTOR  

is there a duplicate table functionality? Otherwise, I'd be happy to submit a PR.

In sqlite3 it would look like:

```python import sqlite3 as sl

con = sl.connect('prompt-tune.db')

def db_duplicate_table(table_name, table_name_new, con=con): # Duplicates table table_name to a new table table_name_new. try: cur = con.cursor() cur.execute(f"""CREATE TABLE {table_name_new} AS SELECT * FROM {table_name}""") except Exception as e: print(e) finally: cur.close()

db_duplicate_table('orig_table', 'new_table') ```

140912432 issue    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/449/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.826ms · About: github-to-sqlite