-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support cycle detection with UUIDs on PostgreSQL
- Loading branch information
1 parent
3928fa7
commit 82db6aa
Showing
9 changed files
with
191 additions
and
35 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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Staudenmeir\LaravelAdjacencyList\Tests\Graph\Models; | ||
|
||
class NodeWithUuid extends Node | ||
{ | ||
public function getParentKeyName(): string | ||
{ | ||
return 'parent_uuid'; | ||
} | ||
|
||
public function getChildKeyName(): string | ||
{ | ||
return 'child_uuid'; | ||
} | ||
|
||
public function getLocalKeyName(): string | ||
{ | ||
return 'uuid'; | ||
} | ||
} |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Staudenmeir\LaravelAdjacencyList\Tests\Graph\Models; | ||
|
||
class NodeWithUuidAndCycleDetection extends NodeWithUuid | ||
{ | ||
public function enableCycleDetection(): bool | ||
{ | ||
return true; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/Graph/Models/NodeWithUuidAndCycleDetectionAndStart.php
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Staudenmeir\LaravelAdjacencyList\Tests\Graph\Models; | ||
|
||
class NodeWithUuidAndCycleDetectionAndStart extends NodeWithUuidAndCycleDetection | ||
{ | ||
public function includeCycleStart(): bool | ||
{ | ||
return true; | ||
} | ||
} |
Oops, something went wrong.