pub struct PageBulkWriter { /* private fields */ }Expand description
Bulk writer that packs rows directly into B-tree leaf pages.
Implementations§
Source§impl PageBulkWriter
impl PageBulkWriter
pub fn new(pager: Arc<Pager>, start_id: u64) -> Self
Sourcepub fn write_row(&mut self, values: &[Value]) -> Result<u64, String>
pub fn write_row(&mut self, values: &[Value]) -> Result<u64, String>
Write a single row (key = entity_id as u64 LE, value = serialized row).
Sourcepub fn write_row_direct(&mut self, values: &[Value]) -> Result<u64, String>
pub fn write_row_direct(&mut self, values: &[Value]) -> Result<u64, String>
Write a row DIRECTLY into page buffer — zero intermediate Vec allocation. Serializes values inline into the current page’s byte array.
Sourcepub fn write_rows(&mut self, rows: &[Vec<Value>]) -> Result<Vec<u64>, String>
pub fn write_rows(&mut self, rows: &[Vec<Value>]) -> Result<Vec<u64>, String>
Write many rows at once.
Sourcepub fn finish(self) -> Result<BulkWriteResult, String>
pub fn finish(self) -> Result<BulkWriteResult, String>
Finish writing — seal current page, link all pages, write to pager.
Auto Trait Implementations§
impl Freeze for PageBulkWriter
impl RefUnwindSafe for PageBulkWriter
impl Send for PageBulkWriter
impl Sync for PageBulkWriter
impl Unpin for PageBulkWriter
impl UnsafeUnpin for PageBulkWriter
impl UnwindSafe for PageBulkWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request