Struct alexandria::query::QueryIterator [−][src]
A dynamically stepped iterator for query results
See query_iter()
to construct an iterator, and for more detailed
behaviour. Be sure to drop the iterator when done to allow
garbage collection of deleted paths.
Implementations
impl QueryIterator
[src]
pub fn merge(&mut self, other: Self) -> Result<()>
[src]
Allows merging two iterators with the same query into one
The second iterator will simply be appended. No further sorting is scheduled.
pub fn skip(&self, pos: usize)
[src]
Skip ahead to a certain position in the iterator
If the provided position is larger than the iterator set, all
future yield
s will simply return None
.
pub fn query(&self) -> &Query
[src]
Return a reference to the original query of the iterator
pub fn pos(&self) -> usize
[src]
Get the current iterator position
pub fn len(&self) -> usize
[src]
Get the absolute length of the iterator
pub fn remaining(&self) -> usize
[src]
Return the number of remaining items
pub async fn lock(&self)
[src]
Lock the GC for the iterator scope
Normally, when an iterator wants to access records that were deleted by other transactions, it will return an error. To avoid this possible race condition, you can lock the garbage collector for the set of paths the iterator can touch, meaning they will remain accessible until the iterator goes out of scope.
This can have unwanted side-effects, such as having records still accessible by other tasks after they were deleted, when accessed by path directly (but not via tags), or not actually deleting records if the program aborts before the iterator can restart the garbage collector again.
pub async fn next(&self) -> Result<Option<RecordRef>>
[src]
Get the next item in the iterator
When the iterator has reached it’s end, it will start
returning None
, at which point this instance should be
dropped to allow freeing records that were held for this
iterator.
If any other errors occur during access, this function will return an Error, which doesn’t neccessarily mean no more records can be fetched in the future.
Trait Implementations
impl Debug for QueryIterator
[src]
impl Drop for QueryIterator
[src]
Auto Trait Implementations
impl !RefUnwindSafe for QueryIterator
impl Send for QueryIterator
impl Sync for QueryIterator
impl Unpin for QueryIterator
impl !UnwindSafe for QueryIterator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,