forked from ezsystems/ezpublish-kernel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-28843: As a Developer I want SQL Search by Field to use ezkeyword…
… Ext. Storage (ezsystems#2256) * [EZP-28843] Implementation of Operator IN inside ezkeyword * [EZP-28843] Functional and Integration test
- Loading branch information
Showing
5 changed files
with
165 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...Core/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the eZ Publish Kernel package. | ||
* | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; | ||
|
||
use eZ\Publish\API\Repository\Values\Content\Query\Criterion; | ||
use eZ\Publish\Core\Persistence\Database\SelectQuery; | ||
|
||
/** | ||
* FieldValue CriterionHandler handling ezkeyword External Storage for Legacy/SQL Search. | ||
*/ | ||
class Keyword extends Collection | ||
{ | ||
/** | ||
* Generates query expression for operator and value of a Field Criterion. | ||
* | ||
* @param \eZ\Publish\Core\Persistence\Database\SelectQuery $query | ||
* @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion | ||
* @param string $column | ||
* | ||
* @return \eZ\Publish\Core\Persistence\Database\Expression | ||
*/ | ||
public function handle(SelectQuery $query, Criterion $criterion, $column) | ||
{ | ||
$query | ||
->innerJoin( | ||
$this->dbHandler->quoteTable('ezkeyword_attribute_link'), | ||
'ezcontentobject_attribute.id', | ||
'ezkeyword_attribute_link.objectattribute_id' | ||
)->innerJoin( | ||
$this->dbHandler->quoteTable('ezkeyword'), | ||
'ezkeyword.id', | ||
'ezkeyword_attribute_link.keyword_id' | ||
); | ||
|
||
return parent::handle($query, $criterion, 'keyword'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters