mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-11-08 02:18:57 +00:00
Add SQLAssignment struct for use in INSERT
This commit is contained in:
parent
0d36aa536a
commit
e19d559073
1 changed files with 9 additions and 4 deletions
|
|
@ -93,10 +93,8 @@ pub enum ASTNode {
|
||||||
SQLUpdate {
|
SQLUpdate {
|
||||||
/// TABLE
|
/// TABLE
|
||||||
table_name: String,
|
table_name: String,
|
||||||
/// Columns being assigned
|
/// Column assignments
|
||||||
columns: Vec<String>,
|
assignemnts: Vec<SQLAssigment>,
|
||||||
/// Values being assigned
|
|
||||||
values: Vec<ASTNode>,
|
|
||||||
/// WHERE
|
/// WHERE
|
||||||
selection: Option<Box<ASTNode>>,
|
selection: Option<Box<ASTNode>>,
|
||||||
},
|
},
|
||||||
|
|
@ -119,6 +117,13 @@ pub enum ASTNode {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// SQL assignment `foo = expr` as used in SQLUpdate
|
||||||
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
|
pub struct SQLAssigment {
|
||||||
|
id: String,
|
||||||
|
value: Box<ASTNode>
|
||||||
|
}
|
||||||
|
|
||||||
/// SQL column definition
|
/// SQL column definition
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct SQLColumnDef {
|
pub struct SQLColumnDef {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue