Java Code Examples for net.sf.jsqlparser.statement.select.AllTableColumns

The following examples show how to use net.sf.jsqlparser.statement.select.AllTableColumns. These examples are extracted from open source projects. 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 Project: spanner-jdbc   Source File: CloudSpannerResultSetMetaData.java    License: MIT License 5 votes vote down vote up
private void initColumns(Select select) {
  columns = new ArrayList<>();
  aliases = new ArrayList<>();
  select.getSelectBody().accept(new SelectVisitorAdapter() {
    @Override
    public void visit(PlainSelect plainSelect) {
      for (SelectItem selectItem : plainSelect.getSelectItems()) {
        selectItem.accept(new SelectItemVisitor() {
          private boolean foundColumn = false;

          @Override
          public void visit(SelectExpressionItem selectExpressionItem) {
            selectExpressionItem.getExpression().accept(new ExpressionVisitorAdapter() {
              @Override
              public void visit(Column column) {
                registerColumn(column, selectExpressionItem.getAlias());
                foundColumn = true;
              }
            });
            if (!foundColumn) {
              registerColumn(null, selectExpressionItem.getAlias());
            }
          }

          @Override
          public void visit(AllTableColumns allTableColumns) {
            registerAllTableColumns(allTableColumns.getTable());
          }

          @Override
          public void visit(AllColumns allColumns) {
            for (Table table : tables) {
              registerAllTableColumns(table);
            }
          }
        });
      }
    }
  });
}
 
Example 2
@Override
public void visit(AllTableColumns allTableColumns) {
}
 
Example 3
Source Project: spanner-jdbc   Source File: DMLWhereClauseVisitorAdapter.java    License: MIT License 4 votes vote down vote up
@Override
public void visit(AllTableColumns allTableColumns) {
  invalid = true;
  super.visit(allTableColumns);
}