home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

20 rows where comments = 2, repo = 140912432 and type = "pull" sorted by updated_at descending

✖
✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, author_association, draft, created_at (date), updated_at (date), closed_at (date)

state 2

  • closed 19
  • open 1

type 1

  • pull · 20 ✖

repo 1

  • sqlite-utils · 20 ✖
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
1926729132 PR_kwDOCGYnMM5b7Z_y 598 Fixed issue #433 - CLI eats cursor spookylukey 62745 closed 0     2 2023-10-04T18:06:58Z 2023-11-04T00:46:55Z 2023-11-04T00:40:30Z CONTRIBUTOR simonw/sqlite-utils/pulls/598

The issue is that underlying iterator is not fully consumed within the body of the with file_progress() block. Instead, that block creates generator expressions like docs = (dict(zip(headers, row)) for row in reader)

These iterables are consumed later, outside the with file_progress() block, which consumes the underlying iterator, and in turn updates the progress bar.

This means that the ProgressBar.__exit__ method gets called before the last time the ProgressBar.update method gets called. The result is that the code to make the cursor invisible (inside the update() method) is called after the cleanup code to make it visible (in the __exit__ method).

The fix is to move consumption of the docs iterators within the progress bar block. (

(An additional fix, to make ProgressBar more robust against this kind of misuse, would to make it refusing to update after its __exit__ method had been called, just like files cannot be read() after they are closed. That requires a in the click library).

Note that Github diff obscures the simplicity of this diff, it's just indenting a block of code.


:books: Documentation preview :books:: https://sqlite-utils--598.org.readthedocs.build/en/598/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/598/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
0  
1718635018 PR_kwDOCGYnMM5Q9lY4 553 Reformatted CLI examples in docs simonw 9599 closed 0     2 2023-05-21T20:44:34Z 2023-05-21T20:57:27Z 2023-05-21T20:57:23Z OWNER simonw/sqlite-utils/pulls/553

Refs: - #551


:books: Documentation preview :books:: https://sqlite-utils--553.org.readthedocs.build/en/553/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/553/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1718550688 PR_kwDOCGYnMM5Q9VH0 546 Analyze tables options: --common-limit, --no-most, --no-least simonw 9599 closed 0     2 2023-05-21T15:54:39Z 2023-05-21T16:19:30Z 2023-05-21T16:19:30Z OWNER simonw/sqlite-utils/pulls/546

Refs #544

  • [x] Documentation for CLI options
  • [x] Documentation for new Python API parameters: most_common: bool and least_common: bool
  • [x] Tests for CLI
  • [x] Tests for Python API
sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/546/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1430563092 PR_kwDOCGYnMM5B6_6K 508 Allow surrogates in parameters chapmanjacobd 7908073 closed 0     2 2022-10-31T22:11:49Z 2022-11-17T15:11:16Z 2022-10-31T22:55:36Z CONTRIBUTOR simonw/sqlite-utils/pulls/508

closes #507

https://dwheeler.com/essays/fixing-unix-linux-filenames.html


:books: Documentation preview :books:: https://sqlite-utils--508.org.readthedocs.build/en/508/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/508/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1405196044 PR_kwDOCGYnMM5AmYzy 499 feat: recreate fts triggers after table transform chapmanjacobd 7908073 open 0     2 2022-10-11T20:35:39Z 2022-10-26T17:54:51Z   CONTRIBUTOR simonw/sqlite-utils/pulls/499

https://github.com/simonw/sqlite-utils/pull/498


:books: Documentation preview :books:: https://sqlite-utils--499.org.readthedocs.build/en/499/

alternatively, self.disable_fts()

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/499/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1404013495 PR_kwDOCGYnMM5AicIh 498 fix: enable-fts permanently save triggers chapmanjacobd 7908073 closed 0     2 2022-10-11T05:10:51Z 2022-10-15T04:33:08Z 2022-10-11T06:34:31Z CONTRIBUTOR simonw/sqlite-utils/pulls/498

I was wondering why my all my databases were giving wild search results. Turns out create_trigger was not sticking!

Running sqlite-utils triggers x.db shows [] after running enable-fts using the python api. Looking at the counts trigger it seems that is the right way to save triggers. triggers show up now


:books: Documentation preview :books:: https://sqlite-utils--498.org.readthedocs.build/en/498/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/498/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1319881016 PR_kwDOCGYnMM48Mmde 457 Link to installation instructions simonw 9599 closed 0   3.29 8355157 2 2022-07-27T17:38:36Z 2022-08-27T03:55:52Z 2022-07-27T17:57:50Z OWNER simonw/sqlite-utils/pulls/457

Also testing https://docs.readthedocs.io/en/stable/pull-requests.html

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/457/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1342357149 PR_kwDOCGYnMM49Wsnq 465 beanbag-docutils>=2.0 simonw 9599 closed 0     2 2022-08-17T22:41:39Z 2022-08-17T23:38:07Z 2022-08-17T23:38:02Z OWNER simonw/sqlite-utils/pulls/465

Refs #464

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/465/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1326391841 PR_kwDOCGYnMM48iLGF 462 Discord badge simonw 9599 closed 0     2 2022-08-02T20:56:04Z 2022-08-02T21:15:57Z 2022-08-02T21:15:52Z OWNER simonw/sqlite-utils/pulls/462

Also testing fix for: - https://github.com/readthedocs/readthedocs-preview/issues/10


:books: Documentation preview :books:: https://sqlite-utils--462.org.readthedocs.build/en/462/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/462/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1223177069 PR_kwDOCGYnMM43LrKB 429 Depend on click-default-group-wheel simonw 9599 closed 0     2 2022-05-02T18:03:10Z 2022-05-02T18:52:42Z 2022-05-02T18:05:00Z OWNER simonw/sqlite-utils/pulls/429

Trying to get this to work with Pyodide.

Refs: https://github.com/simonw/click-default-group-wheel/issues/3

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/429/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1097041471 PR_kwDOCGYnMM4wsVM6 367 Initial prototype of .analyze() methods simonw 9599 closed 0   3.21 7558727 2 2022-01-08T21:35:12Z 2022-01-10T19:31:08Z 2022-01-10T19:31:08Z OWNER simonw/sqlite-utils/pulls/367

Refs #366

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/367/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1  
991237645 MDExOlB1bGxSZXF1ZXN0NzI5NzMxNDQx 326 Test against 3.10-dev simonw 9599 closed 0     2 2021-09-08T15:01:15Z 2021-10-13T21:49:28Z 2021-10-13T21:49:28Z OWNER simonw/sqlite-utils/pulls/326

This tests against the latest 3.10 RC, https://www.python.org/downloads/release/python-3100rc2/

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/326/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
832687563 MDExOlB1bGxSZXF1ZXN0NTkzODA1ODA0 247 FTS quote functionality from datasette DeNeutoy 16001974 closed 0     2 2021-03-16T11:17:34Z 2021-08-18T18:43:12Z 2021-08-18T18:43:12Z CONTRIBUTOR simonw/sqlite-utils/pulls/247

Addresses #246 - this is a bit of a kludge because it doesn't actually validate the FTS string, just makes sure that it will not crash when executed, but I figured that building a query parser is a bit out of the scope of sqlite-utils and if you actually want to use the query language, you probably need to parse that yourself.

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/247/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
923612361 MDExOlB1bGxSZXF1ZXN0NjcyMzU5NjA5 277 add -h support closes #276 mcint 601708 closed 0     2 2021-06-17T08:08:26Z 2021-06-18T14:56:59Z 2021-06-18T14:56:59Z CONTRIBUTOR simonw/sqlite-utils/pulls/277

This appears to be the canonical solution.

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/277/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
797159961 MDExOlB1bGxSZXF1ZXN0NTY0MjE1MDEx 225 fix for problem in Table.insert_all on search for columns per chunk of rows nieuwenhoven 261237 closed 0     2 2021-01-29T20:16:07Z 2021-02-14T21:04:13Z 2021-02-14T21:04:13Z NONE simonw/sqlite-utils/pulls/225

Hi,

I ran into a problem when trying to create a database from my Apple Healthkit data using healthkit-to-sqlite. The program crashed because of an invalid insert statement that was generated for table rDistanceCycling.

The actual problem turned out to be in sqlite-utils. Table.insert_all processes the data to be inserted in chunks of rows and checks for every chunk which columns are used, and it will collect all column names in the variable all_columns. The collection of columns is done using a nested list comprehension that is not completely correct.

I'm using a Windows machine and had to make a few adjustments to the tests in order to be able to run them because they had a posix dependency.

Thanks, kind regards,

Frans

```

this is a (condensed) chunk of data from my Apple healthkit export that caused the problem.

the 3 last items in the chunk have additional keys: metadata_HKMetadataKeySyncVersion and metadata_HKMetadataKeySyncIdentifier

chunk = [{'sourceName': 'AppleÂ\xa0Watch van Frans', 'sourceVersion': '7.0.1', 'device': '<<HKDevice: 0x281cf6c70>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,4, software:7.0.1>', 'unit': 'km', 'creationDate': '2020-10-10 12:29:09 +0100', 'startDate': '2020-10-10 12:29:06 +0100', 'endDate': '2020-10-10 12:29:07 +0100', 'value': '0.00518016'}, {'sourceName': 'AppleÂ\xa0Watch van Frans', 'sourceVersion': '7.0.1', 'device': '<<HKDevice: 0x281cf6c70>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,4, software:7.0.1>', 'unit': 'km', 'creationDate': '2020-10-10 12:29:10 +0100', 'startDate': '2020-10-10 12:29:07 +0100', 'endDate': '2020-10-10 12:29:08 +0100', 'value': '0.00544049'}, {'sourceName': 'AppleÂ\xa0Watch van Frans', 'sourceVersion': '6.2.6', 'device': '<<HKDevice: 0x281cf83e0>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,4, software:6.2.6>', 'unit': 'km', 'creationDate': '2020-10-14 05:54:12 +0100', 'startDate': '2020-07-15 16:40:50 +0100', 'endDate': '2020-07-15 16:42:49 +0100', 'value': '0.952092', 'metadata_HKMetadataKeySyncVersion': '1', 'metadata_HKMetadataKeySyncIdentifier': '3:674DBCDB-3FE8-40D1-9FC1-E54A2B413805:616520450.99823:616520569.99360:119'}, {'sourceName': 'AppleÂ\xa0Watch van Frans', 'sourceVersion': '6.2.6', 'device': '<<HKDevice: 0x281cf83e0>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,4, software:6.2.6>', 'unit': 'km', 'creationDate': '2020-10-14 05:54:12 +0100', 'startDate': '2020-07-15 16:42:49 +0100', 'endDate': '2020-07-15 16:44:51 +0100', 'value': '0.848983', 'metadata_HKMetadataKeySyncVersion': '1', 'metadata_HKMetadataKeySyncIdentifier': '3:674DBCDB-3FE8-40D1-9FC1-E54A2B413805:616520569.99360:616520691.98826:119'}, {'sourceName': 'AppleÂ\xa0Watch van Frans', 'sourceVersion': '6.2.6', 'device': '<<HKDevice: 0x281cf83e0>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,4, software:6.2.6>', 'unit': 'km', 'creationDate': '2020-10-14 05:54:12 +0100', 'startDate': '2020-07-15 16:44:51 +0100', 'endDate': '2020-07-15 16:46:50 +0100', 'value': '0.834403', 'metadata_HKMetadataKeySyncVersion': '1', 'metadata_HKMetadataKeySyncIdentifier': '3:674DBCDB-3FE8-40D1-9FC1-E54A2B413805:616520691.98826:616520810.98305:119'}]

def all_columns_old(): all_columns = [col for col in chunk[0]] all_columns += [column for record in chunk for column in record if column not in all_columns] return all_columns

def all_columns_new(): all_columns = [col for col in chunk[0]] for record in chunk: all_columns += [column for column in record if column not in all_columns] return all_columns

if name == 'main': from pprint import pprint

print('problem: ')
pprint(all_columns_old())
print('\nfix: ')
pprint(all_columns_new())

```

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/225/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
792297010 MDExOlB1bGxSZXF1ZXN0NTYwMjA0MzA2 224 Add fts offset docs. polyrand 37962604 closed 0     2 2021-01-22T20:50:58Z 2021-02-14T19:31:06Z 2021-02-14T19:31:06Z NONE simonw/sqlite-utils/pulls/224

The limit can be passed as a string to the query builder to have an offset. I have tested it using the shorthand limit=f"15, 30", the standard syntax should work too.

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/224/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
589801352 MDExOlB1bGxSZXF1ZXN0Mzk1MjU4Njg3 96 Add type conversion for Panda's Timestamp b0b5h4rp13 32605365 closed 0     2 2020-03-29T14:13:09Z 2020-03-31T04:40:49Z 2020-03-31T04:40:48Z CONTRIBUTOR simonw/sqlite-utils/pulls/96

Add type conversion for Panda's Timestamp, if Panda library is present in system (thanks for this project, I was about to do the same thing from scratch)

sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/96/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
529376481 MDExOlB1bGxSZXF1ZXN0MzQ2MjY0OTI2 67 Run tests against 3.5 too simonw 9599 closed 0     2 2019-11-27T14:20:35Z 2019-12-31T01:29:44Z 2019-12-31T01:29:43Z OWNER simonw/sqlite-utils/pulls/67
sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/67/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
487847945 MDExOlB1bGxSZXF1ZXN0MzEzMDA3NDgz 56 Escape the table name in populate_fts and search. amjith 49260 closed 0     2 2019-09-01T06:29:05Z 2019-09-02T17:23:21Z 2019-09-02T17:23:21Z CONTRIBUTOR simonw/sqlite-utils/pulls/56

The table names weren't escaped using double quotes in the populate_fts method.

Reproducible case: ```

import sqlite_utils db = sqlite_utils.Database("abc.db") db["http://example.com"].insert_all([ ... {"id": 1, "age": 4, "name": "Cleo"}, ... {"id": 2, "age": 2, "name": "Pancakes"} ... ], pk="id")

<Table http://example.com (id, age, name)> >>> db["http://example.com"].enable_fts(["name"]) Traceback (most recent call last): File "", line 1, in <module> db["http://example.com"].enable_fts(["name"]) File "/home/amjith/.virtualenvs/itsysearch/lib/python3.7/site-packages/sqlite_utils/db.py", l ine 705, in enable_fts self.populate_fts(columns) File "/home/amjith/.virtualenvs/itsysearch/lib/python3.7/site-packages/sqlite_utils/db.py", l ine 715, in populate_fts self.db.conn.executescript(sql) sqlite3.OperationalError: unrecognized token: ":" >>> ```
sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/56/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
467862459 MDExOlB1bGxSZXF1ZXN0Mjk3NDEyNDY0 38 table.update() method simonw 9599 closed 0     2 2019-07-14T17:03:49Z 2019-07-28T15:43:51Z 2019-07-28T15:43:51Z OWNER simonw/sqlite-utils/pulls/38

Refs #35

Still to do:

  • [x] Unit tests
  • [x] Switch to using .get()
  • [x] Better exceptions, plus unit tests for what happens if pk does not exist
  • [x] Documentation
  • [x] Ensure compound primary keys work properly
  • [x] alter=True support
sqlite-utils 140912432 pull    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/38/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 210.95ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows