mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-02 21:22:15 +00:00
support json_object('k':'v')
in postgres (#1546)
This commit is contained in:
parent
fd21fae297
commit
525d1780e8
3 changed files with 191 additions and 160 deletions
|
@ -211,6 +211,26 @@ impl Dialect for PostgreSqlDialect {
|
|||
fn supports_load_extension(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// See <https://www.postgresql.org/docs/current/functions-json.html>
|
||||
///
|
||||
/// Required to support the colon in:
|
||||
/// ```sql
|
||||
/// SELECT json_object('a': 'b')
|
||||
/// ```
|
||||
fn supports_named_fn_args_with_colon_operator(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// See <https://www.postgresql.org/docs/current/functions-json.html>
|
||||
///
|
||||
/// Required to support the label in:
|
||||
/// ```sql
|
||||
/// SELECT json_object('label': 'value')
|
||||
/// ```
|
||||
fn supports_named_fn_args_with_expr_name(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_create(parser: &mut Parser) -> Option<Result<Statement, ParserError>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue