Search in sources :

Example 1 with ZStatement

use of lucee.runtime.sql.old.ZStatement in project Lucee by lucee.

the class HSQLUtil method getInvokedTables.

/**
 * return all invoked tables by a sql statement
 * @return invoked tables in a ArrayList
 * @throws ParseException
 */
public Set<String> getInvokedTables() throws ParseException {
    // Read all SQL statements from input
    ZStatement st;
    Set<String> tables = new HashSet<String>();
    while ((st = parser.readStatement()) != null) {
        this.sql = st.toString();
        if (st instanceof ZQuery) {
            // An SQL query: query the DB
            getInvokedTables((ZQuery) st, tables);
        }
        break;
    }
    return tables;
}
Also used : ZStatement(lucee.runtime.sql.old.ZStatement) ZQuery(lucee.runtime.sql.old.ZQuery) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 ZQuery (lucee.runtime.sql.old.ZQuery)1 ZStatement (lucee.runtime.sql.old.ZStatement)1