@@ -11,7 +11,7 @@ use crate::{
1111 error:: { DatastoreError , IndexError , TableError } ,
1212 execution_context:: ExecutionContext ,
1313 locking_tx_datastore:: {
14- mut_tx:: { UniqueView , ViewReadSets } ,
14+ mut_tx:: { ViewCall , ViewReadSets } ,
1515 state_view:: iter_st_column_for_table,
1616 } ,
1717 system_tables:: {
@@ -53,12 +53,12 @@ use std::collections::BTreeMap;
5353use std:: sync:: Arc ;
5454use thin_vec:: ThinVec ;
5555
56- type IndexKeyReadSet = HashMap < AlgebraicValue , HashSet < UniqueView > > ;
56+ type IndexKeyReadSet = HashMap < AlgebraicValue , HashSet < ViewCall > > ;
5757type IndexColReadSet = HashMap < ColList , IndexKeyReadSet > ;
5858
5959#[ derive( Default ) ]
6060struct CommittedReadSets {
61- tables : IntMap < TableId , HashSet < UniqueView > > ,
61+ tables : IntMap < TableId , HashSet < ViewCall > > ,
6262 index_keys : IntMap < TableId , IndexColReadSet > ,
6363}
6464
@@ -72,12 +72,12 @@ impl MemoryUsage for CommittedReadSets {
7272
7373impl CommittedReadSets {
7474 /// Record in the [`CommittedState`] that this view scans this table
75- fn view_scans_table ( & mut self , view : UniqueView , table_id : TableId ) {
75+ fn view_scans_table ( & mut self , view : ViewCall , table_id : TableId ) {
7676 self . tables . entry ( table_id) . or_default ( ) . insert ( view) ;
7777 }
7878
7979 /// Record in the [`CommittedState`] that this view reads this index `key` for these table `cols`
80- fn view_reads_index_key ( & mut self , view : UniqueView , table_id : TableId , cols : ColList , key : & AlgebraicValue ) {
80+ fn view_reads_index_key ( & mut self , view : ViewCall , table_id : TableId , cols : ColList , key : & AlgebraicValue ) {
8181 self . index_keys
8282 . entry ( table_id)
8383 . or_default ( )
@@ -98,7 +98,7 @@ impl CommittedReadSets {
9898
9999 /// Returns true if the given view exists in any read set.
100100 /// This is used to determine whether a view needs to be re-evaluated.
101- fn is_materialized ( & self , view : & UniqueView ) -> bool {
101+ fn is_materialized ( & self , view : & ViewCall ) -> bool {
102102 self . tables . values ( ) . any ( |views| views. contains ( view) )
103103 || self . index_keys . values ( ) . any ( |col_map| {
104104 col_map
@@ -724,7 +724,7 @@ impl CommittedState {
724724 tx_data
725725 }
726726
727- fn merge_read_set ( & mut self , view : UniqueView , read_set : ReadSet ) {
727+ fn merge_read_set ( & mut self , view : ViewCall , read_set : ReadSet ) {
728728 for table_id in read_set. tables_scanned ( ) {
729729 self . read_sets . view_scans_table ( view. clone ( ) , * table_id) ;
730730 }
@@ -1061,7 +1061,7 @@ impl CommittedState {
10611061 . set ( self . blob_store . bytes_used_by_blobs ( ) as _ ) ;
10621062 }
10631063
1064- pub ( super ) fn is_materialized ( & self , view : & UniqueView ) -> bool {
1064+ pub ( super ) fn is_materialized ( & self , view : & ViewCall ) -> bool {
10651065 self . read_sets . is_materialized ( view)
10661066 }
10671067}
0 commit comments