Skip to content
Snippets Groups Projects
Unverified Commit ab4b2938 authored by Julius Härtl's avatar Julius Härtl
Browse files

Insert new collection into database


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent 702dcfb7
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment