Skip to content

Commit f102448

Browse files
authored
Bump rusqlite to 0.37 (nushell#16684)
1 parent 9090431 commit f102448

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

Cargo.lock

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ rmp-serde = "1.3"
151151
roxmltree = "0.20"
152152
rstest = { version = "0.23", default-features = false }
153153
rstest_reuse = "0.7"
154-
rusqlite = "0.31"
154+
rusqlite = "0.37"
155155
rust-embed = "8.7.0"
156156
# We have to fix rustls and ureq versions
157157
# because we use unversioned api to allow users set up their own
@@ -283,7 +283,6 @@ plugin = [
283283
"nu-cmd-lang/plugin",
284284
"nu-command/plugin",
285285
"nu-engine/plugin",
286-
"nu-engine/plugin",
287286
"nu-parser/plugin",
288287
"nu-protocol/plugin",
289288
]
@@ -345,7 +344,7 @@ bench = false
345344
# To use a development version of a dependency please use a global override here
346345
# changing versions in each sub-crate of the workspace is tedious
347346
[patch.crates-io]
348-
# reedline = { git = "https://github.com/nushell/reedline", branch = "main" }
347+
reedline = { git = "https://github.com/nushell/reedline", branch = "main" }
349348
nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"}
350349

351350
# Run all benchmarks with `cargo bench`

crates/nu-command/src/database/values/sqlite.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use nu_protocol::{
77
engine::EngineState, shell_error::io::IoError,
88
};
99
use rusqlite::{
10-
Connection, DatabaseName, Error as SqliteError, OpenFlags, Row, Statement, ToSql,
11-
types::ValueRef,
10+
Connection, Error as SqliteError, OpenFlags, Row, Statement, ToSql, types::ValueRef,
1211
};
1312
use serde::{Deserialize, Serialize};
1413
use std::{
@@ -19,6 +18,7 @@ use std::{
1918

2019
const SQLITE_MAGIC_BYTES: &[u8] = "SQLite format 3\0".as_bytes();
2120
pub const MEMORY_DB: &str = "file:memdb1?mode=memory&cache=shared";
21+
const DATABASE_NAME: &str = "main";
2222

2323
#[derive(Debug, Clone, Serialize, Deserialize)]
2424
pub struct SQLiteDatabase {
@@ -183,7 +183,7 @@ impl SQLiteDatabase {
183183
conn: &Connection,
184184
filename: String,
185185
) -> Result<(), SqliteError> {
186-
conn.backup(DatabaseName::Main, Path::new(&filename), None)?;
186+
conn.backup(DATABASE_NAME, Path::new(&filename), None)?;
187187
Ok(())
188188
}
189189

@@ -193,7 +193,7 @@ impl SQLiteDatabase {
193193
filename: String,
194194
) -> Result<(), SqliteError> {
195195
conn.restore(
196-
DatabaseName::Main,
196+
DATABASE_NAME,
197197
Path::new(&filename),
198198
Some(|p: rusqlite::backup::Progress| {
199199
let percent = if p.pagecount == 0 {

0 commit comments

Comments
 (0)