Beispiel #1
0
 /**
  * Returns a new Delete Manager
  * @return DeleteManager
  */
 function delete()
 {
     $deleteManager = new DeleteManager();
     return $deleteManager->from($this);
 }
Beispiel #2
0
 function compileDelete()
 {
     $deleteManager = new DeleteManager();
     $deleteManager->from($this->nodes->source->getLeft());
     foreach ($this->nodes->restrictions as $expr) {
         $deleteManager->where($expr);
     }
     foreach ($this->nodes->orders as $order) {
         $deleteManager->order($order);
     }
     empty($this->nodes->limit) ?: $deleteManager->take($this->nodes->limit->getExpression());
     empty($this->nodes->offset) ?: $deleteManager->skip($this->nodes->offset->getExpression());
     return $deleteManager;
 }