Enhance object name path segments (#1539)

This commit is contained in:
Ayman Elkfrawy 2025-01-26 06:13:51 -08:00 committed by GitHub
parent fd6c98e933
commit 211b15e790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 584 additions and 466 deletions

View file

@ -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 {