mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
set: allow dots in variables by moving to ObjectName (#484)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
This commit is contained in:
parent
835bb2f9ad
commit
6d057ef4df
3 changed files with 41 additions and 9 deletions
|
@ -3266,7 +3266,7 @@ impl<'a> Parser<'a> {
|
|||
});
|
||||
}
|
||||
|
||||
let variable = self.parse_identifier()?;
|
||||
let variable = self.parse_object_name()?;
|
||||
if self.consume_token(&Token::Eq) || self.parse_keyword(Keyword::TO) {
|
||||
let mut values = vec![];
|
||||
loop {
|
||||
|
@ -3287,14 +3287,14 @@ impl<'a> Parser<'a> {
|
|||
value: values,
|
||||
});
|
||||
}
|
||||
} else if variable.value == "CHARACTERISTICS" {
|
||||
} else if variable.to_string() == "CHARACTERISTICS" {
|
||||
self.expect_keywords(&[Keyword::AS, Keyword::TRANSACTION])?;
|
||||
Ok(Statement::SetTransaction {
|
||||
modes: self.parse_transaction_modes()?,
|
||||
snapshot: None,
|
||||
session: true,
|
||||
})
|
||||
} else if variable.value == "TRANSACTION" && modifier.is_none() {
|
||||
} else if variable.to_string() == "TRANSACTION" && modifier.is_none() {
|
||||
if self.parse_keyword(Keyword::SNAPSHOT) {
|
||||
let snaphot_id = self.parse_value()?;
|
||||
return Ok(Statement::SetTransaction {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue