示例#1
0
 /**
  * @param DataTransferObject $dto
  * @return bool|DataTransferObject
  */
 public function delete(DataTransferObject $dto)
 {
     $sql = "DELETE FROM {$this->tabela}\n                WHERE cd_vl_categoria = :cd_vl_categoria\n                 AND cd_categoria = :cd_categoria returning *";
     $array_info = array('cd_vl_categoria' => $dto->getCdVlCategoria(), 'cd_categoria' => $dto->getCdCategoria());
     if ($this->query($sql, $this->dataTransfer, $array_info)->success()) {
         return $this->first();
     }
     return false;
 }
 /**
  * @param DataTransferObject $dto
  * @return bool|DataTransferObject
  */
 public function delete(DataTransferObject $dto)
 {
     $sql = "DELETE FROM {$this->tabela}\n                WHERE cd_ocorrencia = :cd_ocorrencia\n                 AND cd_pessoa_fisica = :cd_pessoa_fisica returning *";
     $array_info = array('cd_ocorrencia' => $dto->getCdOcorrencia(), 'cd_pessoa_fisica' => $dto->getCdPessoaFisica());
     if ($this->query($sql, $this->dataTransfer, $array_info)->success()) {
         return $this->first();
     }
     return false;
 }
 /**
  * @param DataTransferObject $dto
  * @return bool|DataTransferObject
  */
 public function delete(DataTransferObject $dto)
 {
     $sql = "DELETE FROM {$this->tabela}\n                WHERE cd_catg_vl_relac_1 = :cd_catg_vl_relac_1\n                 AND cd_catg_vl_relac_2 = :cd_catg_vl_relac_2 returning *";
     $array_info = array('cd_catg_vl_relac_1' => $dto->getCdCatgVlRelac1(), 'cd_catg_vl_relac_2' => $dto->getCdCatgVlRelac2());
     if ($this->query($sql, $this->dataTransfer, $array_info)->success()) {
         return $this->first();
     }
     return false;
 }
示例#4
0
 /**
  * @param DataTransferObject $dto
  * @return bool | DataTransferObject
  */
 public function delete(DataTransferObject $dto)
 {
     $sql = "DELETE FROM {$this->tabela}\n                WHERE {$this->primaryKey} = {$dto->{$dto->getReflex()[$this->primaryKey]}()}  returning *";
     if ($this->query($sql, $this->dataTransfer, array())->success()) {
         return $this->first();
     }
     return false;
 }
示例#5
0
 /**
  * @param DataTransferObject $dto
  * @return bool|DataTransferObject
  */
 public function delete(DataTransferObject $dto)
 {
     $sql = "DELETE FROM {$this->tabela}\n                WHERE cd_pessoa_fisica_1 = :cd_pessoa_fisica_1\n                 AND cd_pessoa_fisica_2 = :cd_pessoa_fisica_2 returning *";
     $array_info = array('cd_pessoa_fisica_1' => $dto->getCdPessoaFisica1(), 'cd_pessoa_fisica_2' => $dto->getCdPessoaFisica2());
     if ($this->query($sql, $this->dataTransfer, $array_info)->success()) {
         return $this->getResultado();
     }
     return false;
 }