Skip to content

Commit

Permalink
Merge pull request #3851 from weiznich/bump/sqlite_0.27
Browse files Browse the repository at this point in the history
Bump libsqlite to allow 0.27
  • Loading branch information
weiznich authored Nov 13, 2023
2 parents b51567f + a748df9 commit ae9e90a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion diesel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.66.0"
byteorder = { version = "1.0", optional = true }
chrono = { version = "0.4.20", optional = true, default-features = false, features = ["clock", "std"] }
libc = { version = "0.2.0", optional = true }
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", optional = true, features = ["bundled_bindings"] }
libsqlite3-sys = { version = ">=0.17.2, <0.28.0", optional = true, features = ["bundled_bindings"] }
mysqlclient-sys = { version = "0.2.5", optional = true }
pq-sys = { version = "0.4.0", optional = true }
quickcheck = { version = "1.0.3", optional = true }
Expand Down
2 changes: 2 additions & 0 deletions diesel/src/sqlite/connection/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ impl RawConnection {
}

pub(super) fn deserialize(&mut self, data: &[u8]) -> QueryResult<()> {
// the cast for `ffi::SQLITE_DESERIALIZE_READONLY` is required for old libsqlite3-sys versions
#[allow(clippy::unnecessary_cast)]
unsafe {
let result = ffi::sqlite3_deserialize(
self.internal_connection.as_ptr(),
Expand Down
2 changes: 2 additions & 0 deletions diesel/src/sqlite/connection/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ impl Statement {
) -> QueryResult<Self> {
let mut stmt = ptr::null_mut();
let mut unused_portion = ptr::null();
// the cast for `ffi::SQLITE_PREPARE_PERSISTENT` is required for old libsqlite3-sys versions
#[allow(clippy::unnecessary_cast)]
let prepare_result = unsafe {
ffi::sqlite3_prepare_v3(
raw_connection.internal_connection.as_ptr(),
Expand Down
2 changes: 1 addition & 1 deletion diesel_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ heck = "0.4.0"
serde = { version = "1.0.0", features = ["derive"] }
toml = "0.8"
url = { version = "2.2.2" }
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", optional = true }
libsqlite3-sys = { version = ">=0.17.2, <0.28.0", optional = true }
diffy = "0.3.0"
regex = "1.0.6"
serde_regex = "1.1"
Expand Down
2 changes: 1 addition & 1 deletion diesel_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ipnet = { version = "2.5.0" }
ipnetwork = ">=0.12.2, <0.21.0"
bigdecimal = ">= 0.0.13, < 0.5.0"
rand = "0.8.4"
libsqlite3-sys = { version = "0.26", optional = true }
libsqlite3-sys = { version = "0.27", optional = true }

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion examples/sqlite/all_about_inserts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "c
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
chrono = { version = "0.4.20", default-features = false, features = ["clock", "std"] }
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] }
libsqlite3-sys = { version = "0.27.0", features = ["bundled"] }

[lib]
doc = false
2 changes: 1 addition & 1 deletion examples/sqlite/getting_started_step_1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false
[dependencies]
diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite"] }
dotenvy = "0.15"
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] }
libsqlite3-sys = { version = "0.27.0", features = ["bundled"] }

[[bin]]
name = "show_posts"
Expand Down
2 changes: 1 addition & 1 deletion examples/sqlite/getting_started_step_2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
[dependencies]
diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] }
dotenvy = "0.15"
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] }
libsqlite3-sys = { version = "0.27.0", features = ["bundled"] }

[[bin]]
name = "show_posts"
Expand Down
2 changes: 1 addition & 1 deletion examples/sqlite/getting_started_step_3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
[dependencies]
diesel = { version = "2.1.0", path = "../../../diesel", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] }
dotenvy = "0.15"
libsqlite3-sys = { version = ">=0.17.2, <0.27.0", features = ["bundled"] }
libsqlite3-sys = { version = "0.27.0", features = ["bundled"] }

[[bin]]
name = "show_posts"
Expand Down

0 comments on commit ae9e90a

Please sign in to comment.