edu.uvm.ccts.common.sql.SqlStatement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ccts-common Show documentation
Show all versions of ccts-common Show documentation
A library of useful generic objects and tools consolidated here to simplify all UVM CCTS projects
/*
* Copyright 2015 The University of Vermont and State
* Agricultural College. All rights reserved.
*
* Written by Matthew B. Storer
*
* This file is part of CCTS Common.
*
* CCTS Common is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CCTS Common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CCTS Common. If not, see .
*/
package edu.uvm.ccts.common.sql;
import com.foundationdb.sql.StandardException;
import com.foundationdb.sql.parser.*;
import edu.uvm.ccts.common.sql.exceptions.TableNotFoundException;
import edu.uvm.ccts.common.sql.model.Field;
import edu.uvm.ccts.common.sql.model.Table;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* Created by mstorer on 11/1/13.
*/
public class SqlStatement {
private static final Log log = LogFactory.getLog(SqlStatement.class);
private static final List whitespaceChars = Arrays.asList(' ', '\n', '\r', '\t');
private String sql;
private StatementNode stmtNode;
private List selectedFields = null;
private List tables = null;
private List