tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Breaking change: Make Rows and Row API more consistent. #1623

Closed ignatz closed 1 month ago

ignatz commented 1 month ago
A few notes: I went the path of least resistance also assuming it would
break fewer folks, i.e. make Row more like Rows and thus usize -> i32.

Arguably, an unsigned type might be more appropriate both for length and
indexes. I understand that the i32 stems from the sqlite bindings, which
returns/accepts c_ints. Yet, Statement and Row made the jump to an
unsigned, probably drawing the same conclusion, whereas Rows preserved
its proximity to the c-bindings. This is probably an artifact?

Also going on a limb, mapping c_int -> i32 is already a non-portable
choice, with precision for c_int being platform dependent.