Ejemplo n.º 1
0
 /**
  * Get UpdateQuery builder with pre-populated table name and set of columns to update. Columns
  * can be scalar values, Parameter objects or even SQLFragments. Call ->run() to perform query.
  *
  * @param array $values Initial set of columns associated with values.
  * @param array $where  Initial set of where rules specified as array.
  * @return UpdateQuery
  */
 public function update(array $values = [], array $where = [])
 {
     return $this->database->update($this->name, $values, $where);
 }
Ejemplo n.º 2
0
 /**
  * Get UpdateQuery builder with driver specific query compiler.
  *
  * @param Database $database   Database instance builder should be associated to.
  * @param array    $parameters Initial builder parameters.
  * @return UpdateQuery
  */
 public function updateBuilder(Database $database, array $parameters = [])
 {
     return $this->container->construct(UpdateQuery::class, ['database' => $database, 'compiler' => $this->queryCompiler($database->getPrefix())] + $parameters);
 }
Ejemplo n.º 3
0
 /**
  * Generate PDO statement based on generated sql and parameters.
  *
  * @return \PDOStatement
  */
 protected function pdoStatement()
 {
     return $this->database->statement($this->sqlStatement(), $this->getParameters());
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function insertBuilder(Database $database, array $parameters = [])
 {
     return $this->factory->make(InsertQuery::class, ['database' => $database, 'compiler' => $this->queryCompiler($database->getPrefix())] + $parameters);
 }