If the `pk` column is a non-integer then `ROWID` and `pk` will return different types. Need to query by `lastrowid` to get `pk`s in SQLite prior to 3.35.0.
(self, cursor, table: type[Table])
| 701 | ########################################################################### |
| 702 | |
| 703 | async def _get_inserted_pk(self, cursor, table: type[Table]) -> Any: |
| 704 | """ |
| 705 | If the `pk` column is a non-integer then `ROWID` and `pk` will return |
| 706 | different types. Need to query by `lastrowid` to get `pk`s in SQLite |
| 707 | prior to 3.35.0. |
| 708 | """ |
| 709 | await cursor.execute( |
| 710 | f"SELECT {table._meta.primary_key._meta.db_column_name} FROM " |
| 711 | f"{table._meta.tablename} WHERE ROWID = {cursor.lastrowid}" |
| 712 | ) |
| 713 | response = await cursor.fetchone() |
| 714 | return response[table._meta.primary_key._meta.db_column_name] |
| 715 | |
| 716 | async def _run_in_new_connection( |
| 717 | self, |
no outgoing calls
no test coverage detected