/** Generates a 'DELETE FROM' prepared statement. */ protected PreparedStatement deleteSQLPS( SimpleFeatureType featureType, Filter filter, Connection cx) throws SQLException { StringBuffer sql = new StringBuffer(); sql.append("DELETE FROM "); encodeTableName(featureType.getTypeName(), sql, null); PreparedFilterToSQL toSQL = null; if (filter != null && !Filter.INCLUDE.equals(filter)) { // encode filter try { toSQL = createPreparedFilterToSQL(featureType); sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e); } } LOGGER.fine(sql.toString()); PreparedStatement ps = cx.prepareStatement(sql.toString()); if (toSQL != null) { setPreparedFilterValues(ps, toSQL, 0, cx); } return ps; }
whereClauseIndex, whereClauseIndex + WHERE_CLAUSE_PLACE_HOLDER_LENGTH, "AND " + toSQL.encodeToString(filter)); toSQL.setInline(false); } else { sql.append(" ").append(toSQL.encodeToString(filter));
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
/** * Generates a 'DELETE FROM' prepared statement. */ protected PreparedStatement deleteSQLPS(SimpleFeatureType featureType, Filter filter, Connection cx ) throws SQLException { StringBuffer sql = new StringBuffer(); sql.append("DELETE FROM "); encodeTableName(featureType.getTypeName(), sql, null); PreparedFilterToSQL toSQL = null; if (filter != null && !Filter.INCLUDE.equals(filter)) { //encode filter try { toSQL = createPreparedFilterToSQL(featureType); sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e); } } LOGGER.fine( sql.toString() ); PreparedStatement ps = cx.prepareStatement(sql.toString()); if ( toSQL != null ) { setPreparedFilterValues(ps, toSQL, 0, cx); } return ps; }
/** * Generates a 'DELETE FROM' prepared statement. */ protected PreparedStatement deleteSQLPS(SimpleFeatureType featureType, Filter filter, Connection cx ) throws SQLException { StringBuffer sql = new StringBuffer(); sql.append("DELETE FROM "); encodeTableName(featureType.getTypeName(), sql); PreparedFilterToSQL toSQL = null; if (filter != null && !Filter.INCLUDE.equals(filter)) { //encode filter try { toSQL = createPreparedFilterToSQL(featureType); sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e); } } LOGGER.fine( sql.toString() ); PreparedStatement ps = cx.prepareStatement(sql.toString()); if ( toSQL != null ) { setPreparedFilterValues(ps, toSQL, 0, cx); } return ps; }
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);
sql.append(" ").append(toSQL.encodeToString(filter)); } catch (FilterToSQLException e) { throw new RuntimeException(e);