Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ use std::sync::{Arc, Mutex};

type RID = u64;

static MAX_SIZE_RECORD: u64 = 512;
static MAX_SIZE_RECORD: u64 = u64::MAX;

#[pyclass]
#[derive(Clone, Debug)]
pub struct PhysicalPage {
pub data: [u64; 512],
pub data: Vec<u64>,
pub num_records: u64,
}

impl PhysicalPage {
// Init
pub fn new() -> Self {
PhysicalPage {
data: [0u64; 512],
data: Vec::<u64>::new(),
num_records: 0,
}
}
Expand All @@ -31,7 +31,7 @@ impl PhysicalPage {

pub fn write(&mut self, value: u64) {
if self.has_capacity() {
self.data[self.num_records as usize] = value;
self.data.push(value);
self.num_records += 1;
}
}
Expand Down