mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-13 15:32:03 +00:00
Introduce SQLObjectName struct (4.1/4.4)
(To store "A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj".) Before this change - some places used `String` for this (these are updated in this commit) - while others (notably SQLStatement::SQLDelete::relation, which is the reason for this series of commits) relied on ASTNode::SQLCompoundIdentifier (which is also backed by a Vec<SQLIdent>, but, as a variant of ASTNode enum, is not convenient to use when you know you need that specific variant).
This commit is contained in:
parent
215820ef66
commit
523f086be7
6 changed files with 42 additions and 27 deletions
|
@ -364,7 +364,7 @@ fn parse_create_table() {
|
|||
);
|
||||
match ast {
|
||||
SQLStatement::SQLCreateTable { name, columns } => {
|
||||
assert_eq!("uk_cities", name);
|
||||
assert_eq!("uk_cities", name.to_string());
|
||||
assert_eq!(3, columns.len());
|
||||
|
||||
let c_name = &columns[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue