Declare in sqlparser::ast - Rust

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;

The name(s) being declared. Example: `DECLARE a, b, c DEFAULT 42;

Data-type assigned to the declared variable. Example: `DECLARE x INT64 DEFAULT 42;

Expression being assigned to the declared variable.

Represents the type of the declared variable.

Causes the cursor to return data in binary rather than in text format.

None = Not specified Some(true) = INSENSITIVE Some(false) = ASENSITIVE

None = Not specified Some(true) = SCROLL Some(false) = NO SCROLL

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> clause in a CURSOR declaration.

§
§
§
§
§
§