Skip to content

Commit

Permalink
Major version update: SQLite 3.46.1 to 3.48.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatz committed Jan 19, 2025
1 parent 1042ea2 commit 5144dab
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 69 deletions.
72 changes: 23 additions & 49 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ opt-level = 1
[workspace.dependencies]
trailbase-refinery-core = { path = "vendor/refinery/refinery_core", version = "0.8.15", default-features = false, features = ["rusqlite-bundled"] }
trailbase-refinery-macros = { path = "vendor/refinery/refinery_macros", version = "0.8.15" }
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
rusqlite = { version = "^0.32.1", default-features = false, features = [
libsqlite3-sys = { version = "0.31.0", features = ["bundled"] }
rusqlite = { version = "^0.33.0", default-features = false, features = [
"bundled",
"column_decltype",
"load_extension",
Expand Down
2 changes: 1 addition & 1 deletion trailbase-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ serde_path_to_error = "0.1.16"
serde_urlencoded = "0.7.1"
sha2 = "0.10.8"
sqlformat = "0.3.1"
sqlite3-parser = "0.13.0"
sqlite3-parser = "0.14.0"
thiserror = "2.0.1"
thread_local = "1.1.8"
tokio = { version = "^1.38.0", features = ["macros", "rt-multi-thread", "fs", "signal", "time"] }
Expand Down
6 changes: 3 additions & 3 deletions trailbase-core/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ impl View {
info!("CREATE VIEW column filtering not supported (yet)");
None
}
false => try_extract_column_mapping(select.clone(), tables)?.map(|column_mapping| {
false => try_extract_column_mapping((*select).clone(), tables)?.map(|column_mapping| {
column_mapping
.into_iter()
.map(|mapping| mapping.column)
Expand All @@ -744,7 +744,7 @@ impl View {
Ok(View {
name: view_name.to_string(),
columns,
query: SelectFormatter(select).to_string(),
query: SelectFormatter(*select).to_string(),
temporary,
if_not_exists,
})
Expand Down Expand Up @@ -1202,7 +1202,7 @@ mod tests {
},
];

let mapping = try_extract_column_mapping(select, &tables)
let mapping = try_extract_column_mapping(*select, &tables)
.unwrap()
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion trailbase-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rusqlite = { workspace = true }
schemars = "0.8.21"
serde = { version = "^1.0.203", features = ["derive"] }
serde_json = "1.0.122"
serde_rusqlite = "0.36.0"
serde_rusqlite = "0.37.0"
trailbase-sqlean = { workspace = true }
sqlite-vec = "0.1.6"
thiserror = "2.0.1"
Expand Down
25 changes: 14 additions & 11 deletions trailbase-sqlite/src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crossbeam_channel::{Receiver, Sender};
use rusqlite::fallible_iterator::FallibleIterator;
use rusqlite::hooks::{Action, PreUpdateCase};
use rusqlite::types::Value;
use std::{
Expand Down Expand Up @@ -186,22 +187,24 @@ impl Connection {
let batch = rusqlite::Batch::new(conn, &sql);

let mut p = batch.peekable();
while let Some(iter) = p.next() {
let mut stmt = iter?;

while let Ok(Some(mut stmt)) = p.next() {
let mut rows = stmt.raw_query();
let row = rows.next()?;
if p.peek().is_none() {
if let Some(row) = row {
let cols: Arc<Vec<Column>> = Arc::new(columns(row.as_ref()));

let mut result = vec![Row::from_row(row, Some(cols.clone()))?];
while let Some(row) = rows.next()? {
result.push(Row::from_row(row, Some(cols.clone()))?);
match p.peek() {
Err(_) | Ok(None) => {
if let Some(row) = row {
let cols: Arc<Vec<Column>> = Arc::new(columns(row.as_ref()));

let mut result = vec![Row::from_row(row, Some(cols.clone()))?];
while let Some(row) = rows.next()? {
result.push(Row::from_row(row, Some(cols.clone()))?);
}
return Ok(Some(Rows(result, cols)));
}
return Ok(Some(Rows(result, cols)));
return Ok(None);
}
return Ok(None);
_ => {}
}
}
return Ok(None);
Expand Down
2 changes: 1 addition & 1 deletion vendor/refinery
2 changes: 1 addition & 1 deletion vendor/sqlean/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ appveyor = { repository = "trailbaseio/trailbase" }
maintenance = { status = "actively-developed" }

[dependencies]
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
libsqlite3-sys = { version = "0.31.0", features = ["bundled"] }

[build-dependencies]
bindgen = "0.71.0"
Expand Down

0 comments on commit 5144dab

Please sign in to comment.