Delete the Data Columns Constraints, cascading

@param constraints
data column constraints
@return deleted count
@throws SQLException
upon failure
429909
public int deleteCascade(DataColumnConstraints constraints)
			throws SQLException {
		int count = 0;

		if (constraints != null) {

			// Check if the last remaining constraint with the constraint name
			// is being deleted
			List<DataColumnConstraints> remainingConstraints = queryByConstraintName(constraints
					.getConstraintName());
			if (remainingConstraints.size() == 1) {

				DataColumnConstraints remainingConstraint = remainingConstraints
						.get(0);

				// Compare the name, type, and value
				if (remainingConstraint.getConstraintName().equals(
						constraints.getConstraintName())
						&& remainingConstraint.getConstraintType().equals(
								constraints.getConstraintType())
						&& (remainingConstraint.getValue() == null ? constraints
								.getValue() == null : remainingConstraint
								.getValue().equals(constraints.getValue()))) {

					// Delete Data Columns
					DataColumnsDao dao = getDataColumnsDao();
					List<DataColumns> dataColumnsCollection = dao
							.queryByConstraintName(constraints
									.getConstraintName());
					if (!dataColumnsCollection.isEmpty()) {
						dao.delete(dataColumnsCollection);
					}
				}
			}

			// Delete
			count = delete(constraints);
		}
		return count;
	}
600089
public void dropPrimaryKey (Connection conn, String table, String pkName) throws SQLException
    {
        executeQuery(conn, "ALTER TABLE " + tableSQL(table) +
                     " DROP CONSTRAINT " + columnSQL(pkName));
    }
382180
public int deleteCascade(PreparedQuery<DataColumnConstraints> preparedDelete)
			throws SQLException {
		int count = 0;
		if (preparedDelete != null) {
			List<DataColumnConstraints> constraintsList = query(preparedDelete);
			count = deleteCascade(constraintsList);
		}
		return count;
	}
56880
private void deleteByQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("deleteByQuery " + cld.getClassNameOfObject() + ", " + query);
        }

        if (query instanceof QueryBySQL)
        {
            String sql = ((QueryBySQL) query).getSql();
            this.dbAccess.executeUpdateSQL(sql, cld);
        }
        else
        {
            // if query is Identity based transform it to a criteria based query first
            if (query instanceof QueryByIdentity)
            {
                QueryByIdentity qbi = (QueryByIdentity) query;
                Object oid = qbi.getExampleObject();
                // make sure it's an Identity
                if (!(oid instanceof Identity))
                {
                    oid = serviceIdentity().buildIdentity(oid);
                }
                query = referencesBroker.getPKQuery((Identity) oid);
            }

            if (!cld.isInterface())
            {
                this.dbAccess.executeDelete(query, cld);
            }

            // if class is an extent, we have to delete all extent classes too
            String lastUsedTable = cld.getFullTableName();
            if (cld.isExtent())
            {
                Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator();

                while (extents.hasNext())
                {
                    ClassDescriptor extCld = (ClassDescriptor) extents.next();

                    // read same table only once
                    if (!extCld.getFullTableName().equals(lastUsedTable))
                    {
                        lastUsedTable = extCld.getFullTableName();
                        this.dbAccess.executeDelete(query, extCld);
                    }
                }
            }

        }
    }
891630
public Query constrainedBy( Constraint constraint ) {
        return new Query(source, constraint, orderings(), columns, getLimits(), distinct);
    }
417629
public int deleteCascade(
			PreparedQuery<SpatialReferenceSystem> preparedDelete)
			throws SQLException {
		int count = 0;
		if (preparedDelete != null) {
			List<SpatialReferenceSystem> srsList = query(preparedDelete);
			count = deleteCascade(srsList);
		}
		return count;
	}
1207293
public int deleteByExtension(String extensionName, String tableName)
			throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();

		setUniqueWhere(db.where(), extensionName, true, tableName, false, null);

		int deleted = db.delete();

		return deleted;
	}
1217245
def _delete_null_columns(self):
        
        ds = DeleteStatement(self.column_family_name)
        deleted_fields = False
        for _, v in self.instance._values.items():
            col = v.column
            if v.deleted:
                ds.add_field(col.db_field_name)
                deleted_fields = True
            elif isinstance(col, Map):
                uc = MapDeleteClause(col.db_field_name, v.value, v.previous_value)
                if uc.get_context_size() > 0:
                    ds.add_field(uc)
                    deleted_fields = True

        if deleted_fields:
            for name, col in self.model._primary_keys.items():
                ds.add_where_clause(WhereClause(
                    col.db_field_name,
                    EqualsOperator(),
                    col.to_database(getattr(self.instance, name))
                ))
            self._execute(ds)
750078
public int deleteByIdCascade(Long id) throws SQLException {
		int count = 0;
		if (id != null) {
			SpatialReferenceSystem srs = queryForId(id);
			if (srs != null) {
				count = deleteCascade(srs);
			}
		}
		return count;
	}
761092
public function dropConstraint(Constraint $constraint, $table)
    {
        $this->_execSql($this->_platform->getDropConstraintSQL($constraint, $table));
    }
388521
@Override
    public Collection<Bean> delete(String schemaName, Collection<String> instanceIds)
            throws AbortRuntimeException {
        init();
        Map<BeanId, Bean> deleted = list(schemaName, instanceIds);
        Set<HBeanRow> rows = new HashSet<>();
        for (String id : instanceIds) {
            rows.add(new HBeanRow(BeanId.create(id, schemaName), uids));
        }
        try {
            rows = table.getEager(rows).getRows();
            ArrayList<BeanId> predecessors = new ArrayList<>();
            for (HBeanRow row : rows) {
                for (BeanId id : row.getPredecessorsBeanIds()) {
                    predecessors.add(id);
                }
            }
            if (predecessors.size() > 0) {
                throw Events.CFG302_CANNOT_DELETE_BEAN(predecessors);
            }
        } catch (HBeanNotFoundException e) {
            throw Events.CFG304_BEAN_DOESNT_EXIST(e.getNotFound().iterator().next());
        }
        table.delete(rows);
        return deleted.values();
    }
989262
public int deleteCascade(PreparedQuery<Metadata> preparedDelete)
			throws SQLException {
		int count = 0;
		if (preparedDelete != null) {
			List<Metadata> metadataList = query(preparedDelete);
			count = deleteCascade(metadataList);
		}
		return count;
	}
48818
public void clear() throws SQLException {
        clearStatements();
        statements.clear();
        parameterSets.clear();
        connections.clear();
        resultSets.clear();
        executeGroups.clear();
    }
112152
@Override
    public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue)
    {

        if (!isOpen())
        {
            throw new PersistenceException("PelopsClient is closed.");
        }

        RowDeletor rowDeletor = clientFactory.getRowDeletor(pool);
        rowDeletor.deleteRow(tableName,
                Bytes.fromByteBuffer(CassandraUtilities.toBytes(columnValue, columnValue.getClass())),
                getConsistencyLevel());

    }
847410
public int delete(String sql) {
        String msId = msUtils.delete(sql);
        return sqlSession.delete(msId);
    }
232048
@SuppressWarnings("unchecked")
	@Override
	public <E> SqlEntityDelete<E> delete(final Class<? extends E> entityType) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isAssignableFrom(entityType)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			TableMetadata metadata = handler.getMetadata(this.transactionManager, entityType);

			SqlContext context = handler.createDeleteContext(this, metadata, entityType, false);
			context.setSqlKind(SqlKind.DELETE);

			return new SqlEntityDeleteImpl<>(this, handler, metadata, context);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
1059605
@Override
    public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue)
    { // TODO Auto-generated method stub

    }