/** * Sets the table for the query. * * @param string $table table name * * @return self */ public function from($table) { $this->from->addTable($table); return $this; }
/** * 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)); }
/** * 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)); }