pub struct QueryExpr { /* private fields */ }
Expand description
A QueryExpr
represents a Proof of SQL query that can be executed against a database.
It consists of a DynProofPlan
for provable components and a vector of OwnedTablePostprocessing
for the rest.
Implementations§
Source§impl QueryExpr
impl QueryExpr
Sourcepub fn new(
proof_expr: DynProofPlan,
postprocessing: Vec<OwnedTablePostprocessing>,
) -> Self
pub fn new( proof_expr: DynProofPlan, postprocessing: Vec<OwnedTablePostprocessing>, ) -> Self
Creates a new QueryExpr
with the given DynProofPlan
and OwnedTablePostprocessing
.
Sourcepub fn try_new(
ast: SelectStatement,
default_schema: Identifier,
schema_accessor: &dyn SchemaAccessor,
) -> Result<Self, ConversionError>
pub fn try_new( ast: SelectStatement, default_schema: Identifier, schema_accessor: &dyn SchemaAccessor, ) -> Result<Self, ConversionError>
Parse an intermediate AST SelectStatement
into a QueryExpr
.
Sourcepub fn proof_expr(&self) -> &DynProofPlan
pub fn proof_expr(&self) -> &DynProofPlan
Immutable access to this query’s provable filter expression.
Sourcepub fn postprocessing(&self) -> &[OwnedTablePostprocessing]
pub fn postprocessing(&self) -> &[OwnedTablePostprocessing]
Immutable access to this query’s post-proof result transform expression.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QueryExpr
impl<'de> Deserialize<'de> for QueryExpr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for QueryExpr
Auto Trait Implementations§
impl Freeze for QueryExpr
impl RefUnwindSafe for QueryExpr
impl Send for QueryExpr
impl Sync for QueryExpr
impl Unpin for QueryExpr
impl UnwindSafe for QueryExpr
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> 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 more