Enum databend_common_ast::ast::ScriptStatement
source · pub enum ScriptStatement {
Show 15 variants
LetVar {
declare: DeclareVar,
},
LetStatement {
declare: DeclareSet,
},
RunStatement {
span: Span,
stmt: Statement,
},
Assign {
span: Span,
name: Identifier,
value: Expr,
},
Return {
span: Span,
value: Option<ReturnItem>,
},
ForLoop {
span: Span,
variable: Identifier,
is_reverse: bool,
lower_bound: Expr,
upper_bound: Expr,
body: Vec<ScriptStatement>,
label: Option<Identifier>,
},
ForInSet {
span: Span,
variable: Identifier,
resultset: Identifier,
body: Vec<ScriptStatement>,
label: Option<Identifier>,
},
ForInStatement {
span: Span,
variable: Identifier,
stmt: Statement,
body: Vec<ScriptStatement>,
label: Option<Identifier>,
},
WhileLoop {
span: Span,
condition: Expr,
body: Vec<ScriptStatement>,
label: Option<Identifier>,
},
RepeatLoop {
span: Span,
body: Vec<ScriptStatement>,
until_condition: Expr,
label: Option<Identifier>,
},
Loop {
span: Span,
body: Vec<ScriptStatement>,
label: Option<Identifier>,
},
Break {
span: Span,
label: Option<Identifier>,
},
Continue {
span: Span,
label: Option<Identifier>,
},
Case {
span: Span,
operand: Option<Expr>,
conditions: Vec<Expr>,
results: Vec<Vec<ScriptStatement>>,
else_result: Option<Vec<ScriptStatement>>,
},
If {
span: Span,
conditions: Vec<Expr>,
results: Vec<Vec<ScriptStatement>>,
else_result: Option<Vec<ScriptStatement>>,
},
}Variants§
LetVar
Fields
§
declare: DeclareVarLetStatement
Fields
§
declare: DeclareSetRunStatement
Assign
Return
ForLoop
ForInSet
Fields
§
variable: Identifier§
resultset: Identifier§
body: Vec<ScriptStatement>§
label: Option<Identifier>ForInStatement
WhileLoop
RepeatLoop
Loop
Break
Continue
Case
If
Trait Implementations§
source§impl Clone for ScriptStatement
impl Clone for ScriptStatement
source§fn clone(&self) -> ScriptStatement
fn clone(&self) -> ScriptStatement
Returns a copy of the value. Read more
1.0.0 · 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 ScriptStatement
impl Debug for ScriptStatement
source§impl Display for ScriptStatement
impl Display for ScriptStatement
source§impl PartialEq for ScriptStatement
impl PartialEq for ScriptStatement
impl StructuralPartialEq for ScriptStatement
Auto Trait Implementations§
impl Freeze for ScriptStatement
impl RefUnwindSafe for ScriptStatement
impl Send for ScriptStatement
impl Sync for ScriptStatement
impl Unpin for ScriptStatement
impl UnwindSafe for ScriptStatement
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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