@@ 59-73 (lines=15) @@ | ||
56 | return $this->queryResultCollection->computeResults($requestExpression); |
|
57 | } |
|
58 | ||
59 | protected function loadRequestExpression(O\Expression $requestExpression) |
|
60 | { |
|
61 | $resolution = $this->requestBuilder->resolveRequest($requestExpression); |
|
62 | $queryHash = $resolution->getHash(); |
|
63 | $query = $this->queryCache->tryGet($queryHash); |
|
64 | ||
65 | if (!($query instanceof Queries\IRequestQuery)) { |
|
66 | $query = $this->requestBuilder->parseRequest($requestExpression); |
|
67 | $this->queryCache->save($queryHash, $query); |
|
68 | } |
|
69 | ||
70 | $resolvedParameters = $query->getParameters()->resolve($resolution); |
|
71 | ||
72 | return $this->loadRequest($query, $resolvedParameters); |
|
73 | } |
|
74 | ||
75 | /** |
|
76 | * @param Queries\IRequestQuery $request |
@@ 77-91 (lines=15) @@ | ||
74 | } |
|
75 | } |
|
76 | ||
77 | protected function executeOperationExpression(O\Expression $operationExpression) |
|
78 | { |
|
79 | $resolution = $this->operationQueryBuilder->resolveOperation($operationExpression); |
|
80 | $queryHash = $resolution->getHash(); |
|
81 | $query = $this->queryCache->tryGet($queryHash); |
|
82 | ||
83 | if (!($query instanceof Queries\IOperationQuery)) { |
|
84 | $query = $this->operationQueryBuilder->parseOperation($operationExpression); |
|
85 | $this->queryCache->save($queryHash, $query); |
|
86 | } |
|
87 | ||
88 | $resolvedParameters = $query->getParameters()->resolve($resolution); |
|
89 | ||
90 | $this->executeOperation($query, $resolvedParameters); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @param \Pinq\Queries\IOperationQuery $operation |