Skip to content

Commit ff3a36e

Browse files
Merge pull request #63 from JakeRoggenbuck/remove-old-stuff
Remove old page directory
2 parents c670487 + 2a3ed58 commit ff3a36e

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/page.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
use 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-
103
static 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)]
6538
mod tests {
6639
use super::*;

0 commit comments

Comments
 (0)