File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -842,7 +842,7 @@ impl RelationalDB {
842842 let truncates: IntSet < TableId > = tx_data. truncates ( ) . collect ( ) ;
843843
844844 let deletes: Box < _ > = tx_data
845- . durable_deletes ( )
845+ . deletes ( )
846846 . filter ( |( table_id, _) | is_not_ephemeral_table ( table_id) )
847847 . map ( |( table_id, rowdata) | Ops {
848848 table_id : * table_id,
@@ -2420,6 +2420,27 @@ mod tests {
24202420 TableSchema :: from_module_def ( & def, table, ( ) , TableId :: SENTINEL )
24212421 }
24222422
2423+ fn view_module_def ( ) -> ModuleDef {
2424+ let mut builder = RawModuleDefV9Builder :: new ( ) ;
2425+
2426+ let return_type_ref = builder. add_algebraic_type (
2427+ [ ] ,
2428+ "my_view_return_type" ,
2429+ AlgebraicType :: product ( [ ( "b" , AlgebraicType :: U8 ) ] ) ,
2430+ true ,
2431+ ) ;
2432+ builder. add_view (
2433+ "my_view" ,
2434+ 0 ,
2435+ true ,
2436+ false ,
2437+ ProductType :: unit ( ) ,
2438+ AlgebraicType :: array ( AlgebraicType :: Ref ( return_type_ref) ) ,
2439+ ) ;
2440+ let raw = builder. finish ( ) ;
2441+ raw. try_into ( ) . expect ( "table validation failed" )
2442+ }
2443+
24232444 fn table_auto_inc ( ) -> TableSchema {
24242445 table (
24252446 "MyTable" ,
@@ -2552,7 +2573,6 @@ mod tests {
25522573 . collect ( )
25532574 }
25542575
2555-
25562576 #[ test]
25572577 fn test_view_tables_are_ephemeral ( ) -> ResultTest < ( ) > {
25582578 let stdb = TestDB :: durable ( ) ?;
Original file line number Diff line number Diff line change @@ -281,17 +281,6 @@ impl TxData {
281281 self . deletes . iter ( )
282282 }
283283
284- /// Obtain an iterator over the deleted rows per table,
285- /// excluding ephemeral tables.
286- pub fn durable_deletes ( & self ) -> impl Iterator < Item = ( & TableId , & Arc < [ ProductValue ] > ) > + ' _ {
287- self . deletes . iter ( ) . filter ( move |( table_id, _) | {
288- !self
289- . ephemeral_tables
290- . as_ref ( )
291- . is_some_and ( |etables| etables. contains ( * table_id) )
292- } )
293- }
294-
295284 /// Get the `i`th deleted row for `table_id` if it exists
296285 pub fn get_ith_delete ( & self , table_id : TableId , i : usize ) -> Option < & ProductValue > {
297286 self . deletes . get ( & table_id) . and_then ( |rows| rows. get ( i) )
You can’t perform that action at this time.
0 commit comments