diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/Cargo.toml .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/Cargo.toml 15c15 < version = "0.7.0" --- > version = "0.8.0" 41a42,44 > [features] > bundled = ["rusqlite/bundled"] > 53a57,60 > [[test]] > name = "tests" > path = "tests/tests.rs" > 58c65 < version = "~0.33" --- > version = "~0.34" 65c72 < version = "~0.33" --- > version = "~0.34" 70,73c77,80 < features = ["full"] < < [features] < bundled = ["rusqlite/bundled"] --- > features = [ > "rt-multi-thread", > "macros", > ] diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/Cargo.toml.orig .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/Cargo.toml.orig 3c3 < version = "0.7.0" --- > version = "0.8.0" 18c18 < rusqlite = "~0.33" --- > rusqlite = "~0.34" 22,23c22,26 < rusqlite = { version = "~0.33", features = ["bundled"] } < tokio = { version = "^1.43", features = ["full"] } --- > rusqlite = { version = "~0.34", features = ["bundled"] } > tokio = { version = "^1.43", features = ["rt-multi-thread", "macros"] } > > [[test]] > name = "tests" diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/.cargo_vcs_info.json .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/.cargo_vcs_info.json 3c3 < "sha1": "4fe5adffbf51acd1abd0ae1af0e3b5b61b74be60" --- > "sha1": "fc2779b3e3c505efbf224537e68313eaa816ef20" diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/CHANGELOG.md .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/CHANGELOG.md 10a11,15 > # 0.8.0 (6 Mar 2025) > > - **updated:** To latest [rusqlite] version (`0.34`). > - **updated:** Refactor `Error` mainly by https://github.com/programatik29/tokio-rusqlite/pull/39. > Common subdirectories: .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/examples and .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/examples diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/.gitignore .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/.gitignore 7a8 > !/tests diff '--color=auto' -x Cargo.lock -d .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/README.md .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/README.md 1,3c1 < [![License](https://img.shields.io/crates/l/tokio-rusqlite)](https://choosealicense.com/licenses/mit/) < [![Crates.io](https://img.shields.io/crates/v/tokio-rusqlite)](https://crates.io/crates/tokio-rusqlite) < [![Docs - Stable](https://img.shields.io/crates/v/tokio-rusqlite?color=blue&label=docs)](https://docs.rs/tokio-rusqlite/) --- > # Tokio-Rusqlite-New 5c3,9 < # tokio-rusqlite-new --- > [![Crate](https://img.shields.io/crates/v/tokio-rusqlite-new.svg)](https://crates.io/crates/tokio-rusqlite-new) > [![GitHub last commit](https://img.shields.io/github/last-commit/xuxiaocheng0201/tokio-rusqlite)](https://github.com/xuxiaocheng0201/tokio-rusqlite/commits/master) > [![GitHub issues](https://img.shields.io/github/issues-raw/xuxiaocheng0201/tokio-rusqlite)](https://github.com/xuxiaocheng0201/tokio-rusqlite/issues) > [![GitHub pull requests](https://img.shields.io/github/issues-pr/xuxiaocheng0201/tokio-rusqlite)](https://github.com/xuxiaocheng0201/tokio-rusqlite/pulls) > [![GitHub](https://img.shields.io/github/license/xuxiaocheng0201/tokio-rusqlite)](https://github.com/xuxiaocheng0201/tokio-rusqlite/blob/master/LICENSE) > > ## Description 11c15,31 < # Usage --- > ## Guide > > This library provides [`Connection`] struct. > The [`Connection`] struct is a handle to call functions in background thread and can be cloned cheaply. > [`Connection::call`] method calls provided function in the background thread and returns its result asynchronously. > > [`Connection`]: https://docs.rs/tokio-rusqlite-new/latest/tokio_rusqlite_new/struct.Connection.html > [`Connection::call`]: https://docs.rs/tokio-rusqlite-new/latest/tokio_rusqlite_new/struct.Connection.html#method.call > > ## Design > > A thread is spawned for each opened connection handle. When `call` method > is called: provided function is boxed, sent to the thread through mpsc > channel and executed. Return value is then sent by oneshot channel from > the thread and then returned from function. > > ## Usage 14c34,35 < use tokio_rusqlite::{params, Connection, Result}; --- > use rusqlite::params; > use tokio_rusqlite_new::{Connection, Result}; 27,36c48,56 < let people = conn < .call(|conn| { < conn.execute( < "CREATE TABLE person ( < id INTEGER PRIMARY KEY, < name TEXT NOT NULL, < data BLOB < )", < [], < )?; --- > let people = conn.call(|conn| { > conn.execute( > "CREATE TABLE person ( > id INTEGER PRIMARY KEY, > name TEXT NOT NULL, > data BLOB > )", > [], > )?; 38,43c58,62 < let steven = < Person { < id: 1, < name: "Steven".to_string(), < data: None, < }; --- > let steven = Person { > id: 1, > name: "Steven".to_string(), > data: None, > }; 45,48c64,67 < conn.execute( < "INSERT INTO person (name, data) VALUES (?1, ?2)", < params![steven.name, steven.data], < )?; --- > conn.execute( > "INSERT INTO person (id, name, data) VALUES (?1, ?2, ?3)", > params![steven.id, steven.name, steven.data], > )?; 50,59c69,78 < let mut stmt = conn.prepare("SELECT id, name, data FROM person")?; < let people = stmt < .query_map([], |row| { < Ok(Person { < id: row.get(0)?, < name: row.get(1)?, < data: row.get(2)?, < }) < })? < .collect::, rusqlite::Error>>()?; --- > let mut stmt = conn.prepare("SELECT id, name, data FROM person")?; > let people = stmt > .query_map([], |row| { > Ok(Person { > id: row.get(0)?, > name: row.get(1)?, > data: row.get(2)?, > }) > })? > .collect::, rusqlite::Error>>()?; 61,63c80,82 < Ok(people) < }) < .await?; --- > Ok(people) > }) > .await?; 74c93 < # Safety --- > ## Safety 78c97 < # License --- > ## License Common subdirectories: .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rusqlite-new-0.7.0/src and .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/src Only in .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rusqlite-new-0.8.0/: tests