issue_comments
39 rows where "updated_at" is on date 2022-06-14 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: issue_url, created_at (date), updated_at (date)
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1155815186 | https://github.com/simonw/sqlite-utils/issues/444#issuecomment-1155815186 | https://api.github.com/repos/simonw/sqlite-utils/issues/444 | IC_kwDOCGYnMM5E5FcS | simonw 9599 | 2022-06-14T23:48:16Z | 2022-06-14T23:48:16Z | OWNER | This is tricky to implement because of this code: https://github.com/simonw/sqlite-utils/blob/b8af3b96f5c72317cc8783dc296a94f6719987d9/sqlite_utils/cli.py#L938-L945 It's reconstructing each document using the known headers here:
So my first attempt at this - the diff here - did not have the desired result: ```diff diff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py index 86eddfb..00b920b 100644 --- a/sqlite_utils/cli.py +++ b/sqlite_utils/cli.py @@ -6,7 +6,7 @@ import hashlib import pathlib import sqlite_utils from sqlite_utils.db import AlterError, BadMultiValues, DescIndex -from sqlite_utils.utils import maximize_csv_field_size_limit +from sqlite_utils.utils import maximize_csv_field_size_limit, _extra_key_strategy from sqlite_utils import recipes import textwrap import inspect @@ -797,6 +797,15 @@ _import_options = ( "--encoding", help="Character encoding for input, defaults to utf-8", ), + click.option( + "--ignore-extras", + is_flag=True, + help="If a CSV line has more than the expected number of values, ignore the extras", + ), + click.option( + "--extras-key", + help="If a CSV line has more than the expected number of values put them in a list in this column", + ), ) @@ -885,6 +894,8 @@ def insert_upsert_implementation( sniff, no_headers, encoding, + ignore_extras, + extras_key, batch_size, alter, upsert, @@ -909,6 +920,10 @@ def insert_upsert_implementation( raise click.ClickException("--flatten cannot be used with --csv or --tsv") if encoding and not (csv or tsv): raise click.ClickException("--encoding must be used with --csv or --tsv") + if ignore_extras and extras_key: + raise click.ClickException( + "--ignore-extras and --extras-key cannot be used together" + ) if pk and len(pk) == 1: pk = pk[0] encoding = encoding or "utf-8-sig" @@ -935,7 +950,9 @@ def insert_upsert_implementation( csv_reader_args["delimiter"] = delimiter if quotechar: csv_reader_args["quotechar"] = quotechar - reader = csv_std.reader(decoded, csv_reader_args) + reader = _extra_key_strategy( + csv_std.reader(decoded, csv_reader_args), ignore_extras, extras_key + ) first_row = next(reader) if no_headers: headers = ["untitled_{}".format(i + 1) for i in range(len(first_row))] @@ -1101,6 +1118,8 @@ def insert( sniff, no_headers, encoding, + ignore_extras, + extras_key, batch_size, alter, detect_types, @@ -1176,6 +1195,8 @@ def insert( sniff, no_headers, encoding, + ignore_extras, + extras_key, batch_size, alter=alter, upsert=False, @@ -1214,6 +1235,8 @@ def upsert( sniff, no_headers, encoding, + ignore_extras, + extras_key, alter, not_null, default, @@ -1254,6 +1277,8 @@ def upsert( sniff, no_headers, encoding, + ignore_extras, + extras_key, batch_size, alter=alter, upsert=True, @@ -1297,6 +1322,8 @@ def bulk( sniff, no_headers, encoding, + ignore_extras, + extras_key, load_extension, ): """ @@ -1331,6 +1358,8 @@ def bulk( sniff=sniff, no_headers=no_headers, encoding=encoding, + ignore_extras=ignore_extras, + extras_key=extras_key, batch_size=batch_size, alter=False, upsert=False, ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV `extras_key=` and `ignore_extras=` equivalents for CLI tool 1271426387 | |
1155804591 | https://github.com/simonw/sqlite-utils/issues/444#issuecomment-1155804591 | https://api.github.com/repos/simonw/sqlite-utils/issues/444 | IC_kwDOCGYnMM5E5C2v | simonw 9599 | 2022-06-14T23:28:36Z | 2022-06-14T23:28:36Z | OWNER | I'm going with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV `extras_key=` and `ignore_extras=` equivalents for CLI tool 1271426387 | |
1155804459 | https://github.com/simonw/sqlite-utils/issues/444#issuecomment-1155804459 | https://api.github.com/repos/simonw/sqlite-utils/issues/444 | IC_kwDOCGYnMM5E5C0r | simonw 9599 | 2022-06-14T23:28:18Z | 2022-06-14T23:28:18Z | OWNER | I think these become part of the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV `extras_key=` and `ignore_extras=` equivalents for CLI tool 1271426387 | |
1155803262 | https://github.com/simonw/sqlite-utils/issues/430#issuecomment-1155803262 | https://api.github.com/repos/simonw/sqlite-utils/issues/430 | IC_kwDOCGYnMM5E5Ch- | simonw 9599 | 2022-06-14T23:26:11Z | 2022-06-14T23:26:11Z | OWNER | It looks like
I'm going to turn this into a help-wanted documentation issue. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Document how to use `PRAGMA temp_store` to avoid errors when running VACUUM against huge databases 1224112817 | |
1155801812 | https://github.com/simonw/sqlite-utils/issues/434#issuecomment-1155801812 | https://api.github.com/repos/simonw/sqlite-utils/issues/434 | IC_kwDOCGYnMM5E5CLU | simonw 9599 | 2022-06-14T23:23:32Z | 2022-06-14T23:23:32Z | OWNER | Since table names can be quoted like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`detect_fts()` identifies the wrong table if tables have names that are subsets of each other 1243151184 | |
1155794149 | https://github.com/simonw/sqlite-utils/issues/434#issuecomment-1155794149 | https://api.github.com/repos/simonw/sqlite-utils/issues/434 | IC_kwDOCGYnMM5E5ATl | simonw 9599 | 2022-06-14T23:09:54Z | 2022-06-14T23:09:54Z | OWNER | A test that demonstrates the problem: ```python @pytest.mark.parametrize("reverse_order", (True, False)) def test_detect_fts_similar_tables(fresh_db, reverse_order): # https://github.com/simonw/sqlite-utils/issues/434 table1, table2 = ("demo", "demo2") if reverse_order: table1, table2 = table2, table1
tests/test_introspect.py:53: AssertionError ========================================================================================= short test summary info ========================================================================================= FAILED tests/test_introspect.py::test_detect_fts_similar_tables[True] - AssertionError: assert 'demo2_fts' == 'demo_fts' =============================================================================== 1 failed, 1 passed, 855 deselected in 1.00s =============================================================================== ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`detect_fts()` identifies the wrong table if tables have names that are subsets of each other 1243151184 | |
1155791109 | https://github.com/simonw/sqlite-utils/issues/434#issuecomment-1155791109 | https://api.github.com/repos/simonw/sqlite-utils/issues/434 | IC_kwDOCGYnMM5E4_kF | simonw 9599 | 2022-06-14T23:04:40Z | 2022-06-14T23:04:40Z | OWNER | Definitely a bug - thanks for the detailed write-up! You're right, the code at fault is here: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`detect_fts()` identifies the wrong table if tables have names that are subsets of each other 1243151184 | |
1155789101 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155789101 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E4_Et | simonw 9599 | 2022-06-14T23:00:45Z | 2022-06-14T23:00:45Z | OWNER | I'm going to mark this as "help wanted" and leave it open. I'm glad that it's not actually a bug where errors get swallowed. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155788944 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155788944 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E4_CQ | simonw 9599 | 2022-06-14T23:00:24Z | 2022-06-14T23:00:24Z | OWNER | The progress bar only works if the file-like object passed to it has a If we know the file size in bytes AND we know the character encoding, can we change I don't think so: I can't see a way of definitively saying "for this encoding the number of bytes per character is X" - and in fact I'm pretty sure that question doesn't even make sense since variable-length encodings exist. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155784284 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155784284 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E495c | simonw 9599 | 2022-06-14T22:51:03Z | 2022-06-14T22:52:13Z | OWNER | Yes, this is the problem. The progress bar length is set to the length in bytes of the file - So if the file is in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155782835 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155782835 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E49iz | simonw 9599 | 2022-06-14T22:48:22Z | 2022-06-14T22:49:53Z | OWNER | Here's the code that implements the progress bar in question: https://github.com/simonw/sqlite-utils/blob/1b09538bc6c1fda773590f3e600993ef06591041/sqlite_utils/cli.py#L918-L932 It calls Which uses this: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155781399 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155781399 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E49MX | simonw 9599 | 2022-06-14T22:45:41Z | 2022-06-14T22:45:41Z | OWNER | TIL how to use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155776023 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155776023 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E474X | simonw 9599 | 2022-06-14T22:36:07Z | 2022-06-14T22:36:07Z | OWNER | Wait! The arguments in that are the wrong way round. This is correct:
It still outputs the following: [------------------------------------] 0% [#################-------------------] 49% 00:00:02% But it creates a That database has 3141 rows in it: ``` % sqlite-utils tables test.db --counts -t table count test 3142
And it contains 3142 lines:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155772244 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155772244 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E469U | simonw 9599 | 2022-06-14T22:30:03Z | 2022-06-14T22:30:03Z | OWNER | Tried this: ``` % python -i $(which sqlite-utils) insert --csv --delimiter ";" --encoding "utf-16-le" test test.db csv [------------------------------------] 0% [#################-------------------] 49% 00:00:01Traceback (most recent call last): File "/Users/simon/.local/share/virtualenvs/sqlite-utils-C4Ilevlm/lib/python3.8/site-packages/click/core.py", line 1072, in main ctx.exit() File "/Users/simon/.local/share/virtualenvs/sqlite-utils-C4Ilevlm/lib/python3.8/site-packages/click/core.py", line 692, in exit raise Exit(code) click.exceptions.Exit: 0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/simon/.local/share/virtualenvs/sqlite-utils-C4Ilevlm/bin/sqlite-utils", line 33, in <module> sys.exit(load_entry_point('sqlite-utils', 'console_scripts', 'sqlite-utils')()) File "/Users/simon/.local/share/virtualenvs/sqlite-utils-C4Ilevlm/lib/python3.8/site-packages/click/core.py", line 1137, in call return self.main(args, *kwargs) File "/Users/simon/.local/share/virtualenvs/sqlite-utils-C4Ilevlm/lib/python3.8/site-packages/click/core.py", line 1090, in main sys.exit(e.exit_code) SystemExit: 0
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155771462 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155771462 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E46xG | simonw 9599 | 2022-06-14T22:28:38Z | 2022-06-14T22:28:38Z | OWNER | Maybe this isn't a CSV field value problem - I tried this patch and didn't seem to hit the new breakpoints:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155769216 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155769216 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E46OA | simonw 9599 | 2022-06-14T22:24:49Z | 2022-06-14T22:25:06Z | OWNER | I have a hunch that this crash may be caused by a CSV value which is too long, as addressed at the library level in: - #440 But not yet addressed in the CLI tool, see:
Either way though, I really don't like that errors like this are swallowed! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155767915 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155767915 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E455r | simonw 9599 | 2022-06-14T22:22:27Z | 2022-06-14T22:22:27Z | OWNER | I forgot to add equivalents of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155767202 | https://github.com/simonw/sqlite-utils/issues/439#issuecomment-1155767202 | https://api.github.com/repos/simonw/sqlite-utils/issues/439 | IC_kwDOCGYnMM5E45ui | simonw 9599 | 2022-06-14T22:21:10Z | 2022-06-14T22:21:10Z | OWNER | I can't figure out why that error is being swallowed like that. The most likely culprit was this code: But I tried changing it like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Misleading progress bar against utf-16-le CSV input 1250495688 | |
1155764428 | https://github.com/simonw/sqlite-utils/issues/432#issuecomment-1155764428 | https://api.github.com/repos/simonw/sqlite-utils/issues/432 | IC_kwDOCGYnMM5E45DM | simonw 9599 | 2022-06-14T22:16:21Z | 2022-06-14T22:16:21Z | OWNER | Initial idea of how the
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support `rows_where()`, `delete_where()` etc for attached alias databases 1236693079 | |
1155764064 | https://github.com/simonw/sqlite-utils/issues/432#issuecomment-1155764064 | https://api.github.com/repos/simonw/sqlite-utils/issues/432 | IC_kwDOCGYnMM5E449g | simonw 9599 | 2022-06-14T22:15:44Z | 2022-06-14T22:15:44Z | OWNER | Implementing this would be a pretty big change - initial instinct is that I'd need to introduce a To look like this instead:
Would have to know to query The cached table counts logic like this would need a bunch of changes too: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support `rows_where()`, `delete_where()` etc for attached alias databases 1236693079 | |
1155759857 | https://github.com/simonw/sqlite-utils/issues/432#issuecomment-1155759857 | https://api.github.com/repos/simonw/sqlite-utils/issues/432 | IC_kwDOCGYnMM5E437x | simonw 9599 | 2022-06-14T22:09:07Z | 2022-06-14T22:09:07Z | OWNER | Third option, and I think the one I like the best:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support `rows_where()`, `delete_where()` etc for attached alias databases 1236693079 | |
1155758664 | https://github.com/simonw/sqlite-utils/issues/432#issuecomment-1155758664 | https://api.github.com/repos/simonw/sqlite-utils/issues/432 | IC_kwDOCGYnMM5E43pI | simonw 9599 | 2022-06-14T22:07:50Z | 2022-06-14T22:07:50Z | OWNER | Another potential fix: add a
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support `rows_where()`, `delete_where()` etc for attached alias databases 1236693079 | |
1155756742 | https://github.com/simonw/sqlite-utils/issues/432#issuecomment-1155756742 | https://api.github.com/repos/simonw/sqlite-utils/issues/432 | IC_kwDOCGYnMM5E43LG | simonw 9599 | 2022-06-14T22:05:38Z | 2022-06-14T22:05:49Z | OWNER | I don't like the idea of It would be neat if functions like One thought would be to support something like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support `rows_where()`, `delete_where()` etc for attached alias databases 1236693079 | |
1155753397 | https://github.com/simonw/sqlite-utils/issues/431#issuecomment-1155753397 | https://api.github.com/repos/simonw/sqlite-utils/issues/431 | IC_kwDOCGYnMM5E42W1 | simonw 9599 | 2022-06-14T22:01:38Z | 2022-06-14T22:01:38Z | OWNER | Yeah, I think it would be neat if the library could support self-referential many-to-many in a nice way. I'm not sure about the
Are there other reasons people might wan the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Allow making m2m relation of a table to itself 1227571375 | |
1155750270 | https://github.com/simonw/sqlite-utils/issues/441#issuecomment-1155750270 | https://api.github.com/repos/simonw/sqlite-utils/issues/441 | IC_kwDOCGYnMM5E41l- | simonw 9599 | 2022-06-14T21:57:57Z | 2022-06-14T21:57:57Z | OWNER | I added |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Combining `rows_where()` and `search()` to limit which rows are searched 1257724585 | |
1155749696 | https://github.com/simonw/sqlite-utils/issues/433#issuecomment-1155749696 | https://api.github.com/repos/simonw/sqlite-utils/issues/433 | IC_kwDOCGYnMM5E41dA | simonw 9599 | 2022-06-14T21:57:05Z | 2022-06-14T21:57:05Z | OWNER | Marking this as help wanted because I can't figure out how to replicate it! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CLI eats my cursor 1239034903 | |
1155748444 | https://github.com/simonw/sqlite-utils/issues/442#issuecomment-1155748444 | https://api.github.com/repos/simonw/sqlite-utils/issues/442 | IC_kwDOCGYnMM5E41Jc | simonw 9599 | 2022-06-14T21:55:15Z | 2022-06-14T21:55:15Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`maximize_csv_field_size_limit()` utility function 1269886084 | ||
1155714131 | https://github.com/simonw/sqlite-utils/issues/442#issuecomment-1155714131 | https://api.github.com/repos/simonw/sqlite-utils/issues/442 | IC_kwDOCGYnMM5E4sxT | simonw 9599 | 2022-06-14T21:07:50Z | 2022-06-14T21:07:50Z | OWNER | Here's the commit where I added that originally, including a test: https://github.com/simonw/sqlite-utils/commit/1a93b72ba710ea2271eaabc204685a27d2469374 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`maximize_csv_field_size_limit()` utility function 1269886084 | |
1155672675 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155672675 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E4ipj | simonw 9599 | 2022-06-14T20:19:07Z | 2022-06-14T20:19:07Z | OWNER | { "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | ||
1155672522 | https://github.com/simonw/sqlite-utils/issues/443#issuecomment-1155672522 | https://api.github.com/repos/simonw/sqlite-utils/issues/443 | IC_kwDOCGYnMM5E4inK | simonw 9599 | 2022-06-14T20:18:58Z | 2022-06-14T20:18:58Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make `utils.rows_from_file()` a documented API 1269998342 | ||
1155666672 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155666672 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E4hLw | simonw 9599 | 2022-06-14T20:11:52Z | 2022-06-14T20:11:52Z | OWNER | I'm going to rename |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155515426 | https://github.com/simonw/sqlite-utils/issues/441#issuecomment-1155515426 | https://api.github.com/repos/simonw/sqlite-utils/issues/441 | IC_kwDOCGYnMM5E38Qi | betatim 1448859 | 2022-06-14T17:53:43Z | 2022-06-14T17:53:43Z | NONE | That would be handy (additional where filters) but I think the trick with the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Combining `rows_where()` and `search()` to limit which rows are searched 1257724585 | |
1155421299 | https://github.com/simonw/sqlite-utils/issues/441#issuecomment-1155421299 | https://api.github.com/repos/simonw/sqlite-utils/issues/441 | IC_kwDOCGYnMM5E3lRz | simonw 9599 | 2022-06-14T16:23:52Z | 2022-06-14T16:23:52Z | OWNER | Actually I have a thought for something that could help here: I could add a mechanism for inserting additional where filters and parameters into that |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Combining `rows_where()` and `search()` to limit which rows are searched 1257724585 | |
1155389614 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155389614 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E3diu | simonw 9599 | 2022-06-14T15:54:03Z | 2022-06-14T15:54:03Z | OWNER | Filed an issue against |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155364367 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1155364367 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM5E3XYP | simonw 9599 | 2022-06-14T15:36:28Z | 2022-06-14T15:36:28Z | OWNER | Here's as far as I got with my initial prototype, in ```python from .db import Database as _Database, Table as _Table, View as _View import pandas as pd from typing import ( Iterable, Union, Optional, ) class Database(_Database): def query( self, sql: str, params: Optional[Union[Iterable, dict]] = None ) -> pd.DataFrame: return pd.DataFrame(super().query(sql, params))
class PandasQueryable: def rows_where( self, where: str = None, where_args: Optional[Union[Iterable, dict]] = None, order_by: str = None, select: str = "*", limit: int = None, offset: int = None, ) -> pd.DataFrame: return pd.DataFrame( super().rows_where( where, where_args, order_by=order_by, select=select, limit=limit, offset=offset, ) ) class Table(PandasQueryable, _Table): pass class View(PandasQueryable, _View): pass ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1155358637 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155358637 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E3V-t | simonw 9599 | 2022-06-14T15:31:34Z | 2022-06-14T15:31:34Z | OWNER | Getting this past
Which is legit here - we have a dictionary where one of the keys is |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155350755 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155350755 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E3UDj | simonw 9599 | 2022-06-14T15:25:18Z | 2022-06-14T15:25:18Z | OWNER | That broke
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155317293 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155317293 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E3L4t | simonw 9599 | 2022-06-14T15:04:01Z | 2022-06-14T15:04:01Z | OWNER | I think that's unavoidable: it looks like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 | |
1155310521 | https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155310521 | https://api.github.com/repos/simonw/sqlite-utils/issues/440 | IC_kwDOCGYnMM5E3KO5 | simonw 9599 | 2022-06-14T14:58:50Z | 2022-06-14T14:58:50Z | OWNER | Interesting challenge in writing tests for this: if you give
It decided the delimiter there was |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CSV files with too many values in a row cause errors 1250629388 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
issue 12