Update `sqlite` dependency to 0.32.0
This commit is contained in:
parent
f9df360171
commit
f0754330c9
|
|
@ -3129,9 +3129,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlite"
|
name = "sqlite"
|
||||||
version = "0.31.0"
|
version = "0.32.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f3ddda64c469a257a3b31298805427784d992c226c94b81003f96e8b122286ad"
|
checksum = "03801c10193857d6a4a71ec46cee198a15cbc659622aabe1db0d0bdbefbcf8e6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"sqlite3-sys",
|
"sqlite3-sys",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ fastrand = { version = "2.0.0", default-features = false, optional = true }
|
||||||
multibase = { version = "0.9.1" }
|
multibase = { version = "0.9.1" }
|
||||||
ec25519 = { version = "0.1.0", features = [] }
|
ec25519 = { version = "0.1.0", features = [] }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
sqlite = { version = "0.31.0", optional = true }
|
sqlite = { version = "0.32.0", optional = true }
|
||||||
thiserror = { version = "1" }
|
thiserror = { version = "1" }
|
||||||
zeroize = { version = "1.5.7" }
|
zeroize = { version = "1.5.7" }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ qcheck = { version = "1", default-features = false, optional = true }
|
||||||
# N.b. this is required to use macros, even though it's re-exported
|
# N.b. this is required to use macros, even though it's re-exported
|
||||||
# through radicle
|
# through radicle
|
||||||
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
|
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
|
||||||
sqlite = { version = "0.31.0" }
|
sqlite = { version = "0.32.0" }
|
||||||
scrypt = { version = "0.10.0", default-features = false }
|
scrypt = { version = "0.10.0", default-features = false }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = { version = "1", features = ["preserve_order"] }
|
serde_json = { version = "1", features = ["preserve_order"] }
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ impl GossipStore {
|
||||||
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
||||||
let db = sql::Connection::open_with_flags(
|
let db = sql::Connection::open_with_flags(
|
||||||
path,
|
path,
|
||||||
sqlite::OpenFlags::new().set_read_write().set_full_mutex(),
|
sqlite::OpenFlags::new().with_read_write().with_full_mutex(),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(Self { db })
|
Ok(Self { db })
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = { version = "1", features = ["preserve_order"] }
|
serde_json = { version = "1", features = ["preserve_order"] }
|
||||||
siphasher = { version = "0.3.10" }
|
siphasher = { version = "0.3.10" }
|
||||||
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
|
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
|
||||||
sqlite = { version = "0.31.0", features = ["bundled"] }
|
sqlite = { version = "0.32.0", features = ["bundled"] }
|
||||||
tempfile = { version = "3.3.0" }
|
tempfile = { version = "3.3.0" }
|
||||||
thiserror = { version = "1" }
|
thiserror = { version = "1" }
|
||||||
unicode-normalization = { version = "0.1" }
|
unicode-normalization = { version = "0.1" }
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,9 @@ impl Book {
|
||||||
let db = sql::Connection::open_with_flags(
|
let db = sql::Connection::open_with_flags(
|
||||||
path,
|
path,
|
||||||
sqlite::OpenFlags::new()
|
sqlite::OpenFlags::new()
|
||||||
.set_create()
|
.with_create()
|
||||||
.set_read_write()
|
.with_read_write()
|
||||||
.set_full_mutex(),
|
.with_full_mutex(),
|
||||||
)?;
|
)?;
|
||||||
db.execute(Self::SCHEMA)?;
|
db.execute(Self::SCHEMA)?;
|
||||||
|
|
||||||
|
|
@ -65,7 +65,7 @@ impl Book {
|
||||||
/// Same as [`Self::open`], but in read-only mode. This is useful to have multiple
|
/// Same as [`Self::open`], but in read-only mode. This is useful to have multiple
|
||||||
/// open databases, as no locking is required.
|
/// open databases, as no locking is required.
|
||||||
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
||||||
let db = sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
|
let db = sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
|
||||||
db.execute(Self::SCHEMA)?;
|
db.execute(Self::SCHEMA)?;
|
||||||
|
|
||||||
Ok(Self { db })
|
Ok(Self { db })
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ impl Table {
|
||||||
/// open databases, as no locking is required.
|
/// open databases, as no locking is required.
|
||||||
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
||||||
let mut db =
|
let mut db =
|
||||||
sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
|
sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
|
||||||
db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
|
db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
|
||||||
db.execute(Self::SCHEMA)?;
|
db.execute(Self::SCHEMA)?;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ impl Config<Read> {
|
||||||
/// open databases, as no locking is required.
|
/// open databases, as no locking is required.
|
||||||
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
|
||||||
let mut db =
|
let mut db =
|
||||||
sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
|
sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
|
||||||
db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
|
db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
|
||||||
db.execute(Self::SCHEMA)?;
|
db.execute(Self::SCHEMA)?;
|
||||||
|
|
||||||
|
|
@ -67,8 +67,10 @@ impl Config<Read> {
|
||||||
|
|
||||||
/// Create a new in-memory address book.
|
/// Create a new in-memory address book.
|
||||||
pub fn memory() -> Result<Self, Error> {
|
pub fn memory() -> Result<Self, Error> {
|
||||||
let db =
|
let db = sql::Connection::open_with_flags(
|
||||||
sql::Connection::open_with_flags(":memory:", sqlite::OpenFlags::new().set_read_only())?;
|
":memory:",
|
||||||
|
sqlite::OpenFlags::new().with_read_only(),
|
||||||
|
)?;
|
||||||
db.execute(Self::SCHEMA)?;
|
db.execute(Self::SCHEMA)?;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue