(#362) Part 2: use constrain_attribute. r=nalexander
This commit is contained in:
parent
8935d6a8a5
commit
ce3a9bdf87
1 changed files with 3 additions and 2 deletions
|
@ -552,11 +552,11 @@ impl ConjoiningClauses {
|
||||||
self.mark_known_empty("Attribute entid isn't an attribute.");
|
self.mark_known_empty("Attribute entid isn't an attribute.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.constrain_column_to_entity(col.clone(), DatomsColumn::Attribute, entid)
|
self.constrain_attribute(col.clone(), entid)
|
||||||
},
|
},
|
||||||
PatternNonValuePlace::Ident(ref ident) => {
|
PatternNonValuePlace::Ident(ref ident) => {
|
||||||
if let Some(entid) = self.entid_for_ident(schema, ident) {
|
if let Some(entid) = self.entid_for_ident(schema, ident) {
|
||||||
self.constrain_column_to_entity(col.clone(), DatomsColumn::Attribute, entid);
|
self.constrain_attribute(col.clone(), entid);
|
||||||
|
|
||||||
if !schema.is_attribute(entid) {
|
if !schema.is_attribute(entid) {
|
||||||
self.mark_known_empty("Attribute ident isn't an attribute.");
|
self.mark_known_empty("Attribute ident isn't an attribute.");
|
||||||
|
@ -580,6 +580,7 @@ impl ConjoiningClauses {
|
||||||
match pattern.value {
|
match pattern.value {
|
||||||
PatternValuePlace::Placeholder =>
|
PatternValuePlace::Placeholder =>
|
||||||
(),
|
(),
|
||||||
|
|
||||||
PatternValuePlace::Variable(ref v) => {
|
PatternValuePlace::Variable(ref v) => {
|
||||||
if let Some(this_type) = value_type {
|
if let Some(this_type) = value_type {
|
||||||
// Wouldn't it be nice if we didn't need to clone in the found case?
|
// Wouldn't it be nice if we didn't need to clone in the found case?
|
||||||
|
|
Loading…
Reference in a new issue