pub struct LimitExecutor { /* private fields */ }Expand description
Limit executor - applies LIMIT and OFFSET to a relation.
Implementations§
Source§impl LimitExecutor
impl LimitExecutor
Sourcepub fn limit_only(limit: usize) -> Self
pub fn limit_only(limit: usize) -> Self
Creates a limit executor with only a limit (no offset).
Sourcepub fn execute(&self, input: Relation) -> Relation
pub fn execute(&self, input: Relation) -> Relation
Executes the limit on the input relation.
Note: This operation is O(offset + limit) for the actual work, but dropping the unused entries is O(n - offset - limit). In a real query engine, limit would be pushed down to avoid materializing unnecessary rows.
Auto Trait Implementations§
impl Freeze for LimitExecutor
impl RefUnwindSafe for LimitExecutor
impl Send for LimitExecutor
impl Sync for LimitExecutor
impl Unpin for LimitExecutor
impl UnwindSafe for LimitExecutor
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