return all invoked tables by a sql statement

@return invoked tables in a ArrayList
@throws ParseException
435155
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;
    }
125187
public List<SqlResultSetMapping<EntityMappings<T>>> getAllSqlResultSetMapping()
   {
      List<SqlResultSetMapping<EntityMappings<T>>> list = new ArrayList<SqlResultSetMapping<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("sql-result-set-mapping");
      for(Node node: nodeList)
      {
         SqlResultSetMapping<EntityMappings<T>>  type = new SqlResultSetMappingImpl<EntityMappings<T>>(this, "sql-result-set-mapping", childNode, node);
         list.add(type);
      }
      return list;
   }
1268816
@Override
    public String buildAllDataSql()
    {
        String sql="select * from ${tablename} ${order}";
        String tablename= ModelHelper.getTableName(this.getClass());
        sql= StringUtil.replace(sql,"${tablename}",tablename);
        sql= StringUtil.replace(sql,"${order}",StringUtil.isNullOrEmpty(buildDefaultOrders())?"":" order by "+buildDefaultOrders());
        return sql;
    }
749097
@SuppressWarnings("unchecked")
	public static List<String> allStrings(PreparedStatement stmt) throws SQLException {
		return (List<String>) all(stmt, String.class);
	}
64717
private Vector getAllTables() {

        Vector result = new Vector(20);

        try {
            if (cConn == null) {
                return null;
            }

            dbmeta = cConn.getMetaData();

            String[] tableTypes = { "TABLE" };
            ResultSet allTables = dbmeta.getTables(null, null, null,
                                                   tableTypes);

            while (allTables.next()) {
                String aktTable = allTables.getString("TABLE_NAME");
                ResultSet primKeys = dbmeta.getPrimaryKeys(null, null,
                    aktTable);

                // take only table with a primary key
                if (primKeys.next()) {
                    result.addElement(aktTable);
                }

                primKeys.close();
            }

            allTables.close();
        } catch (SQLException e) {

            // System.out.println("SQL Exception: " + e.getMessage());
        }

        return result;
    }
475141
public List<Statement> getAllStatements() {
        List<Statement> ret = new ArrayList<Statement>();

        // Statements within this group
        if (statements != null) {
            ret.addAll(statements);
        }

        // Statements within nested statement groups
        if (statementGroups != null) {
            for (final StatementGroup sg : statementGroups)
                ret.addAll(sg.getAllStatements());
        }

        return ret;
    }
750826
@Override
	public List<RecordParam> getAll () throws DatabaseException {
    	try {
			List<RecordParam> result = new ArrayList<>();
			try (ResultSet rs = psGetAll.executeQuery()) {
				while (rs.next()) {
					result.add(new RecordParam(rs.getLong(PARAMID), rs.getString(SITE), rs.getString(TYPE),  
							rs.getString(NAME), rs.getInt(USED), rs.getString(FLAGS), rs.getString(VALUES)));
				}
			}
			
			return result;
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }
924613
public static List<String> listAllTables() {
		int items = 100;
		ListTablesResult ltr = getClient().listTables(items);
		List<String> tables = new LinkedList<>();
		String lastKey;
		do {
			tables.addAll(ltr.getTableNames());
			lastKey = ltr.getLastEvaluatedTableName();
			logger.info("Found {} tables. Total found: {}.", ltr.getTableNames().size(), tables.size());
			if (lastKey == null) {
				break;
			}
			ltr = getClient().listTables(lastKey, items);
		} while (!ltr.getTableNames().isEmpty());
		return tables;
	}
942876
public List<T> all() {
        this.beforeCheck();
        String  sql    = this.buildSelectSQL(true);
        List<T> models = this.queryList(modelClass, sql, paramValues);
        this.setJoin(models);
        return models;
    }
1262669
public List<Table> asTableList() {
        List<Table> tableList = new ArrayList<>();
        for (TableSlice view : this) {
            tableList.add(view.asTable());
        }
        return tableList;
    }
409267
protected function _getTables()
    {
        $prefix = \JFactory::getApplication()->get('dbprefix');
        $dbo    = \JFactory::getDbo();
        $tables = array();

        foreach (\JFactory::getDbo()->getTableList() as $table)
        {
            // Only check in tables with a prefix
            if (stripos($table, $prefix) === 0)
            {
                $columns = $dbo->getTableColumns($table);

                // Make sure that the table has the check in columns
                if (!isset($columns[$this->_user_column]) || !isset($columns[$this->_date_column])) {
                    continue;
                }

                // Check the column's types.
                if (stripos($columns[$this->_user_column], 'int') !== 0 || stripos($columns[$this->_date_column], 'date') !== 0) {
                    continue;
                }

                $query = $dbo->getQuery(true)
                             ->select('COUNT(*)')
                             ->from($dbo->quoteName($table))
                             ->where(sprintf('%s > 0', $this->_user_column));

                $dbo->setQuery($query);

                // Only include tables that need to be checked in
                if (!$dbo->execute() || !$dbo->loadResult()) {
                    continue;
                }

                $tables[] = str_replace($prefix, '', $table);
            }
        }

        return $tables;
    }
1084144
public List<QueryResult> executeQuery() throws SQLException {
        final boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
        SQLExecuteCallback<QueryResult> executeCallback = new SQLExecuteCallback<QueryResult>(getDatabaseType(), isExceptionThrown) {
            
            @Override
            protected QueryResult executeSQL(final RouteUnit routeUnit, final Statement statement, final ConnectionMode connectionMode) throws SQLException {
                return getQueryResult(routeUnit, statement, connectionMode);
            }
        };
        return executeCallback(executeCallback);
    }
189811
protected List<String> getDropTablesSQL() {
        List<String> sqlStatements = new ArrayList<>();
        sqlStatements.add(DROP_SETTINGS_TABLE);
        sqlStatements.add(DROP_HEADERS_TABLE);
        sqlStatements.add(DROP_UNDOABLE_TABLE);
        sqlStatements.add(DROP_OPEN_OUTPUT_TABLE);
        return sqlStatements;
    }
10827
protected <T> ArrayList<T> loadAll (final Table<T> table,
                                        final String query)
        throws PersistenceException
    {
        return execute(new Operation<ArrayList<T>>() {
            public ArrayList<T> invoke (
                Connection conn, DatabaseLiaison liaison)
                throws SQLException, PersistenceException
            {
                return table.select(conn, query).toArrayList();
            }
        });
    }
467565
public ArrayList<I> getInvocations()
  {
    LruCache<Object,I> invocationCache = _invocationCache;

    ArrayList<I> invocationList = new ArrayList<>();
      
    synchronized (invocationCache) {
      Iterator<I> iter;
      iter = invocationCache.values();

      while (iter.hasNext()) {
        invocationList.add(iter.next());
      }
    }

    return invocationList;
  }
439888
private List<String> getFedoraTables() {
        try {
            InputStream in =
                    getClass().getClassLoader()
                            .getResourceAsStream(DBSPEC_LOCATION);
            List<TableSpec> specs = TableSpec.getTableSpecs(in);
            ArrayList<String> names = new ArrayList<String>();
            for (TableSpec spec: specs) {
                names.add(spec.getName().toUpperCase());
            }
            return names;
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("Unexpected error reading dbspec file",
                                       e);
        }
    }
1306935
public List<Object[]> select(Sql sql) throws SQLException {
		
		long start =  System.currentTimeMillis();
		
		if (sql.validate() == false) {
			return null;
		}
		
		List<Object[]> dataList = null;
		
		if (sql.isSelect()) {
			
			ResultSet rs = null;
			PreparedStatement stmt = null;

			try {
				stmt = this.createStatment(conn, sql);
				rs = stmt.executeQuery();
				
				dataList = getResultSet(rs);

			} catch (SQLException e) {
				throw e;
			} finally {
				try {
					if (rs != null && rs.isClosed() == false) {
						rs.close();
					}
					if (stmt != null && stmt.isClosed() == false) {
						stmt.close();
					}
				} catch (SQLException e) {
					throw e;
				}
			}
		}
		
		logger.debug(String.format("Execute %s used %d ms", sql.getSql(), System.currentTimeMillis() - start));
		
		return dataList;
	}