All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.diff.handler.parse.sqlparse.select.ArexSelectItemVisitorAdapter Maven / Gradle / Ivy

There is a newer version: 0.2.15
Show newest version
package com.arextest.diff.handler.parse.sqlparse.select;

import com.arextest.diff.handler.parse.sqlparse.constants.DbParseConstants;
import com.fasterxml.jackson.databind.node.ObjectNode;
import net.sf.jsqlparser.statement.select.AllColumns;
import net.sf.jsqlparser.statement.select.AllTableColumns;
import net.sf.jsqlparser.statement.select.SelectExpressionItem;
import net.sf.jsqlparser.statement.select.SelectItemVisitor;

/**
 * Created by rchen9 on 2023/1/6.
 */
public class ArexSelectItemVisitorAdapter implements SelectItemVisitor {

  private ObjectNode sqlObject;

  public ArexSelectItemVisitorAdapter(ObjectNode object) {
    sqlObject = object;
  }

  @Override
  public void visit(AllColumns allColumns) {
    sqlObject.put(allColumns.toString(), DbParseConstants.EMPTY);
  }

  @Override
  public void visit(AllTableColumns allTableColumns) {
    sqlObject.put(allTableColumns.toString(), DbParseConstants.EMPTY);
  }

  @Override
  public void visit(SelectExpressionItem selectExpressionItem) {
    sqlObject.put(selectExpressionItem.toString(), DbParseConstants.EMPTY);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy