MAPG-140 add PersistentDataManager and refactor of models

This commit is contained in:
bence committed 2020-06-20 01:48:20 +02:00
1 parent 1a4d928143
commit d6750777c2
6 files changed
+295 -93

No files matched your search

+12 -2
View File
@@ -32,10 +32,13 @@ class Select
private array $limit;
public function __construct(IConnection $connection, string $table)
public function __construct(IConnection $connection, ?string $table = null)
{
$this->connection = $connection;
$this->table = $table;
if ($table !== null) {
$this->table = $table;
}
}
public function setIdName(string $idName): Select
@@ -52,6 +55,13 @@ class Select
return $this;
}
public function from(string $table): Select
{
$this->table = $table;
return $this;
}
public function columns(array $columns): Select
{
$this->columns = array_merge($this->columns, $columns);