mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 12:34:22 +01:00
- Changed `Cursor` trait to be able to get access to `root_page` - SQLite only updates last_insert_rowid for non-schema inserts. So we check if the `InsertAwait` is not for `root_page` before updating rowid In SQLite it looks like this: ``` sqlite> EXPLAIN SELECT last_insert_rowid(); addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 4 0 0 1 Function 0 0 1 last_insert_rowid(0) 0 2 ResultRow 1 1 0 0 3 Halt 0 0 0 0 4 Goto 0 1 0 0 ``` In limbo it will look like this: ``` limbo> EXPLAIN SELECT last_insert_rowid(); addr opcode p1 p2 p3 p4 p5 comment ---- ----------------- ---- ---- ---- ------------- -- ------- 0 Init 0 4 0 0 Start at 4 1 Function 0 2 1 last_insert_rowid 0 r[1]=func() 2 ResultRow 1 1 0 0 output=r[1] 3 Halt 0 0 0 0 4 Transaction 0 0 0 0 5 Goto 0 1 0 0 ``` Closes #427