Skip to content

Commit

Permalink
Merge pull request #34 from tursodatabase/bump-libsql
Browse files Browse the repository at this point in the history
Bump libsql dependency
  • Loading branch information
penberg authored Feb 1, 2024
2 parents 225aaa9 + 413dc31 commit 19db94e
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 56 deletions.
109 changes: 57 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ crate-type = ["cdylib"]

[dependencies]
pyo3 = "0.19.0"
libsql = { git = "https://github.com/tursodatabase/libsql/", rev = "52814a9841792330d290f950f2c49f49f6c77e42" }
libsql = { git = "https://github.com/tursodatabase/libsql/", rev = "b01500237f2a1cd137681ef1d86edf482e848c29" }
tokio = { version = "1.29.1", features = [ "rt-multi-thread" ] }
tracing-subscriber = "0.3"
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ fn connect(
auth_token,
Some(ver),
true,
None,
);
let result = rt.block_on(fut);
result.map_err(to_py_err)?
Expand Down Expand Up @@ -220,7 +221,7 @@ impl Cursor {
let mut rows = self_.rows.borrow_mut();
match rows.as_mut() {
Some(rows) => {
let row = rows.next().map_err(to_py_err)?;
let row = self_.rt.block_on(rows.next()).map_err(to_py_err)?;
match row {
Some(row) => {
let row = convert_row(self_.py(), row, rows.column_count())?;
Expand All @@ -244,7 +245,7 @@ impl Cursor {
// done before iterating.
if !*self_.done.borrow() {
for _ in 0..size {
let row = rows.next().map_err(to_py_err)?;
let row = self_.rt.block_on(rows.next()).map_err(to_py_err)?;
match row {
Some(row) => {
let row = convert_row(self_.py(), row, rows.column_count())?;
Expand All @@ -269,7 +270,7 @@ impl Cursor {
Some(rows) => {
let mut elements: Vec<Py<PyAny>> = vec![];
loop {
let row = rows.next().map_err(to_py_err)?;
let row = self_.rt.block_on(rows.next()).map_err(to_py_err)?;
match row {
Some(row) => {
let row = convert_row(self_.py(), row, rows.column_count())?;
Expand Down

0 comments on commit 19db94e

Please sign in to comment.