pub struct Query {
pub let_bindings: Vec<LetBinding>,
pub select: SelectStatement,
pub compound: Option<CompoundQuery>,
pub match_clause: Option<MatchClause>,
pub dml: Option<DmlStatement>,
pub train: Option<TrainStatement>,
pub ddl: Option<DdlStatement>,
pub introspection: Option<IntrospectionStatement>,
pub admin: Option<AdminStatement>,
}Expand description
A complete VelesQL query.
Fields§
§let_bindings: Vec<LetBinding>Named score bindings defined by LET clauses (VelesQL v1.10 Phase 3).
Bindings are evaluated in order before ORDER BY; each binding can reference earlier bindings, component scores, or literal values.
select: SelectStatementThe SELECT statement.
compound: Option<CompoundQuery>Compound query (UNION/INTERSECT/EXCEPT) - EPIC-040 US-006.
match_clause: Option<MatchClause>MATCH clause for graph pattern matching (EPIC-045 US-001).
dml: Option<DmlStatement>Optional DML statement (INSERT/UPDATE/DELETE).
train: Option<TrainStatement>Optional TRAIN statement (TRAIN QUANTIZER).
ddl: Option<DdlStatement>Optional DDL statement (CREATE/DROP COLLECTION) – VelesQL v3.3.
introspection: Option<IntrospectionStatement>Optional introspection statement (SHOW/DESCRIBE/EXPLAIN) – VelesQL v3.4.
admin: Option<AdminStatement>Optional admin statement (FLUSH) – VelesQL v3.6.
Implementations§
Source§impl Query
impl Query
Sourcepub fn is_match_query(&self) -> bool
pub fn is_match_query(&self) -> bool
Returns true if this is a MATCH query.
Sourcepub fn is_select_query(&self) -> bool
pub fn is_select_query(&self) -> bool
Returns true if this is a SELECT query.
Sourcepub fn is_dml_query(&self) -> bool
pub fn is_dml_query(&self) -> bool
Returns true if this is a DML query.
Sourcepub fn is_ddl_query(&self) -> bool
pub fn is_ddl_query(&self) -> bool
Returns true if this is a DDL statement (CREATE/DROP COLLECTION).
Sourcepub fn is_introspection_query(&self) -> bool
pub fn is_introspection_query(&self) -> bool
Returns true if this is an introspection statement (SHOW/DESCRIBE/EXPLAIN).
Sourcepub fn is_admin_query(&self) -> bool
pub fn is_admin_query(&self) -> bool
Returns true if this is an admin statement (FLUSH).
Sourcepub fn is_select_edges_query(&self) -> bool
pub fn is_select_edges_query(&self) -> bool
Returns true if this is a SELECT EDGES query.
Sourcepub fn is_insert_node_query(&self) -> bool
pub fn is_insert_node_query(&self) -> bool
Returns true if this is an INSERT NODE query.
Sourcepub fn dml_collection_name(&self) -> Option<&str>
pub fn dml_collection_name(&self) -> Option<&str>
Extracts the collection name from a DML statement, if present.
Sourcepub fn new_select(select: SelectStatement) -> Self
pub fn new_select(select: SelectStatement) -> Self
Creates a new SELECT query.
Sourcepub fn new_match(match_clause: MatchClause) -> Self
pub fn new_match(match_clause: MatchClause) -> Self
Creates a new MATCH query (EPIC-045).
Sourcepub fn new_dml(dml: DmlStatement) -> Self
pub fn new_dml(dml: DmlStatement) -> Self
Creates a new DML query.
Sourcepub fn new_train(train: TrainStatement) -> Self
pub fn new_train(train: TrainStatement) -> Self
Creates a new TRAIN query.
Sourcepub fn new_ddl(ddl: DdlStatement) -> Self
pub fn new_ddl(ddl: DdlStatement) -> Self
Creates a new DDL query (CREATE/DROP COLLECTION).
Sourcepub fn new_introspection(stmt: IntrospectionStatement) -> Self
pub fn new_introspection(stmt: IntrospectionStatement) -> Self
Creates a new introspection query (SHOW/DESCRIBE/EXPLAIN).
Sourcepub fn new_admin(stmt: AdminStatement) -> Self
pub fn new_admin(stmt: AdminStatement) -> Self
Creates a new admin query (FLUSH).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
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>,
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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
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>
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>
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);