fix breaking change on rusqlite changing RowIndex's signature
RowIndex must have just been an alias over i32, but now it's a trait implemented on str and usize, so we need to change mentat's internal type alias for it to a usize.
This commit is contained in:
parent
95780c0ab5
commit
ff48f6369a
5 changed files with 7 additions and 7 deletions
|
@ -343,7 +343,7 @@ impl QueryResults {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Index = i32; // See rusqlite::RowIndex.
|
type Index = usize; // See rusqlite::RowIndex.
|
||||||
enum TypedIndex {
|
enum TypedIndex {
|
||||||
Known(Index, ValueTypeTag),
|
Known(Index, ValueTypeTag),
|
||||||
Unknown(Index, Index),
|
Unknown(Index, Index),
|
||||||
|
|
|
@ -192,7 +192,7 @@ pub(crate) fn project_elements<'a, I: IntoIterator<Item = &'a Element>>(
|
||||||
// We'll expand them later.
|
// We'll expand them later.
|
||||||
let mut outer_projection: Vec<Either<Name, ProjectedColumn>> = Vec::with_capacity(count + 2);
|
let mut outer_projection: Vec<Either<Name, ProjectedColumn>> = Vec::with_capacity(count + 2);
|
||||||
|
|
||||||
let mut i: i32 = 0;
|
let mut i: usize = 0;
|
||||||
let mut min_max_count: usize = 0;
|
let mut min_max_count: usize = 0;
|
||||||
let mut templates = vec![];
|
let mut templates = vec![];
|
||||||
let mut pulls: Vec<PullTemplate> = vec![];
|
let mut pulls: Vec<PullTemplate> = vec![];
|
||||||
|
|
|
@ -124,7 +124,7 @@ impl TupleTwoStagePullProjector {
|
||||||
// There will be at least as many SQL columns as Datalog columns.
|
// There will be at least as many SQL columns as Datalog columns.
|
||||||
// gte 'cos we might be querying extra columns for ordering.
|
// gte 'cos we might be querying extra columns for ordering.
|
||||||
// The templates will take care of ignoring columns.
|
// The templates will take care of ignoring columns.
|
||||||
assert!(row.column_count() >= self.len as i32);
|
assert!(row.column_count() >= self.len);
|
||||||
self.templates
|
self.templates
|
||||||
.iter()
|
.iter()
|
||||||
.map(|ti| ti.lookup(&row))
|
.map(|ti| ti.lookup(&row))
|
||||||
|
@ -208,7 +208,7 @@ impl RelTwoStagePullProjector {
|
||||||
// There will be at least as many SQL columns as Datalog columns.
|
// There will be at least as many SQL columns as Datalog columns.
|
||||||
// gte 'cos we might be querying extra columns for ordering.
|
// gte 'cos we might be querying extra columns for ordering.
|
||||||
// The templates will take care of ignoring columns.
|
// The templates will take care of ignoring columns.
|
||||||
assert!(row.column_count() >= self.len as i32);
|
assert!(row.column_count() >= self.len);
|
||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
for binding in self.templates
|
for binding in self.templates
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
@ -97,7 +97,7 @@ impl TupleProjector {
|
||||||
// There will be at least as many SQL columns as Datalog columns.
|
// There will be at least as many SQL columns as Datalog columns.
|
||||||
// gte 'cos we might be querying extra columns for ordering.
|
// gte 'cos we might be querying extra columns for ordering.
|
||||||
// The templates will take care of ignoring columns.
|
// The templates will take care of ignoring columns.
|
||||||
assert!(row.column_count() >= self.len as i32);
|
assert!(row.column_count() >= self.len);
|
||||||
self.templates
|
self.templates
|
||||||
.iter()
|
.iter()
|
||||||
.map(|ti| ti.lookup(&row))
|
.map(|ti| ti.lookup(&row))
|
||||||
|
@ -155,7 +155,7 @@ impl RelProjector {
|
||||||
// There will be at least as many SQL columns as Datalog columns.
|
// There will be at least as many SQL columns as Datalog columns.
|
||||||
// gte 'cos we might be querying extra columns for ordering.
|
// gte 'cos we might be querying extra columns for ordering.
|
||||||
// The templates will take care of ignoring columns.
|
// The templates will take care of ignoring columns.
|
||||||
assert!(row.column_count() >= self.len as i32);
|
assert!(row.column_count() >= self.len);
|
||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
for binding in self.templates
|
for binding in self.templates
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
@ -94,7 +94,7 @@ impl<'schema> PullConsumer<'schema> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn collect_entity<'a>(&mut self, row: &rusqlite::Row<'a>) -> Entid {
|
pub(crate) fn collect_entity<'a>(&mut self, row: &rusqlite::Row<'a>) -> Entid {
|
||||||
let entity = row.get(self.indices.sql_index);
|
let entity = row.get(self.indices.sql_index).unwrap();
|
||||||
self.entities.insert(entity);
|
self.entities.insert(entity);
|
||||||
entity
|
entity
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue