Java Code Examples for net.sf.jsqlparser.schema.Table#getAlias()

The following examples show how to use net.sf.jsqlparser.schema.Table#getAlias() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UsedColumnExtractorVisitor.java    From evosql with Apache License 2.0 5 votes vote down vote up
@Override
public void visit(Table arg0) {
	// This can only happen in a FROM, source the table
	String tableName = arg0.getName();
	String tableAlias = tableName;
	
	// Handle alias
	if (arg0.getAlias() != null) {
		tableAlias = arg0.getAlias().getName();
	}
	
	sourceTable(tableName, tableAlias);
}
 
Example 2
Source File: SqlSecurerVisitor.java    From evosql with Apache License 2.0 5 votes vote down vote up
@Override
public void visit(Table arg0) {
	if (arg0.getName() == null) return;
	
	arg0.setName(secureName(arg0.getName()));
	
	// Handle alias
	if (arg0.getAlias() != null) {
		arg0.getAlias().setName(secureName(arg0.getAlias().getName()));
	}
}
 
Example 3
Source File: CryptoVisitor.java    From evosql with Apache License 2.0 5 votes vote down vote up
@Override
public void visit(Table arg0) {
	if (arg0.getName() == null) return;
	
	arg0.setName(transform(arg0.getName()));
	
	// Handle alias
	if (arg0.getAlias() != null) {
		arg0.getAlias().setName(transform(arg0.getAlias().getName()));
	}
}
 
Example 4
Source File: TableRef.java    From herddb with Apache License 2.0 5 votes vote down vote up
static TableRef buildFrom(Table fromTable, String defaultTableSpace) {
    String tableSpace = fromTable.getSchemaName();
    String tableName = fromTable.getName();
    String tableAlias = tableName;
    if (fromTable.getAlias() != null && fromTable.getAlias().getName() != null) {
        tableAlias = fromTable.getAlias().getName();
    }
    if (tableSpace == null) {
        tableSpace = defaultTableSpace;
    }
    return new TableRef(tableSpace, tableName, tableAlias);
}
 
Example 5
Source File: SqlToCqlTranslator.java    From cassandra-jdbc-driver with Apache License 2.0 4 votes vote down vote up
public void visit(Table tableName) {
    if (tableName.getAlias() != null) {
        tableName.setAlias(null);
    }
}