fixing database connections
This commit is contained in:
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace Lucent\Query;
|
||||
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Lucent\Database\Database;
|
||||
use Lucent\Edge\Edge;
|
||||
use Lucent\Primitive\Collection;
|
||||
use Lucent\Query\DatabaseGraph\DatabaseGraph;
|
||||
@@ -67,7 +67,7 @@ final class Query
|
||||
$edgesIds = collect($resultParentSourceTargetIds)->merge($resultChildrenEdgesTargetIds)->unique()->values()->toArray();
|
||||
$edgeRecords = [];
|
||||
if (!empty($edgesIds)) {
|
||||
$edgeRecords = DB::table('records')
|
||||
$edgeRecords = Database::make()->table('records')
|
||||
->whereIn("id", $edgesIds)
|
||||
->whereIn("status", $this->options->status)
|
||||
->get()->toArray();
|
||||
@@ -142,7 +142,7 @@ final class Query
|
||||
|
||||
private function mainQuery(): array
|
||||
{
|
||||
$query = DB::table("records");
|
||||
$query = Database::make()->table("records");
|
||||
$query = $this->parseFilters($query);
|
||||
$query = $this->findNotLinked($query);
|
||||
|
||||
@@ -189,7 +189,7 @@ final class Query
|
||||
function runWithCount(): Graph
|
||||
{
|
||||
|
||||
$query = DB::table("records");
|
||||
$query = Database::make()->table("records");
|
||||
$query = $this->parseFilters($query);
|
||||
$query = $this->findNotLinked($query);
|
||||
$graph = $this->run();
|
||||
|
||||
Reference in New Issue
Block a user