pub enum Projection {
All,
Column(String),
Alias(String, String),
Function(String, Vec<Projection>),
Expression(Box<Filter>, Option<String>),
Field(FieldRef, Option<String>),
}Expand description
Column/field projection
Variants§
All
Select all columns (*)
Column(String)
Single column by name
Alias(String, String)
Column with alias
Function(String, Vec<Projection>)
Function call (name, args)
Expression(Box<Filter>, Option<String>)
Expression with optional alias
Field(FieldRef, Option<String>)
Field reference (for graph properties)
Implementations§
Source§impl Projection
impl Projection
Sourcepub fn from_field(field: FieldRef) -> Projection
pub fn from_field(field: FieldRef) -> Projection
Create a projection from a field reference
Sourcepub fn column(name: &str) -> Projection
pub fn column(name: &str) -> Projection
Create a column projection
Sourcepub fn with_alias(column: &str, alias: &str) -> Projection
pub fn with_alias(column: &str, alias: &str) -> Projection
Create an aliased projection
Trait Implementations§
Source§impl Clone for Projection
impl Clone for Projection
Source§fn clone(&self) -> Projection
fn clone(&self) -> Projection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Projection
impl Debug for Projection
Source§impl PartialEq for Projection
impl PartialEq for Projection
Source§fn eq(&self, other: &Projection) -> bool
fn eq(&self, other: &Projection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Projection
Auto Trait Implementations§
impl Freeze for Projection
impl RefUnwindSafe for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnsafeUnpin for Projection
impl UnwindSafe for Projection
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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