File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 11use pyo3:: prelude:: * ;
22
3- use super :: database:: { Record , RecordAddress } ;
4- use std:: collections:: HashMap ;
5-
6- use std:: sync:: { Arc , Mutex } ;
7-
8- type RID = u64 ;
9-
103static MAX_SIZE_RECORD : u64 = u64:: MAX ;
114
125#[ pyclass]
@@ -41,26 +34,6 @@ impl PhysicalPage {
4134 }
4235}
4336
44- pub struct PageDirectory {
45- pub records : HashMap < RID , Arc < Mutex < Vec < RecordAddress > > > > ,
46- }
47-
48- impl PageDirectory {
49- pub fn new ( ) -> Self {
50- PageDirectory {
51- records : HashMap :: new ( ) ,
52- }
53- }
54-
55- pub fn insert ( & mut self , record : Record ) {
56- self . records . insert ( record. rid , record. addresses ) ;
57- }
58-
59- pub fn get ( & self , rid : RID ) -> Option < Arc < Mutex < Vec < RecordAddress > > > > {
60- self . records . get ( & rid) . cloned ( )
61- }
62- }
63-
6437#[ cfg( test) ]
6538mod tests {
6639 use super :: * ;
You can’t perform that action at this time.
0 commit comments