Closed tokcum closed 3 months ago
Hi,
is it possible to get the table names from a parsed SQL statement? I've extracted a One from a simple SQL statement parsed by Parser. This is what I have so far:
One
Parser
Select { distinctness: None, columns: [Star], from: Some(FromClause { select: Some(Table(QualifiedName { db_name: None, name: Name("users"), alias: None }, None, None)), joins: None, op: None }), where_clause: None, group_by: None, window_clause: None }
The SQL statement behind this is SELECT * FROM users;
SELECT * FROM users;
How could I access the FromClause? I've implemented TokenStream but it returns the SQL tokens only, not my own literals. Do I miss something?
FromClause
TokenStream
Any advice appreciated. Thank you.
Reading the source code, I managed to fully dissect the SQL statement and access the data in the FromClause.
Thank you for this crate!
Hi,
is it possible to get the table names from a parsed SQL statement? I've extracted a
One
from a simple SQL statement parsed byParser
. This is what I have so far:The SQL statement behind this is
SELECT * FROM users;
How could I access the
FromClause
? I've implementedTokenStream
but it returns the SQL tokens only, not my own literals. Do I miss something?Any advice appreciated. Thank you.