Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit c5e55b3

Browse files
authored
Merge 'Consume all rows' from Nikita Sivukhin
This PR upgrade turso_core to version `0.3.2`. This lead to regression, so few places also fixed in order to mitigate new issues. The main issue is that closing rows without error can silently reset all changes made within a statement. Go bindings for now can hit this behavior in case of `INSERT` with `RETURNING` clause as only one row will be consumed before clause for them (but final Done will not be reached) This PR explicitly consume all rows on Close if there were no error for the statement Reviewed-by: Preston Thorpe <preston@turso.tech> Closes #62
2 parents 9039583 + f253a60 commit c5e55b3

20 files changed

Lines changed: 76 additions & 18 deletions

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ env_logger = { version = "0.11.6", default-features = false }
1515
tracing = "0.1.41"
1616
tracing-appender = "0.2.3"
1717
tracing-subscriber = {version = "0.3.20", features = ["env-filter"] }
18-
turso_core = { version = "0.2.0" }
18+
turso_core = { version = "0.3.2" }

connection.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ func (tx *tursoTx) Commit() error {
447447
defer stmt.Close()
448448

449449
_, err := stmt.Exec(nil)
450+
if err != nil {
451+
if connErr := tx.conn.getError(); connErr != nil {
452+
err = connErr
453+
}
454+
}
450455
return err
451456
}
452457

libs/MANIFEST-SHA256.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
4d9eefabfbe73acd0689338b02ef0cfad60af67a698d941e55347e86b3455fef linux_amd64/libturso_go.so
2-
79563841b65d818d4a62eecfcc56ebe26ef3d3dc26599996af48a6dddf77ccdd linux_arm64/libturso_go.so
3-
7778ae2d0580d92cedbc00e96af8bbb86b3b88733370134b6c4788d389f3e003 darwin_amd64/libturso_go.dylib
4-
2ec716186ea285fb2b0dfd8765b6833e62771e240c8e73ac3ee0fa77f09135d9 darwin_arm64/libturso_go.dylib
5-
612ec40fa3115ae723047bd82bf30cba894b3b6b376ff879ab614978eab80f8b linux_musl_amd64/libturso_go.a
6-
584ea88c65b062f58bed256717ddaddc08ca3ee2e87b6c9e4b208d8a1f7710cf linux_musl_arm64/libturso_go.a
7-
b9eafafe344109935cace9fe026a7a03d8074c397797af46c9b3e76db9bbc114 windows_amd64/turso_go.dll
1+
77c5ce17c736780194ae3b77955d4e1fd9f261d5f895c45f7c69658676680818 linux_amd64/libturso_go.so
2+
ef47c6e23dc3c48f7be7a05c03d74a177c38bb41602d4fe895b0a1ecf9ada84c linux_arm64/libturso_go.so
3+
4088dca6f8ff3e64c7d94f550a523570b7671a301605bbd547712fcd62996ebc darwin_amd64/libturso_go.dylib
4+
8061fea6b656a343897e8a98a8e86d479b152b0652f5b1a7af243b1d25eaa1e4 darwin_arm64/libturso_go.dylib
5+
60117a7d739c389367d41bd4c2aeb812607f7862e25a2ceeb83eed9dbbdf21a9 linux_musl_amd64/libturso_go.a
6+
33539c31b92f50f80ea44e7517c97c19811b090dbe789f414a1f3aed8af4b1d9 linux_musl_arm64/libturso_go.a
7+
2d6296cec27e0d8024b15427766a07e7f47d6c116b3b0431479091237817f9d3 windows_amd64/turso_go.dll
784 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7778ae2d0580d92cedbc00e96af8bbb86b3b88733370134b6c4788d389f3e003
1+
4088dca6f8ff3e64c7d94f550a523570b7671a301605bbd547712fcd62996ebc
633 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2ec716186ea285fb2b0dfd8765b6833e62771e240c8e73ac3ee0fa77f09135d9
1+
8061fea6b656a343897e8a98a8e86d479b152b0652f5b1a7af243b1d25eaa1e4

0 commit comments

Comments
 (0)