Skip to content

Commit 25e8b2e

Browse files
committed
fix: merge conflicts
1 parent 38cc4bb commit 25e8b2e

22 files changed

Lines changed: 55 additions & 55 deletions

libs/@local/hashql/eval/src/postgres/authorization/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<A: Allocator + Clone, S: Allocator> PatchPreparedQueryLayer<A, S>
149149
query.statement.where_expression.add_condition(condition);
150150

151151
// Lower protection BEFORE join materialization so its join demands
152-
// (e.g. entity_is_of_type_ids for TypeBaseUrls) are registered.
152+
// (e.g. entity_edition_cache for TypeBaseUrls) are registered.
153153
// The resulting mask expression is grafted AFTER joins are built.
154154
let entity_edition_alias = context.projections.entity_edition_alias();
155155

libs/@local/hashql/eval/src/postgres/authorization/policy/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn convert_is_of_type<A: Allocator + Clone>(
3535
unit: &mut PolicyTranslationUnit<'_, A>,
3636
url: VersionedUrl,
3737
) -> Expression {
38-
let table = unit.projections.entity_is_of_type_ids();
38+
let table = unit.projections.entity_edition_cache();
3939

4040
let base_url_index = unit.parameters.push(url.base_url);
4141
let version_index = unit.parameters.push(url.version);
@@ -45,7 +45,7 @@ fn convert_is_of_type<A: Allocator + Clone>(
4545
hash_graph_postgres_store::store::postgres::query::Function::ArrayPositions(
4646
Box::new(Expression::ColumnReference(ColumnReference {
4747
correlation: Some(table.clone()),
48-
name: Column::EntityIsOfTypeIds(table::EntityIsOfTypeIds::BaseUrls).into(),
48+
name: Column::EntityEditionCache(table::EntityEditionCache::BaseUrls).into(),
4949
})),
5050
Box::new(Expression::Parameter(base_url_index)),
5151
),
@@ -56,7 +56,7 @@ fn convert_is_of_type<A: Allocator + Clone>(
5656
hash_graph_postgres_store::store::postgres::query::Function::ArrayPositions(
5757
Box::new(Expression::ColumnReference(ColumnReference {
5858
correlation: Some(table),
59-
name: Column::EntityIsOfTypeIds(table::EntityIsOfTypeIds::Versions).into(),
59+
name: Column::EntityEditionCache(table::EntityEditionCache::Versions).into(),
6060
})),
6161
Box::new(Expression::Parameter(version_index)),
6262
),
@@ -86,8 +86,8 @@ fn convert_is_of_base_type<A: Allocator + Clone>(
8686
op: BinaryOperator::In,
8787
left: Box::new(Expression::Parameter(base_url_index)),
8888
right: Box::new(Expression::ColumnReference(ColumnReference {
89-
correlation: Some(unit.projections.entity_is_of_type_ids()),
90-
name: Column::EntityIsOfTypeIds(table::EntityIsOfTypeIds::BaseUrls).into(),
89+
correlation: Some(unit.projections.entity_edition_cache()),
90+
name: Column::EntityEditionCache(table::EntityEditionCache::BaseUrls).into(),
9191
})),
9292
})
9393
}

libs/@local/hashql/eval/src/postgres/authorization/policy/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ fn algebra_blank_forbid_denies_all() {
403403
"blank forbid should not register entity_ids",
404404
);
405405
assert!(
406-
fixture.projections.entity_is_of_type_ids.is_none(),
407-
"blank forbid should not register entity_is_of_type_ids",
406+
fixture.projections.entity_edition_cache.is_none(),
407+
"blank forbid should not register entity_edition_cache",
408408
);
409409
}
410410

libs/@local/hashql/eval/src/postgres/authorization/protection/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ fn resolve_path<A: Allocator>(
3232
correlation: Some(unit.projections.temporal_metadata()),
3333
name: Column::EntityTemporalMetadata(table::EntityTemporalMetadata::EntityUuid).into(),
3434
}),
35-
// eit.base_urls
35+
// eec.base_urls
3636
PropertyFilterEntityQueryPath::TypeBaseUrls => {
3737
Expression::ColumnReference(ColumnReference {
38-
correlation: Some(unit.projections.entity_is_of_type_ids()),
39-
name: Column::EntityIsOfTypeIds(table::EntityIsOfTypeIds::BaseUrls).into(),
38+
correlation: Some(unit.projections.entity_edition_cache()),
39+
name: Column::EntityEditionCache(table::EntityEditionCache::BaseUrls).into(),
4040
})
4141
}
4242
}

libs/@local/hashql/eval/src/postgres/authorization/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ fn patch_instance_admin_bypasses_protection() {
661661
}
662662

663663
/// Protection filter that references `TypeBaseUrls`, requiring the
664-
/// `entity_is_of_type_ids` auxiliary join to be in scope inside the
664+
/// `entity_edition_cache` auxiliary join to be in scope inside the
665665
/// `entity_editions` LATERAL mask expression.
666666
#[test]
667667
fn patch_protection_with_type_base_urls() {
@@ -688,7 +688,7 @@ fn patch_protection_with_type_base_urls() {
688688
let actor = Some(ActorId::User(UserId::new(ACTOR_UUID)));
689689
let policy = policy_components(actor, vec![permit(|| None)]);
690690

691-
// Protection uses TypeBaseUrls path, which demands entity_is_of_type_ids join.
691+
// Protection uses TypeBaseUrls path, which demands entity_edition_cache join.
692692
let mut properties = PropertyProtectionFilterConfig::new();
693693
properties.protect_property(
694694
BaseUrl::new("https://hash.ai/@h/types/property-type/email/".to_owned())

libs/@local/hashql/eval/src/postgres/projections.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ pub struct AuxiliaryProjections {
513513
base: Projections,
514514

515515
pub entity_ids: Option<Alias>,
516-
pub entity_is_of_type_ids: Option<Alias>,
516+
pub entity_edition_cache: Option<Alias>,
517517
}
518518

519519
impl AuxiliaryProjections {
@@ -522,7 +522,7 @@ impl AuxiliaryProjections {
522522
index: base.index,
523523
base: base.snapshot(),
524524
entity_ids: None,
525-
entity_is_of_type_ids: None,
525+
entity_edition_cache: None,
526526
}
527527
}
528528

@@ -574,18 +574,18 @@ impl AuxiliaryProjections {
574574
///
575575
/// Always allocates a fresh join; the base projections' type aggregate
576576
/// is a scoped LATERAL subquery and cannot be reused.
577-
pub(crate) fn entity_is_of_type_ids(&mut self) -> TableReference<'static> {
578-
let alias = if let Some(alias) = self.entity_is_of_type_ids {
577+
pub(crate) fn entity_edition_cache(&mut self) -> TableReference<'static> {
578+
let alias = if let Some(alias) = self.entity_edition_cache {
579579
alias
580580
} else {
581581
let alias = self.next_alias();
582-
self.entity_is_of_type_ids = Some(alias);
582+
self.entity_edition_cache = Some(alias);
583583
alias
584584
};
585585

586586
TableReference {
587587
schema: None,
588-
name: TableName::from(Table::EntityIsOfTypeIds),
588+
name: TableName::from(Table::EntityEditionCache),
589589
alias: Some(alias),
590590
}
591591
}
@@ -615,7 +615,7 @@ impl AuxiliaryProjections {
615615
tablesample: None,
616616
};
617617

618-
if self.entity_ids.is_none() && self.entity_is_of_type_ids.is_none() {
618+
if self.entity_ids.is_none() && self.entity_edition_cache.is_none() {
619619
return from;
620620
}
621621

@@ -633,18 +633,18 @@ impl AuxiliaryProjections {
633633
core = self.base.build_entity_ids(core, alias);
634634
}
635635

636-
if let Some(alias) = self.entity_is_of_type_ids {
636+
if let Some(alias) = self.entity_edition_cache {
637637
let fk = ForeignKeyReference::Single {
638638
on: Column::EntityTemporalMetadata(table::EntityTemporalMetadata::EditionId),
639-
join: Column::EntityIsOfTypeIds(table::EntityIsOfTypeIds::EntityEditionId),
639+
join: Column::EntityEditionCache(table::EntityEditionCache::EntityEditionId),
640640
join_type: JoinType::Inner,
641641
};
642642

643643
core = core
644644
.join(
645645
JoinType::Inner,
646-
FromItem::table(Table::EntityIsOfTypeIds)
647-
.alias(Table::EntityIsOfTypeIds.aliased(alias)),
646+
FromItem::table(Table::EntityEditionCache)
647+
.alias(Table::EntityEditionCache.aliased(alias)),
648648
)
649649
.on(fk.conditions(self.base.base_alias, alias))
650650
.build();
@@ -793,7 +793,7 @@ mod tests {
793793
fn build_joins_inserts_before_laterals() {
794794
let base = Projections::new();
795795
let mut aux = AuxiliaryProjections::new(&base);
796-
aux.entity_is_of_type_ids();
796+
aux.entity_edition_cache();
797797

798798
let core = FromItem::table(Table::EntityTemporalMetadata)
799799
.alias(TableReference {
@@ -823,7 +823,7 @@ mod tests {
823823
let base = Projections::new();
824824
let mut aux = AuxiliaryProjections::new(&base);
825825
aux.entity_ids();
826-
aux.entity_is_of_type_ids();
826+
aux.entity_edition_cache();
827827

828828
let from = FromItem::table(Table::EntityTemporalMetadata)
829829
.alias(TableReference {

libs/@local/hashql/eval/tests/ui/postgres/authorization/integration/patch_blank_forbid_denies_all.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/authorization/integration/patch_protection_with_type_base_urls.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/authorization/integration/patch_with_policy_and_protection.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/authorization/policy/algebra_permits_and_forbids.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)