Faz a query de delete de um registro no banco com os dados.

@param    array $infos
@return   bool|string
@throws   PhiberException
@internal param $object
@internal param array $conditions
@internal param array $conjunctions
499831
public function delete(array $infos)
    {
        $tabela        = $infos['table'];
        $whereCriteria = $infos['where'];

        try {
            $this->sql = "DELETE FROM $tabela ";
            if (!empty($whereCriteria)) {
                $this->sql .= " WHERE " . $whereCriteria . " ";
            }
            
            return $this->sql . ";";

        } catch (PhiberException $e) {
            throw new PhiberException(new Internationalization("query_processor_error"));
        }
    }
982456
function removeThis( $conditions = null, $extraConditions = null )
    {
        $this->remove( array( "id" => $this->ID ), $extraConditions );
    }
957220
public function update($infos)
    {
        $tabela        = $infos['table'];
        $campos        = $infos['fields'];
        $camposV       = $infos['values'];
        $whereCriteria = $infos['where'];

        try {
            $camposNome = [];
            for ($i = 0; $i < count($campos); $i++) {
                if ($camposV[$i] != null) {
                    $camposNome[$i] = $campos[$i];
                }
            }

            $camposNome = array_values($camposNome);
            $this->sql = "UPDATE $tabela SET ";

            for ($i = 0; $i < count($camposNome); $i++) {
                if (!empty($camposNome[$i])) {
                    if ($i != count($camposNome) - 1) {
                        $this->sql .= $camposNome[$i] . " = :" . $camposNome[$i] . ", ";
                    } else {
                        $this->sql .= $camposNome[$i] . " = :" . $camposNome[$i];
                    }
                }
            }

            if (!empty($whereCriteria)) {
                $this->sql .= " WHERE " . $whereCriteria . " ";
            }

            return $this->sql . ";";

        } catch (PhiberException $e) {
            throw new PhiberException(new Internationalization("query_processor_error"));
        }
    }
36293
public function delete(string $from, $wheres, array $options = [])
    {
        if (!$wheres) {
            throw new \InvalidArgumentException('Safety considerations, where conditions can not be empty');
        }

        list($where, $bindings) = DBHelper::handleConditions($wheres, $this);

        $options['from'] = $this->qn($from);
        $options['where'] = $where;

        $statement = $this->compileDelete($options);

        if (isset($options['returnSql'])) {
            return [$statement, $bindings];
        }

        return $this->fetchAffected($statement, $bindings);
    }
72673
public function delete(array $conditions)
    {
        $result = null;
        $this->hook->attach('translation.entity.delete.before', $conditions, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $table = $this->getTable($conditions['entity']);

        unset($conditions['entity']);

        $result = (bool) $this->db->delete($table, $conditions);
        $this->hook->attach('translation.entity.delete.after', $conditions, $result, $this);
        return (bool) $result;
    }
579544
public function addDelete($condition, $options = [])
    {
        $this->document[] = [
            'type' => 'delete',
            'condition' => $this->db->getQueryBuilder()->buildCondition($condition),
            'options' => $options,
        ];
        return $this;
    }
1260107
public function findBy(array $conditions)
    {
        $s = $this->selector();
        foreach ($conditions as $column => $value) {
            $s->where($column, '=', $value);
        }

        return $s->execute();
    }
1152675
public function buildConditions($conditions)
    {
        if (!is_array($conditions)) {
            if (null === $conditions) {
                return '';
            }
            return $conditions;
        } elseif ($conditions === array()) {
            return '';
        }

        $n = count($conditions);
        $operator = strtoupper($conditions[0]);
        if ($operator === 'AND' || $operator === 'OR') {
            $result = array();
            for ($i = 1; $i < $n; $i++) {
                $condition = $this->buildConditions($conditions[$i]);
                if ('' !== $condition) {
                    $result[] = '(' . $condition . ')';
                }
            }
            if ($result === array()) {
                return '';
            } else {
                return implode(' ' . $operator . ' ', $result);
            }
        }

        if (!isset($conditions[1], $conditions[2])) {
            return '';
        }

        $column = $this->db->quoteColumn($conditions[1]);
        $values = $conditions[2];
        if (!is_array($values)) {
            $values = array($values);
        }
        if ($operator === 'IN' || $operator === 'NOT IN') {
            if ($values === array()) {
                return $operator === 'IN' ? '0' : '';
            }
            foreach ($values as $k => $value) {
                $values[$k] = $this->db->quote($value);
            }

            return $column . ' ' . $operator . ' (' . implode(',', $values) . ')';
        } elseif ($operator === 'LIKE' || $operator === 'NOT LIKE' || $operator === 'OR LIKE' || $operator === 'OR NOT LIKE') {
            if ($values === array()) {
                return ($operator === 'LIKE' || $operator === 'OR LIKE') ? '0' : '';
            }
            if ($operator === 'LIKE' || $operator === 'NOT LIKE') {
                $andor = 'AND';
            } else {
                $andor = 'OR';
                $operator = $operator === 'OR LIKE' ? 'LIKE' : 'NOT LIKE';
            }

            $result = array();
            foreach ($values as $k => $value) {
                $result[] = $column . ' ' . $operator . ' ' . $this->db->quote($value);
            }

            return implode($andor, $result);
        } else {
            throw new Exception('Invalid operator "' . $operator . '"');
        }
    }
440069
protected function _prepareQueryConditions(&$conditions) {
		if (empty($conditions) || !is_array($conditions)) {
			return;
		}

		$bindFields = $this->_getListFieldsUpdateQueryConditions();
		$newConditions = [];
		foreach ($conditions as $field => &$value) {
			if (ctype_digit((string)$field)) {
				$field = $value;
			}

			if (in_array($field, ['AND', 'OR', 'NOT']) && is_array($value)) {
				$this->_prepareQueryConditions($value);
				continue;
			}

			if (!is_string($field)) {
				continue;
			}

			foreach ($bindFields as $bindField => $bindFieldInfo) {
				$fieldName = $field;
				if (strpos($fieldName, ' ') !== false) {
					$fieldName = explode(' ', $fieldName, 2);
					$fieldName = array_shift($fieldName);
				}
				if ($fieldName !== $this->alias . '.' . $bindField) {
					continue;
				}

				unset($conditions[$field]);
				$field = str_replace($this->alias . '.' . $bindField, $bindFieldInfo['replace'], $field);
				if (!isset($bindFieldInfo['subQuery'])) {
					$newConditions[$field] = $value;
					continue;
				}

				$conditionsSubQuery = [$field => $value];
				$db = $this->getDataSource();
				$subQuery = $db->buildStatement(
					[
						'limit' => null,
						'offset' => null,
						'joins' => [],
						'conditions' => $conditionsSubQuery,
						'order' => null,
						'group' => null
					] + $bindFieldInfo['subQuery'],
					$this
				);
				$subQuery = 'Employee.id IN (' . $subQuery . ') ';
				$subQueryExpression = $db->expression($subQuery);

				$newConditions[] = $subQueryExpression;
			}
		}
		$conditions = array_merge($conditions, $newConditions);
	}
553817
public function findOne($conditions, string $orderBy = null): Result
    {
        $query = $this->query()
            ->where($conditions)
            ->limit(1);

        if ($orderBy) {
            $query->orderBy($orderBy);
        }

        return $query->query();
    }
882544
public function fetchColumn($conditions = false)
    {
        $data = $this->fetch($conditions);
        return $data ? current($data) : false;
    }
723968
public function deleteWhere($where, array $values = [])
    {
        if (!$where instanceof Where) {
            $where = new Where($where, $values);
        }

        $sql = strtr(
            "delete from :relation where :condition returning :projection",
            [
                ':relation'   => $this->getStructure()->getRelation(),
                ':condition'  => (string) $where,
                ':projection' => $this->createProjection()->formatFieldsWithFieldAlias(),
            ]
        );

        $collection = $this->query($sql, $where->getValues());
        foreach ($collection as $entity) {
            $entity->status(FlexibleEntityInterface::STATUS_NONE);
        }
        $collection->rewind();

        return $collection;
    }
1125943
public function delete($t, $conditions = array()){
		if(is_array($t)){
			$conditions = $t;
		}elseif(is_string($t)){
			$this->table($t);
		}
		if(!empty($conditions)){
			$this->where($conditions);
		}
		$this->_sql = $this->getDeleteStatement();
		return $this;
	}
1219484
protected function validateConditions(array $conditions)
    {
        foreach ($conditions as $key => $val) {
            if ($this->referenceResolver->isReference($key)) {
                return true;
            }
        }

        return parent::validateConditions($conditions);
    }
1076301
protected function whereConditions(array $wheres): string
	{
		$conditions = [];

		$conditionCounter = 0;

		foreach($wheres as $where)
		{
			$conditions[] = ($conditionCounter > 0 ? $where['separator'] . ' ' : null) . $this->{$where['type']}($where);

			$conditionCounter++;
		}

		return implode(' ', $conditions);
	}
824051
public function update(array $sets, $conditions = [])
    {
        if (count($sets)) {
            $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';

            if (empty($conditions)) {
                if (isset($sets[ $primaryKey ])) {
                    $conditions = [$primaryKey => $sets[ $primaryKey ]];
                }
            }

            if (method_exists($this, 'updateRecordSets')) {
                $this->updateRecordSets($sets);
            }

            if (method_exists($this, 'beforeUpdate')) {
                $sets = $this->beforeUpdate($sets);
            }

            if (method_exists($this, 'getRecordOrdering')) {
                if ($this->recordOrdering === true && empty($sets[ 'record_ordering' ])) {
                    $sets[ 'record_ordering' ] = $this->getRecordOrdering($this->table);
                }
            }

            if ($this->qb->table($this->table)->update($sets, $conditions)) {

                if (method_exists($this, 'afterUpdate')) {
                    return $this->afterUpdate();
                }

                return true;
            }
        }

        return false;
    }
1061567
public function findWhere(array $conditions, $limit = null)
    {
        $result = $this->db
            ->from($this->collection)
            ->getWhere($conditions, $limit);

        if ($result->count() > 0) {
            $this->result = new DataObjects\Result($result, $this);

            if ($limit == 1) {
                return $this->result->first();
            }

            return $this->result;
        }

        return false;
    }