Skip to content

Commit b800756

Browse files
committed
store: propagate skip_duplicates to Table
Added skip_duplicates: bool field to Table struct in relational.rs, wired from EntityType::skip_duplicates() in Table::new(), copied in Table::new_like(), and defaulted to false in make_poi_table().
1 parent 37638fb commit b800756

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

store/postgres/src/relational.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ impl Layout {
373373
position: position as u32,
374374
is_account_like: false,
375375
immutable: false,
376+
skip_duplicates: false,
376377
has_causality_region: false,
377378
}
378379
}
@@ -1662,6 +1663,8 @@ pub struct Table {
16621663
/// deleted
16631664
pub(crate) immutable: bool,
16641665

1666+
pub(crate) skip_duplicates: bool,
1667+
16651668
/// Whether this table has an explicit `causality_region` column. If `false`, then the column is
16661669
/// not present and the causality region for all rows is implicitly `0` (equivalent to CasualityRegion::ONCHAIN).
16671670
pub(crate) has_causality_region: bool,
@@ -1692,6 +1695,7 @@ impl Table {
16921695
.collect::<Result<Vec<Column>, StoreError>>()?;
16931696
let qualified_name = SqlName::qualified_name(&catalog.site.namespace, &table_name);
16941697
let immutable = defn.is_immutable();
1698+
let skip_duplicates = defn.skip_duplicates();
16951699
let nsp = catalog.site.namespace.clone();
16961700
let table = Table {
16971701
object: defn.cheap_clone(),
@@ -1705,6 +1709,7 @@ impl Table {
17051709
columns,
17061710
position,
17071711
immutable,
1712+
skip_duplicates,
17081713
has_causality_region,
17091714
};
17101715
Ok(table)
@@ -1722,6 +1727,7 @@ impl Table {
17221727
is_account_like: self.is_account_like,
17231728
position: self.position,
17241729
immutable: self.immutable,
1730+
skip_duplicates: self.skip_duplicates,
17251731
has_causality_region: self.has_causality_region,
17261732
};
17271733

0 commit comments

Comments
 (0)