Beispiel #1
0
 /**
  * Sets the table for the query.
  *
  * @param string $table table name
  *
  * @return self
  */
 public function from($table)
 {
     $this->from->addTable($table);
     return $this;
 }
Beispiel #2
0
 /**
  * Generates the raw SQL string for the query.
  *
  * @return string
  */
 public function build()
 {
     $sql = [$this->table->build(), $this->insertValues->build()];
     $this->values = array_values($this->insertValues->getValues());
     return implode(' ', array_filter($sql));
 }
Beispiel #3
0
 /**
  * Generates the raw SQL string for the query.
  *
  * @return string
  */
 public function build()
 {
     $sql = [$this->table->build(), $this->set->build(), $this->where->build(), $this->orderBy->build(), $this->limit->build()];
     $this->values = array_merge(array_values($this->set->getValues()), $this->where->getValues());
     return implode(' ', array_filter($sql));
 }