Skip to content

Commit

Permalink
fix rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
zorancv committed Dec 5, 2023
1 parent 7864a70 commit ba97a85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions graph/src/data/store/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::{anyhow, Error};
use diesel::{
pg::Pg,
query_builder::AstPass,
sql_types::{Binary, Text},
sql_types::{BigInt, Binary, Text},
QueryResult,
};
use stable_hash::{StableHash, StableHasher};
Expand Down Expand Up @@ -299,10 +299,11 @@ impl<'a> IdRef<'a> {
}
}

pub fn push_bind_param(&self, out: &mut AstPass<'_, 'a, Pg>) -> QueryResult<()> {
pub fn push_bind_param<'b>(&'b self, out: &mut AstPass<'_, 'b, Pg>) -> QueryResult<()> {
match self {
IdRef::String(s) => out.push_bind_param::<Text, _>(*s),
IdRef::Bytes(b) => out.push_bind_param::<Binary, _>(*b),
IdRef::Int8(i) => out.push_bind_param::<BigInt, _>(i),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion graph/src/data/store/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl ToSql<Int8, Pg> for Value {
fn to_sql(&self, out: &mut Output<Pg>) -> serialize::Result {
match self {
Value::Int8(i) => <i64 as ToSql<Int8, Pg>>::to_sql(i, &mut out.reborrow()),
Value::Int(i) => <i64 as ToSql<Int8, Pg>>::to_sql(&(*i as i64), out),
Value::Int(i) => <i64 as ToSql<Int8, Pg>>::to_sql(&(*i as i64), &mut out.reborrow()),
v => Err(anyhow!(
"Failed to convert non-int8 attribute value to int8 in SQL: {}",
v
Expand Down
2 changes: 1 addition & 1 deletion store/postgres/src/relational_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2877,7 +2877,7 @@ impl<'a> FilterWindow<'a> {

out.push_sql("from (values ");
for i in 0..self.ids.len() {
let parent_id = self.ids.index(i);
let parent_id: IdRef<'b> = self.ids.index(i);
let child_ids = &child_ids[i];
if i > 0 {
out.push_sql(", (");
Expand Down

0 comments on commit ba97a85

Please sign in to comment.