pub struct Declare {
pub names: Vec<Ident>,
pub data_type: Option<DataType>,
pub assignment: Option<DeclareAssignment>,
pub declare_type: Option<DeclareType>,
pub binary: Option<bool>,
pub sensitive: Option<bool>,
pub scroll: Option<bool>,
pub hold: Option<bool>,
pub for_query: Option<Box<Query>>,
}Expand description
A DECLARE statement.
PostgreSQL Snowflake BigQuery
Examples:
DECLARE variable_name := 42
DECLARE liahona CURSOR FOR SELECT * FROM films;Fields§
§names: Vec<Ident>The name(s) being declared. Example: `DECLARE a, b, c DEFAULT 42;
data_type: Option<DataType>Data-type assigned to the declared variable. Example: `DECLARE x INT64 DEFAULT 42;
assignment: Option<DeclareAssignment>Expression being assigned to the declared variable.
declare_type: Option<DeclareType>Represents the type of the declared variable.
binary: Option<bool>Causes the cursor to return data in binary rather than in text format.
sensitive: Option<bool>None = Not specified Some(true) = INSENSITIVE Some(false) = ASENSITIVE
scroll: Option<bool>None = Not specified Some(true) = SCROLL Some(false) = NO SCROLL
hold: Option<bool>None = Not specified Some(true) = WITH HOLD, specifies that the cursor can continue to be used after the transaction that created it successfully commits Some(false) = WITHOUT HOLD, specifies that the cursor cannot be used outside of the transaction that created it
for_query: Option<Box<Query>>FOR <query> clause in a CURSOR declaration.
Trait Implementations§
Source§impl Ord for Declare
impl Ord for Declare
Source§impl PartialOrd for Declare
impl PartialOrd for Declare
Source§impl<'ast> Transformable<'ast> for Declare
impl<'ast> Transformable<'ast> for Declare
Source§impl Visitable for Declare
impl Visitable for Declare
Source§fn accept<'ast, V: Visitor<'ast>>(
&'ast self,
visitor: &mut V,
) -> ControlFlow<Break<V::Error>>
fn accept<'ast, V: Visitor<'ast>>( &'ast self, visitor: &mut V, ) -> ControlFlow<Break<V::Error>>
Visitor and traverses the AST starting at self invoking Visitor::enter and
Visitor::exit as nodes are entered and exiting respectively.Source§fn downcast_ref<Target: Visitable>(&self) -> Option<&Target>
fn downcast_ref<Target: Visitable>(&self) -> Option<&Target>
self as &Target.Source§fn downcast_mut<Target: Visitable>(&mut self) -> Option<&mut Target>
fn downcast_mut<Target: Visitable>(&mut self) -> Option<&mut Target>
self as &mut Target.