[−][src]Struct codd::expression::Relation
Is an expression corresponding to a relation with tuples of type T
that is identified
by a name
.
Example:
use codd::{Database, expression::Relation}; let mut db = Database::new(); let r = db.add_relation("R").unwrap(); db.insert(&r, vec![0, 1, 2, 3].into()).unwrap(); // insert into the relation instance assert_eq!(vec![0, 1, 2, 3], db.evaluate(&r).unwrap().into_tuples());
Implementations
impl<T> Relation<T> where
T: Tuple,
[src]
T: Tuple,
pub fn new<S>(name: S) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Creates a new Relation
with a given name
.
pub fn name(&self) -> &str
[src]
Returns a reference to the name by which the relation is identified.
Trait Implementations
impl<T: Clone> Clone for Relation<T> where
T: Tuple,
[src]
T: Tuple,
impl<T: Debug> Debug for Relation<T> where
T: Tuple,
[src]
T: Tuple,
impl<T> Expression<T> for Relation<T> where
T: Tuple + 'static,
[src]
T: Tuple + 'static,
fn visit<V>(&self, visitor: &mut V) where
V: Visitor,
[src]
V: Visitor,
fn builder(&self) -> Builder<T, Self>
[src]
impl<T: Tuple> From<Relation<T>> for Mono<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Relation<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Relation<T> where
T: Send,
T: Send,
impl<T> Sync for Relation<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Relation<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Relation<T> where
T: UnwindSafe,
T: UnwindSafe,
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, E> IntoExpression<T, E> for E where
E: Expression<T>,
T: Tuple,
[src]
E: Expression<T>,
T: Tuple,
pub fn into_expression(Self) -> E
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,