public class SqlNameContext extends Object
This problem is further exacerbated by: 1) a SELECT can have many sub-SELECTs inside it, each one defining their own independent aliases 2) a SQL command might not have all the necessary info to infer the right table for a column. In those (valid) cases of ambiguity, we must refer to the schema
| Modifier and Type | Field and Description |
|---|---|
static String |
UNNAMED_TABLE |
| Constructor and Description |
|---|
SqlNameContext(net.sf.jsqlparser.statement.Statement statement)
WARNING: should only be used in tests, to avoid each time having
to provide a schema for the test data
|
SqlNameContext(net.sf.jsqlparser.statement.Statement statement,
DbSchemaDto schema) |
public static final String UNNAMED_TABLE
public SqlNameContext(net.sf.jsqlparser.statement.Statement statement)
statement - to create context forpublic SqlNameContext(net.sf.jsqlparser.statement.Statement statement,
DbSchemaDto schema)
public String getTableName(net.sf.jsqlparser.schema.Column column)
column - a column objectCopyright © 2016–2021. All rights reserved.