示例#1
0
 /**
  * @return array
  */
 public function getPrepared()
 {
     $e = $this->Model->dialectify()->getEscapeChar();
     $table = $this->Model->getTableName();
     list($query, $place) = (new Where($this->Model, $this->where))->getPrepared();
     $query = "DELETE FROM {$e}{$table}{$e} WHERE {$query}";
     return [$query, $place];
 }
示例#2
0
 /**
  * @return array
  */
 public function getPrepared()
 {
     $e = $this->Model->dialectify()->getEscapeChar();
     $table = $this->Model->getTableName();
     list($setQuery, $setPlace) = $this->handleSet($e);
     $query = "UPDATE {$e}{$table}{$e} SET {$setQuery}";
     $wherePlace = [];
     if ($this->where) {
         list($whereQuery, $wherePlace) = (new Where($this->Model, $this->where))->getPrepared();
         $query .= " WHERE {$whereQuery}";
     }
     return [$query, array_merge($setPlace, $wherePlace)];
 }