-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathMysqlQueryBuilder.php
More file actions
35 lines (29 loc) · 1.17 KB
/
MysqlQueryBuilder.php
File metadata and controls
35 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
declare(strict_types=1);
namespace Flowpack\SimpleSearch\ContentRepositoryAdaptor\Search;
use Flowpack\SimpleSearch\Search\QueryBuilderInterface;
use Neos\Flow\Annotations as Flow;
use Flowpack\SimpleSearch\Search\MysqlQueryBuilder as SimpleSearchMysqlQueryBuilder;
/**
* MySQL Query Builder for Content Repository searches
*/
class MysqlQueryBuilder extends AbstractQueryBuilder
{
/**
* @Flow\Inject
* @var SimpleSearchMysqlQueryBuilder
*/
protected $mysqlQueryBuilder;
protected function getSimpleSearchQueryBuilder(): QueryBuilderInterface
{
return $this->mysqlQueryBuilder;
}
public function getFindIdentifiersByNodeIdentifierQuery(string $nodeIdentifierPlaceholder): string
{
return 'SELECT "__identifier__" FROM "fulltext_objects" WHERE "__identifier" = :' . $nodeIdentifierPlaceholder;
}
public function fulltextMatchResult(string $searchword, int $resultTokens = 200, string $ellipsis = '...', string $beginModifier = '<b>', string $endModifier = '</b>'): string
{
return $this->mysqlQueryBuilder->fulltextMatchResult($searchword, $resultTokens, $ellipsis, $beginModifier, $endModifier);
}
}