AnswerDotAI / AnswerDotAI/sqlite-minutils

last_rowid returns `int ROWID` on non-`int` PKs

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
9
PR merge metrics
No merged PRs in 30d

Description

## Description

Non-int last_pk are called incorrectly, or the table continues to have a ROWID. This results in that `last_id` check on any DB change returns the hidden `int ROWID` rather than whatever the pk was set to.

- https://www.sqlite.org/c3ref/last_insert_rowid.html
- https://www.sqlite.org/withoutrowid.html

## Test

```sh
python tests/test_upsert.py::test_upsert_with_hash_id
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.