This commit is contained in:
2023-10-04 13:32:30 +03:00
parent 215d238505
commit 1ca5f4e521
82 changed files with 519 additions and 1889 deletions
+5 -9
View File
@@ -58,7 +58,7 @@ final class Query
if (!empty($edgesIds)) {
$edgeRecords = DB::table('records')
->whereIn("id", $edgesIds)
->whereIn("_sys->status", $this->options->status)
->whereIn("status", $this->options->status)
->get()->toArray();
}
$resultsRecordsUnique = collect(array_merge($resultsRecords, $edgeRecords))->unique("id")->values()->toArray();
@@ -76,7 +76,7 @@ final class Query
$queryRecords = collect($records)->map(function ($recordData) {
$record = Record::fromDB($recordData);
$record->data = $this->inputFormatter->fill($record->_sys->schema, $record->data);
$record->data = $this->inputFormatter->fill($record->schema, $record->data);
$queryRecord = QueryRecord::fromRecord($record);
$queryRecord->isRoot = data_get($recordData, "isRoot") === true;
return $queryRecord;
@@ -103,9 +103,7 @@ final class Query
}
/**
* @throws SubqueryNoResultException
*/
private function parseFilters(Builder $query): Builder
{
$filters = $this->filter->run(new Query($this->channelService, $this->inputFormatter));
@@ -148,7 +146,7 @@ final class Query
}
}
$query->whereIn("_sys->status", $this->options->status);
$query->whereIn("status", $this->options->status);
return $query;
}
@@ -211,9 +209,7 @@ final class Query
->get()->toArray();
}
/**
* @throws SubqueryNoResultException
*/
public
function runWithCount(): Graph
{