mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-11-01 23:50:56 +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 {
|
||||
/// TABLE
|
||||
table_name: String,
|
||||
/// Columns being assigned
|
||||
columns: Vec<String>,
|
||||
/// Values being assigned
|
||||
values: Vec<ASTNode>,
|
||||
/// Column assignments
|
||||
assignemnts: Vec<SQLAssigment>,
|
||||
/// WHERE
|
||||
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
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct SQLColumnDef {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue