Commit 59f198b
refactor(merge_insert): adapt insertIntoPksTableAndGetPk for Rust/C pks schema (TASK-149)
- Unpack pk_blob into individual PK column values using codec.unpack
- Build dynamic INSERT: INSERT INTO pks (__crsql_key, col1, col2) VALUES (NULL, ?, ?)
- Bind unpacked values in PK order
- Return auto-generated __crsql_key via last_insert_rowid()
- Remove base_rowid parameter from function signature
- Update call sites in changes_vtab.zig to use new signature
- Fix line 1744 to call insertOrUpdateColumn (was missing insertIntoBaseTable)
- Mark TableMergeStmts.sql_insert_pks as DEPRECATED (old schema)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 033b2af commit 59f198b
File tree
3 files changed
+421
-600
lines changed- .tasks/active
- zig/src
3 files changed
+421
-600
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | | - | |
| 1713 | + | |
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
| |||
1741 | 1741 | | |
1742 | 1742 | | |
1743 | 1743 | | |
1744 | | - | |
1745 | | - | |
| 1744 | + | |
| 1745 | + | |
1746 | 1746 | | |
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
1751 | | - | |
| 1751 | + | |
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| |||
0 commit comments