mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-12 23:12:01 +00:00
Enhance object name path segments (#1539)
This commit is contained in:
parent
fd6c98e933
commit
211b15e790
20 changed files with 584 additions and 466 deletions
|
@ -353,7 +353,7 @@ pub fn table_alias(name: impl Into<String>) -> Option<TableAlias> {
|
|||
|
||||
pub fn table(name: impl Into<String>) -> TableFactor {
|
||||
TableFactor::Table {
|
||||
name: ObjectName(vec![Ident::new(name.into())]),
|
||||
name: ObjectName::from(vec![Ident::new(name.into())]),
|
||||
alias: None,
|
||||
args: None,
|
||||
with_hints: vec![],
|
||||
|
@ -381,7 +381,7 @@ pub fn table_from_name(name: ObjectName) -> TableFactor {
|
|||
|
||||
pub fn table_with_alias(name: impl Into<String>, alias: impl Into<String>) -> TableFactor {
|
||||
TableFactor::Table {
|
||||
name: ObjectName(vec![Ident::new(name)]),
|
||||
name: ObjectName::from(vec![Ident::new(name)]),
|
||||
alias: Some(TableAlias {
|
||||
name: Ident::new(alias),
|
||||
columns: vec![],
|
||||
|
@ -406,7 +406,7 @@ pub fn join(relation: TableFactor) -> Join {
|
|||
|
||||
pub fn call(function: &str, args: impl IntoIterator<Item = Expr>) -> Expr {
|
||||
Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new(function)]),
|
||||
name: ObjectName::from(vec![Ident::new(function)]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue