-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove obsolete method, added a todo
- Loading branch information
Showing
2 changed files
with
10 additions
and
12 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -240,10 +240,12 @@ public function escapeFullText($string) | ||
* @param string $statement the SQL2 statement | * @param string $statement the SQL2 statement | ||
* @param string $language (see QueryInterface for list of supported types) | * @param string $language (see QueryInterface for list of supported types) | ||
* @param bool $replaceWithFieldnames if * should be replaced with Fieldnames automatically | * @param bool $replaceWithFieldnames if * should be replaced with Fieldnames automatically | ||
* @return PHPCR\Query\QueryResultInterface | * | ||
* @return Query | |||
*/ | */ | ||
public function createQuery($statement, $language, $options = 0) | public function createQuery($statement, $language, $options = 0) | ||
{ | { | ||
// TODO: refactor this to use the odm query builder | |||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dantleech
Contributor
|
|||
$qb = $this->dm->createPhpcrQueryBuilder()->setFromQuery($statement, $language); | $qb = $this->dm->createPhpcrQueryBuilder()->setFromQuery($statement, $language); | ||
if ($options & self::QUERY_REPLACE_WITH_FIELDNAMES) { | if ($options & self::QUERY_REPLACE_WITH_FIELDNAMES) { | ||
$columns = $qb->getColumns(); | $columns = $qb->getColumns(); | ||
|
@@ -269,17 +271,6 @@ public function createQuery($statement, $language, $options = 0) | ||
return new Query($qb->getQuery(), $this->getDocumentManager()); | return new Query($qb->getQuery(), $this->getDocumentManager()); | ||
} | } | ||
|
|
||
/** | |||
* Get documents from a PHPCR query instance | |||
* | |||
* @param \PHPCR\Query\QueryResultInterface $result | |||
* @return array of document instances | |||
*/ | |||
public function getDocumentsByQuery(\PHPCR\Query\QueryInterface $query) | |||
{ | |||
return $this->dm->getDocumentsByQuery($query, $this->className); | |||
} | |||
|
|||
/** | /** | ||
* Create a QueryBuilder that is prepopulated for this repositories document | * Create a QueryBuilder that is prepopulated for this repositories document | ||
* | * | ||
|
@dantleech if you could do this, would be awesome!