From b19a994c686c8ad9e102f5d7c8431d3a8572e7b2 Mon Sep 17 00:00:00 2001 From: Mark Watts Date: Wed, 10 Nov 2021 22:17:19 -0500 Subject: [PATCH] resolve compile errors from rusqlite update --- db/src/debug.rs | 2 +- query-projector/src/projectors/pull_two_stage.rs | 4 ++-- query-projector/src/projectors/simple.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db/src/debug.rs b/db/src/debug.rs index 895c7700..ee9d031f 100644 --- a/db/src/debug.rs +++ b/db/src/debug.rs @@ -340,7 +340,7 @@ pub fn dump_sql_query( let r: Result> = stmt .query_and_then(params, |row| { - for i in 0..row.column_count() { + for i in 0..row.as_ref().column_count() { let value: rusqlite::types::Value = row.get(i)?; write!(&mut tw, "{:?}\t", value).unwrap(); } diff --git a/query-projector/src/projectors/pull_two_stage.rs b/query-projector/src/projectors/pull_two_stage.rs index f286232b..2814648a 100644 --- a/query-projector/src/projectors/pull_two_stage.rs +++ b/query-projector/src/projectors/pull_two_stage.rs @@ -123,7 +123,7 @@ impl TupleTwoStagePullProjector { // There will be at least as many SQL columns as Datalog columns. // gte 'cos we might be querying extra columns for ordering. // The templates will take care of ignoring columns. - assert!(row.column_count() >= self.len); + assert!(row.as_ref().column_count() >= self.len); self.templates .iter() .map(|ti| ti.lookup(row)) @@ -226,7 +226,7 @@ impl RelTwoStagePullProjector { // There will be at least as many SQL columns as Datalog columns. // gte 'cos we might be querying extra columns for ordering. // The templates will take care of ignoring columns. - assert!(row.column_count() >= self.len); + assert!(row.as_ref().column_count() >= self.len); let mut count = 0; for binding in self.templates.iter().map(|ti| ti.lookup(&row)) { out.push(binding?); diff --git a/query-projector/src/projectors/simple.rs b/query-projector/src/projectors/simple.rs index 213d75ac..364cc7c1 100644 --- a/query-projector/src/projectors/simple.rs +++ b/query-projector/src/projectors/simple.rs @@ -93,7 +93,7 @@ impl TupleProjector { // There will be at least as many SQL columns as Datalog columns. // gte 'cos we might be querying extra columns for ordering. // The templates will take care of ignoring columns. - assert!(row.column_count() >= self.len); + assert!(row.as_ref().column_count() >= self.len); self.templates .iter() .map(|ti| ti.lookup(&row)) @@ -163,7 +163,7 @@ impl RelProjector { // There will be at least as many SQL columns as Datalog columns. // gte 'cos we might be querying extra columns for ordering. // The templates will take care of ignoring columns. - assert!(row.column_count() >= self.len); + assert!(row.as_ref().column_count() >= self.len); let mut count = 0; for binding in self.templates.iter().map(|ti| ti.lookup(&row)) { out.push(binding?);