github
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/pull/537#issuecomment-1539157643 | https://api.github.com/repos/simonw/sqlite-utils/issues/537 | 1539157643 | IC_kwDOCGYnMM5bva6L | 9599 | 2023-05-08T22:45:09Z | 2023-05-08T22:45:21Z | OWNER | Here's an example from the new tests: https://github.com/simonw/sqlite-utils/blob/a75abeb61b91a28650d3b9933e7ec80ad0d92529/tests/test_create.py#L291-L307 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1665200812 | |
https://github.com/simonw/sqlite-utils/pull/537#issuecomment-1539055393 | https://api.github.com/repos/simonw/sqlite-utils/issues/537 | 1539055393 | IC_kwDOCGYnMM5bvB8h | 9599 | 2023-05-08T21:10:06Z | 2023-05-08T21:10:06Z | OWNER | Thanks! | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1665200812 | |
https://github.com/simonw/sqlite-utils/pull/528#issuecomment-1539053230 | https://api.github.com/repos/simonw/sqlite-utils/issues/528 | 1539053230 | IC_kwDOCGYnMM5bvBau | 9599 | 2023-05-08T21:08:23Z | 2023-05-08T21:08:23Z | OWNER | I fixed this in: - #527 Will fully remove this misfeature in: - #542 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1578793661 | |
https://github.com/simonw/sqlite-utils/pull/519#issuecomment-1539058795 | https://api.github.com/repos/simonw/sqlite-utils/issues/519 | 1539058795 | IC_kwDOCGYnMM5bvCxr | 9599 | 2023-05-08T21:12:52Z | 2023-05-08T21:12:52Z | OWNER | This is a really neat fix, thank you. | {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0} | 1505568103 | |
https://github.com/simonw/sqlite-utils/pull/515#issuecomment-1539077777 | https://api.github.com/repos/simonw/sqlite-utils/issues/515 | 1539077777 | IC_kwDOCGYnMM5bvHaR | 9599 | 2023-05-08T21:27:10Z | 2023-05-08T21:27:10Z | OWNER | I should have spotted this PR before I shipped my own fix! https://github.com/simonw/sqlite-utils/commit/2376c452a56b0c3e75e7ca698273434e32945304 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194930 | |
https://github.com/simonw/sqlite-utils/issues/542#issuecomment-1539052467 | https://api.github.com/repos/simonw/sqlite-utils/issues/542 | 1539052467 | IC_kwDOCGYnMM5bvBOz | 9599 | 2023-05-08T21:07:41Z | 2023-05-08T21:07:41Z | OWNER | Relevant commits (will mostly revert these): - https://github.com/simonw/sqlite-utils/commit/455c35b512895c19bf922c2b804d750d27cb8dbd - https://github.com/simonw/sqlite-utils/commit/e0ec4c345129996011951e400388fd74865f65a2 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1700936245 | |
https://github.com/simonw/sqlite-utils/issues/541#issuecomment-1538963959 | https://api.github.com/repos/simonw/sqlite-utils/issues/541 | 1538963959 | IC_kwDOCGYnMM5burn3 | 9599 | 2023-05-08T19:59:34Z | 2023-05-08T19:59:34Z | OWNER | There are 8 failing tests left: ``` ==== short test summary info ==== FAILED tests/test_cli_memory.py::test_memory_csv[False-test] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_cli_memory.py::test_memory_csv[False-t] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_cli_memory.py::test_memory_csv[False-t1] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_cli_memory.py::test_memory_tsv[False] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_cli_memory.py::test_memory_dump[extra_args0] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_cli_memory.py::test_memory_two_files_with_same_stem - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> FAILED tests/test_recipes.py::test_dateparse_errors[None-parsedate] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Table.convert.<locals>.convert_value at 0x106bcaca0> FAILED tests/test_recipes.py::test_dateparse_errors[None-parsedatetime] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Table.convert.<locals>.convert_value at 0x106bc9620> ERROR tests/test_cli.py::test_upsert_analyze - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> ==== 8 failed, 894 passed, 4 skipped, 1 error in 6.27s ==== ``` Full traceback here: https://gist.github.com/simonw/b40b3e814729d6c02a0302a84ce54d9e | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1700840265 | |
https://github.com/simonw/sqlite-utils/issues/540#issuecomment-1537744000 | https://api.github.com/repos/simonw/sqlite-utils/issues/540 | 1537744000 | IC_kwDOCGYnMM5bqByA | 42327 | 2023-05-08T04:56:12Z | 2023-05-08T04:56:12Z | NONE | Hey @simonw, urllib3 maintainer here :wave: Sorry for breaking your CI. I understand you may prefer to pin the Python version, but note that specifying just `python: "3"` will get you the latest. We use that in urllib3: https://github.com/urllib3/urllib3/blob/main/.readthedocs.yml I can open PRs to sqlite-utils / datasette if you're interested | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1699184583 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538975545 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538975545 | IC_kwDOCGYnMM5buuc5 | 1231935 | 2023-05-08T20:06:35Z | 2023-05-08T20:06:35Z | NONE | perfect, thank you! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538921774 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538921774 | IC_kwDOCGYnMM5buhUu | 9599 | 2023-05-08T19:24:41Z | 2023-05-08T19:24:41Z | OWNER | That fix seems to work! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538910894 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538910894 | IC_kwDOCGYnMM5buequ | 9599 | 2023-05-08T19:16:52Z | 2023-05-08T19:17:00Z | OWNER | How about if I had logic which checked that all not-null columns were provided in the call to `upsert_all()` - and if they were, modified the `INSERT OR IGNORE INTO` to include a placeholder value for those columns that would then be fixed by the later `UPDATE`? Something like this: ```python [ ('INSERT OR IGNORE INTO [comments]([id], name) VALUES(?, ?);', [1, '']), ('UPDATE [comments] SET [name] = ? WHERE [id] = ?', ['Cleo', 1]) ] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538903556 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538903556 | IC_kwDOCGYnMM5buc4E | 9599 | 2023-05-08T19:11:24Z | 2023-05-08T19:13:23Z | OWNER | I could detect if this happens using `cursor.rowcount` - not sure how I would recover from it though. This would also require some major re-engineering, since currently it all works by generating a list of SQL queries in advance and applying them inside a loop in `.insert_chunk()`: https://github.com/simonw/sqlite-utils/blob/80763edaa2bdaf1113717378b8d62075c4dcbcfb/sqlite_utils/db.py#L2839-L2878 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538893329 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538893329 | IC_kwDOCGYnMM5buaYR | 9599 | 2023-05-08T19:04:47Z | 2023-05-08T19:04:47Z | OWNER | This feels like a fundamental flaw in the way upserts are implemented by `sqlite-utils`. One fix would be to switch to using the `UPSERT` feature in SQLite: https://www.sqlite.org/lang_UPSERT.html But... > UPSERT syntax was added to SQLite with version 3.24.0 (2018-06-04). I still want to support SQLite versions earlier than that. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538889482 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538889482 | IC_kwDOCGYnMM5buZcK | 9599 | 2023-05-08T19:02:38Z | 2023-05-08T19:02:38Z | OWNER | Here's the code at fault: https://github.com/simonw/sqlite-utils/blob/80763edaa2bdaf1113717378b8d62075c4dcbcfb/sqlite_utils/db.py#L2774-L2788 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538887361 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538887361 | IC_kwDOCGYnMM5buY7B | 9599 | 2023-05-08T19:01:20Z | 2023-05-08T19:01:20Z | OWNER | Here's the problem: ```python import sqlite3 db = sqlite3.connect(":memory:") db.execute('create table foo (id integer primary key, name not null)') db.execute('insert into foo (id) values (1)') ``` Produces: ``` IntegrityError: NOT NULL constraint failed: foo.name ``` But this: ```python db.execute('insert or ignore into foo (id) values (1)') ``` Completes without an exception. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538801855 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538801855 | IC_kwDOCGYnMM5buEC_ | 9599 | 2023-05-08T18:00:17Z | 2023-05-08T18:00:17Z | OWNER | From time in the debugger, after creating the table it ends up doing this: ``` (Pdb) queries_and_params [ ('INSERT OR IGNORE INTO [comments]([id]) VALUES(?);', [1]), ('UPDATE [comments] SET [name] = ? WHERE [id] = ?', ['Cleo', 1]) ] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/538#issuecomment-1538793817 | https://api.github.com/repos/simonw/sqlite-utils/issues/538 | 1538793817 | IC_kwDOCGYnMM5buCFZ | 9599 | 2023-05-08T17:55:10Z | 2023-05-08T17:55:10Z | OWNER | Confirmed - I added this test and it fails: ```python def test_upsert_all_not_null(fresh_db): # https://github.com/simonw/sqlite-utils/issues/538 fresh_db["comments"].upsert_all( [{"id": 1, "name": "Cleo"}], pk="id", not_null=["name"], ) assert list(fresh_db["comments"].rows) == [{"id": 1, "name": "Cleo"}] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1695428235 | |
https://github.com/simonw/sqlite-utils/issues/534#issuecomment-1538933540 | https://api.github.com/repos/simonw/sqlite-utils/issues/534 | 1538933540 | IC_kwDOCGYnMM5bukMk | 9599 | 2023-05-08T19:34:37Z | 2023-05-08T19:34:37Z | OWNER | On macOS this shows the same warning: ``` % python -Wdefault $(which sqlite-utils) insert dogs.db dogs dogs.csv --csv [############------------------------] 35% [####################################] 100%/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/cli.py:1187: ResourceWarning: unclosed file <_io.TextIOWrapper name='dogs.csv' encoding='utf-8-sig'> insert_upsert_implementation( ResourceWarning: Enable tracemalloc to get the object allocation traceback ``` The file itself is a `click.File` which is automatically closed - https://click.palletsprojects.com/en/8.1.x/api/#click.File - but it looks like it's the `_io.TextIOWrapper` which is not being closed: https://github.com/simonw/sqlite-utils/blob/2376c452a56b0c3e75e7ca698273434e32945304/sqlite_utils/cli.py#L949-L956 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1622640374 | |
https://github.com/simonw/sqlite-utils/issues/532#issuecomment-1539009453 | https://api.github.com/repos/simonw/sqlite-utils/issues/532 | 1539009453 | IC_kwDOCGYnMM5bu2ut | 9599 | 2023-05-08T20:30:29Z | 2023-05-08T20:30:42Z | OWNER | Here's an improvement: ``` % sqlite-utils insert /tmp/b.db blah /tmp/blah.txt [####################################] 100% Error: Invalid JSON - use --csv for CSV or --tsv for TSV files JSON error: Expecting value: line 1 column 1 (char 0) ``` | {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1620254998 | |
https://github.com/simonw/sqlite-utils/issues/532#issuecomment-1539006509 | https://api.github.com/repos/simonw/sqlite-utils/issues/532 | 1539006509 | IC_kwDOCGYnMM5bu2At | 9599 | 2023-05-08T20:28:56Z | 2023-05-08T20:28:56Z | OWNER | Was this a newline-delimited JSON file perhaps? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1620254998 | |
https://github.com/simonw/sqlite-utils/issues/530#issuecomment-1539018912 | https://api.github.com/repos/simonw/sqlite-utils/issues/530 | 1539018912 | IC_kwDOCGYnMM5bu5Cg | 9599 | 2023-05-08T20:39:00Z | 2023-05-08T20:39:00Z | OWNER | I think the natural place to add these in the Python library API would be https://sqlite-utils.datasette.io/en/stable/python-api.html#adding-foreign-key-constraints - maybe something like this: ```python db["books"].add_foreign_key("author_id", "authors", "id", on_delete=RESTRICT) ``` Then for the CLI tool could be added to https://sqlite-utils.datasette.io/en/stable/cli-reference.html#add-foreign-key ``` sqlite-utils add-foreign-key my.db books author_id authors id --on-update SET_NULL ``` I wouldn't support these for the other methods of adding foreign keys - `foreign_keys(...)` for the various `.insert()` etc methods and the `add_foreign_keys(...)` bulk menthod. | {"total_count": 1, "+1": 0, "-1": 0, "laugh": 1, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1595340692 | |
https://github.com/simonw/sqlite-utils/issues/530#issuecomment-1539015064 | https://api.github.com/repos/simonw/sqlite-utils/issues/530 | 1539015064 | IC_kwDOCGYnMM5bu4GY | 9599 | 2023-05-08T20:35:07Z | 2023-05-08T20:35:07Z | OWNER | Wow, this is a neat feature I didn't know about. Looks like there are a bunch of options: - NO ACTION (default) - RESTRICT: application is prohibited from deleting a parent key when there exists one or more child keys mapped to it - SET NULL: when a parent key is deleted the child key columns of all rows in the child table that mapped to the parent key are set to contain SQL NULL values - SET DEFAULT: set a specific default - CASCADE: propagates the delete or update operation on the parent key to each dependent child key | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1595340692 | |
https://github.com/simonw/sqlite-utils/issues/527#issuecomment-1539051724 | https://api.github.com/repos/simonw/sqlite-utils/issues/527 | 1539051724 | IC_kwDOCGYnMM5bvBDM | 9599 | 2023-05-08T21:07:04Z | 2023-05-08T21:07:04Z | OWNER | Updated documentation: - https://sqlite-utils.datasette.io/en/latest/python-api.html#converting-data-in-columns - https://sqlite-utils.datasette.io/en/latest/cli.html#converting-data-in-columns - https://sqlite-utils.datasette.io/en/latest/cli-reference.html#convert | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1578790070 | |
https://github.com/simonw/sqlite-utils/issues/527#issuecomment-1539035838 | https://api.github.com/repos/simonw/sqlite-utils/issues/527 | 1539035838 | IC_kwDOCGYnMM5bu9K- | 9599 | 2023-05-08T20:55:00Z | 2023-05-08T20:55:00Z | OWNER | I'm going to go with `--no-skip-false` as the CLI option. It's ugly, but this whole thing is ugly. I'm going to make a note to remove this misfeature in `sqlite-utils` 4. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1578790070 | |
https://github.com/simonw/sqlite-utils/issues/527#issuecomment-1539033736 | https://api.github.com/repos/simonw/sqlite-utils/issues/527 | 1539033736 | IC_kwDOCGYnMM5bu8qI | 9599 | 2023-05-08T20:52:51Z | 2023-05-08T20:52:51Z | OWNER | OK, I implemented that at the Python API level. I need to decide how it should work for the `sqlite-utils convert` command too: https://sqlite-utils.datasette.io/en/stable/cli-reference.html#convert | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1578790070 | |
https://github.com/simonw/sqlite-utils/issues/525#issuecomment-1539108140 | https://api.github.com/repos/simonw/sqlite-utils/issues/525 | 1539108140 | IC_kwDOCGYnMM5bvO0s | 9599 | 2023-05-08T21:59:41Z | 2023-05-08T21:59:41Z | OWNER | That original example passes against `main` now. | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1575131737 | |
https://github.com/simonw/sqlite-utils/issues/525#issuecomment-1539101853 | https://api.github.com/repos/simonw/sqlite-utils/issues/525 | 1539101853 | IC_kwDOCGYnMM5bvNSd | 9599 | 2023-05-08T21:52:44Z | 2023-05-08T21:52:44Z | OWNER | I like the `lambda-{uuid}` idea. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1575131737 | |
https://github.com/simonw/sqlite-utils/issues/520#issuecomment-1539109587 | https://api.github.com/repos/simonw/sqlite-utils/issues/520 | 1539109587 | IC_kwDOCGYnMM5bvPLT | 9599 | 2023-05-08T22:00:46Z | 2023-05-08T22:00:46Z | OWNER | > Hey, isn't this essentially the same issue as #448 ? Yes it is, good catch! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1516644980 | |
https://github.com/simonw/sqlite-utils/issues/514#issuecomment-1539100300 | https://api.github.com/repos/simonw/sqlite-utils/issues/514 | 1539100300 | IC_kwDOCGYnMM5bvM6M | 9599 | 2023-05-08T21:50:51Z | 2023-05-08T21:50:51Z | OWNER | Seeing as `sqlite-utils` doesn't currently provide mechanisms for adding `check` constraints like this I'm going to leave this - I'm happy with the fix I put in for the `not null` constraints. | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194249 | |
https://github.com/simonw/sqlite-utils/issues/514#issuecomment-1539099703 | https://api.github.com/repos/simonw/sqlite-utils/issues/514 | 1539099703 | IC_kwDOCGYnMM5bvMw3 | 9599 | 2023-05-08T21:50:06Z | 2023-05-08T21:50:06Z | OWNER | Applying the fix from the PR here doesn't fix the above problem either: - https://github.com/simonw/sqlite-utils/pull/515 So it looks like these kinds of `check` constraints currently aren't compatible with how `upsert()` works. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194249 | |
https://github.com/simonw/sqlite-utils/issues/514#issuecomment-1539094287 | https://api.github.com/repos/simonw/sqlite-utils/issues/514 | 1539094287 | IC_kwDOCGYnMM5bvLcP | 9599 | 2023-05-08T21:44:11Z | 2023-05-08T21:44:11Z | OWNER | OK, this fails silently: ```python import sqlite_utils db = sqlite_utils.Database(memory=True) db.execute('''CREATE TABLE employees ( id INTEGER PRIMARY KEY, name TEXT, age INTEGER, salary REAL, CHECK (salary is not null and salary > 0) );''') db["employees"].upsert({"id": 1, "name": "Bob"}, pk="id") list(db["employees"].rows) ```` It outputs: ```python [] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194249 | |
https://github.com/simonw/sqlite-utils/issues/514#issuecomment-1539079507 | https://api.github.com/repos/simonw/sqlite-utils/issues/514 | 1539079507 | IC_kwDOCGYnMM5bvH1T | 9599 | 2023-05-08T21:28:37Z | 2023-05-08T21:28:37Z | OWNER | > This means that a table with NON NULL (or other constraint) columns that aren't part of the pkey can't have new rows upserted. Huh... on that basis, it's possible my fix in https://github.com/simonw/sqlite-utils/commit/2376c452a56b0c3e75e7ca698273434e32945304 is incomplete. I only covered the 'not null' case. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194249 | |
https://github.com/simonw/sqlite-utils/issues/514#issuecomment-1539078429 | https://api.github.com/repos/simonw/sqlite-utils/issues/514 | 1539078429 | IC_kwDOCGYnMM5bvHkd | 9599 | 2023-05-08T21:27:40Z | 2023-05-08T21:27:40Z | OWNER | Dupe of: - #538 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1465194249 | |
https://github.com/simonw/sqlite-utils/issues/448#issuecomment-1539109816 | https://api.github.com/repos/simonw/sqlite-utils/issues/448 | 1539109816 | IC_kwDOCGYnMM5bvPO4 | 9599 | 2023-05-08T22:01:00Z | 2023-05-08T22:01:00Z | OWNER | This is being handled in: - #520 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1279144769 |