[][src]Trait rql::HasRows

pub trait HasRows: Sized {
    type Iter: Iterator;
    fn rows(self) -> Self::Iter;

    fn select<F, R>(self, f: F) -> Select<Self::Iter, F>
    where
        F: Fn(<Self::Iter as Iterator>::Item) -> R
, { ... }
fn relate<R, F>(self, other: R, f: F) -> Relate<Self::Iter, R::Iter, F>
    where
        R: HasRows,
        R::Iter: Clone,
        <Self::Iter as Iterator>::Item: Clone,
        F: Fn(&<Self::Iter as Iterator>::Item, &<R::Iter as Iterator>::Item) -> bool
, { ... }
fn wher<F>(self, f: F) -> Where<Self::Iter, F>
    where
        F: Fn(&<Self::Iter as Iterator>::Item) -> bool
, { ... }
fn find<F>(self, f: F) -> Option<<Self::Iter as Iterator>::Item>
    where
        F: Fn(&<Self::Iter as Iterator>::Item) -> bool
, { ... } }

A trait for accessing rows

Associated Types

type Iter: Iterator

The row iterator type

Loading content...

Required methods

fn rows(self) -> Self::Iter

Get the row iterator

Loading content...

Provided methods

fn select<F, R>(self, f: F) -> Select<Self::Iter, F> where
    F: Fn(<Self::Iter as Iterator>::Item) -> R, 

Create a selection

fn relate<R, F>(self, other: R, f: F) -> Relate<Self::Iter, R::Iter, F> where
    R: HasRows,
    R::Iter: Clone,
    <Self::Iter as Iterator>::Item: Clone,
    F: Fn(&<Self::Iter as Iterator>::Item, &<R::Iter as Iterator>::Item) -> bool

Relate this HasRows to another

fn wher<F>(self, f: F) -> Where<Self::Iter, F> where
    F: Fn(&<Self::Iter as Iterator>::Item) -> bool

Restricts the rows with a WHERE clause

fn find<F>(self, f: F) -> Option<<Self::Iter as Iterator>::Item> where
    F: Fn(&<Self::Iter as Iterator>::Item) -> bool

Tries to find a row that satisfies the clause

Loading content...

Implementors

impl<'a, T> HasRows for &'a Table<T>[src]

type Iter = RowIter<'a, T>

impl<'a, T> HasRows for &'a mut Table<T>[src]

type Iter = RowIter<'a, T>

impl<I> HasRows for I where
    I: Iterator
[src]

type Iter = I

Loading content...