oops, accidental missing function
This commit is contained in:
parent
71470443e8
commit
afebba1c74
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,12 @@ impl<'a> QueryBuilder<'a> {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn bind_ref_from_kw(mut self, var: &str, value: NamespacedKeyword) -> Result<Self> {
|
||||||
|
let entid = self.store.conn().current_schema().get_entid(&value).ok_or(ErrorKind::UnknownAttribute(value.to_string()))?;
|
||||||
|
self.values.insert(Variable::from_valid_name(var), TypedValue::Ref(entid.into()));
|
||||||
|
Ok(self)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn bind_ref<T>(mut self, var: &str, value: T) -> Self where T: Into<Entid> {
|
pub fn bind_ref<T>(mut self, var: &str, value: T) -> Self where T: Into<Entid> {
|
||||||
self.values.insert(Variable::from_valid_name(var), TypedValue::Ref(value.into()));
|
self.values.insert(Variable::from_valid_name(var), TypedValue::Ref(value.into()));
|
||||||
self
|
self
|
||||||
|
|
Loading…
Reference in a new issue