- Added the update keyword allowing modification for one field.
This commit is contained in:
1 parent
fa806e8e0d
commit
1b11917bf5
9 files changed
+186
-21
No files matched your search
+20
-1
@@ -43,13 +43,32 @@ class QueryBuilder implements Ulmus\Query\QueryBuilderInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function set(array $dataset, ? array $escapedFields = null) : self
|
||||
{
|
||||
if ( null === ( $set = $this->getFragment(Query\Set::class) ) ) {
|
||||
$set = new Query\Set($this);
|
||||
$this->push($set);
|
||||
}
|
||||
|
||||
$set->set($dataset, $escapedFields);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function from(string $table, ? string $alias, ? string $schema) : self
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function update(string $table, ? string $alias = null, ? string $database = null, ? string $schema = null) : self
|
||||
public function update(string $dn) : self
|
||||
{
|
||||
if ( null === ( $update = $this->getFragment(Query\Update::class) ) ) {
|
||||
$update = new Query\Update($this);
|
||||
$this->push($update);
|
||||
}
|
||||
|
||||
$update->dn = $dn;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user