Compare commits
No commits in common. "70c6cde6036dace5225a9d2549d8e2db021aab09" and "079a3fd11000712236514305df6ae50f6fefcd97" have entirely different histories.
70c6cde603
...
079a3fd110
@ -207,7 +207,6 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
|||||||
public static function escapeIdentifier(string $segment, int $type) : string
|
public static function escapeIdentifier(string $segment, int $type) : string
|
||||||
{
|
{
|
||||||
switch($type) {
|
switch($type) {
|
||||||
default:
|
|
||||||
case static::IDENTIFIER_SCHEMA:
|
case static::IDENTIFIER_SCHEMA:
|
||||||
case static::IDENTIFIER_DATABASE:
|
case static::IDENTIFIER_DATABASE:
|
||||||
case static::IDENTIFIER_TABLE:
|
case static::IDENTIFIER_TABLE:
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Ulmus\Event\Repository;
|
|
||||||
|
|
||||||
use Ulmus\EntityCollection;
|
|
||||||
|
|
||||||
interface CollectionFromQueryItemInterface {
|
|
||||||
public function execute(array &$data) : array;
|
|
||||||
}
|
|
@ -16,7 +16,7 @@ trait EventTrait
|
|||||||
return array_filter($this->eventList, fn($ev) => $ev instanceof $type);
|
return array_filter($this->eventList, fn($ev) => $ev instanceof $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function eventExecute(string $type, &...$arguments) : void
|
public function eventExecute(string $type, ...$arguments) : void
|
||||||
{
|
{
|
||||||
foreach($this->eventFromType($type) as $event) {
|
foreach($this->eventFromType($type) as $event) {
|
||||||
call_user_func_array([ $event, 'execute'], $arguments);
|
call_user_func_array([ $event, 'execute'], $arguments);
|
||||||
|
@ -6,10 +6,9 @@ use Ulmus\Attribute\Property\{
|
|||||||
Field, OrderBy, Where, Having, Relation, Filter, Join, FilterJoin, WithJoin
|
Field, OrderBy, Where, Having, Relation, Filter, Join, FilterJoin, WithJoin
|
||||||
};
|
};
|
||||||
use Ulmus\Common\EntityResolver;
|
use Ulmus\Common\EntityResolver;
|
||||||
use Ulmus\Repository\RepositoryInterface;
|
|
||||||
use Ulmus\Repository\WithOptionEnum;
|
use Ulmus\Repository\WithOptionEnum;
|
||||||
|
|
||||||
class Repository implements RepositoryInterface
|
class Repository
|
||||||
{
|
{
|
||||||
use EventTrait, Repository\ConditionTrait, Repository\EscapeTrait;
|
use EventTrait, Repository\ConditionTrait, Repository\EscapeTrait;
|
||||||
|
|
||||||
@ -875,8 +874,6 @@ class Repository implements RepositoryInterface
|
|||||||
$this->finalizeQuery();
|
$this->finalizeQuery();
|
||||||
|
|
||||||
foreach(Ulmus::iterateQueryBuilder($this->queryBuilder, $this->adapter) as $entityData) {
|
foreach(Ulmus::iterateQueryBuilder($this->queryBuilder, $this->adapter) as $entityData) {
|
||||||
$this->eventExecute(\Ulmus\Event\Repository\CollectionFromQueryItemInterface::class, $entityData);
|
|
||||||
|
|
||||||
$entity = $this->instanciateEntity($entityClass);
|
$entity = $this->instanciateEntity($entityClass);
|
||||||
$entity->loadedFromAdapter = $this->adapter->name;
|
$entity->loadedFromAdapter = $this->adapter->name;
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Ulmus\Repository;
|
|
||||||
|
|
||||||
interface RepositoryInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user