Insert new collection into database
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
702dcfb728
commit
ab4b293854
|
@ -72,7 +72,10 @@ class Manager implements IManager {
|
|||
*/
|
||||
public function newCollection(string $name): ICollection {
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
$query->insert('collres_collections');
|
||||
$query->insert('collres_collections')
|
||||
->values([
|
||||
'name' => $query->createNamedParameter($name),
|
||||
]);
|
||||
$query->execute();
|
||||
|
||||
return new Collection($this, $this->connection, $query->getLastInsertId(), $name);
|
||||
|
|
Loading…
Reference in New Issue