Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Oct 14, 2024
1 parent 756eb0f commit fff5846
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 180 deletions.
4 changes: 2 additions & 2 deletions src/FilterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Yiisoft\Data\Db\FilterHandler\InFilterHandler;
use Yiisoft\Data\Db\FilterHandler\LessThanFilterHandler;
use Yiisoft\Data\Db\FilterHandler\LessThanOrEqualFilterHandler;
use Yiisoft\Data\Db\FilterHandler\LikeFilterHandler\LikeFilterHandlerFactory;
use Yiisoft\Data\Db\FilterHandler\LikeFilterHandler;
use Yiisoft\Data\Db\FilterHandler\NotFilterHandler;
use Yiisoft\Data\Db\FilterHandler\QueryFilterHandlerInterface;
use Yiisoft\Data\Reader\FilterHandlerInterface;
Expand Down Expand Up @@ -55,7 +55,7 @@ public function __construct(
new GreaterThanOrEqualFilterHandler(),
new LessThanFilterHandler(),
new LessThanOrEqualFilterHandler(),
LikeFilterHandlerFactory::getLikeHandler(),
new LikeFilterHandler(),
new InFilterHandler(),
new ExistsFilterHandler(),
new NotFilterHandler(),
Expand Down
23 changes: 23 additions & 0 deletions src/FilterHandler/LikeFilterHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace Yiisoft\Data\Db\FilterHandler;

use Yiisoft\Data\Reader\Filter\Like;
use Yiisoft\Data\Reader\FilterInterface;

final class LikeFilterHandler implements QueryFilterHandlerInterface
{
public function getFilterClass(): string
{
return Like::class;
}

public function getCriteria(FilterInterface $filter, Context $context): ?Criteria
{
/** @var Like $filter */

return new Criteria(['LIKE', $filter->getField(), $filter->getValue()]);
}
}
27 changes: 0 additions & 27 deletions src/FilterHandler/LikeFilterHandler/BaseLikeFilterHandler.php

This file was deleted.

26 changes: 0 additions & 26 deletions src/FilterHandler/LikeFilterHandler/LikeFilterHandlerFactory.php

This file was deleted.

28 changes: 0 additions & 28 deletions src/FilterHandler/LikeFilterHandler/MssqlLikeFilterHandler.php

This file was deleted.

29 changes: 0 additions & 29 deletions src/FilterHandler/LikeFilterHandler/MysqlLikeFilterHandler.php

This file was deleted.

18 changes: 0 additions & 18 deletions src/FilterHandler/LikeFilterHandler/OracleLikeFilterHandler.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/FilterHandler/LikeFilterHandler/PostgresLikeFilterHandler.php

This file was deleted.

28 changes: 0 additions & 28 deletions src/FilterHandler/LikeFilterHandler/SqliteLikeFilterHandler.php

This file was deleted.

0 comments on commit fff5846

Please sign in to comment.