public DatabaseResults runQuery(ObjectCache objectCache) throws SQLException { if (!type.isOkForQuery()) { throw new IllegalArgumentException("Cannot call query on a " + type + " statement"); } return new JdbcDatabaseResults( preparedStatement, preparedStatement.executeQuery(), objectCache); }