mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-03 05:32:17 +00:00
feat: support byte string literal in bq (#802)
* rebase * review * lint
This commit is contained in:
parent
c35dcc93a7
commit
0c0d088ec2
4 changed files with 58 additions and 1 deletions
|
@ -41,6 +41,10 @@ pub enum Value {
|
|||
/// See [Postgres docs](https://www.postgresql.org/docs/8.3/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS)
|
||||
/// for more details.
|
||||
EscapedStringLiteral(String),
|
||||
/// B'string value'
|
||||
SingleQuotedByteStringLiteral(String),
|
||||
/// B"string value"
|
||||
DoubleQuotedByteStringLiteral(String),
|
||||
/// N'string value'
|
||||
NationalStringLiteral(String),
|
||||
/// X'hex value'
|
||||
|
@ -68,6 +72,8 @@ impl fmt::Display for Value {
|
|||
Value::NationalStringLiteral(v) => write!(f, "N'{v}'"),
|
||||
Value::HexStringLiteral(v) => write!(f, "X'{v}'"),
|
||||
Value::Boolean(v) => write!(f, "{v}"),
|
||||
Value::SingleQuotedByteStringLiteral(v) => write!(f, "B'{v}'"),
|
||||
Value::DoubleQuotedByteStringLiteral(v) => write!(f, "B\"{v}\""),
|
||||
Value::Null => write!(f, "NULL"),
|
||||
Value::Placeholder(v) => write!(f, "{v}"),
|
||||
Value::UnQuotedString(v) => write!(f, "{v}"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue