Skip to content

Commit

Permalink
Improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Mar 8, 2024
1 parent 381cbf0 commit 8ebaea5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Query/Grammars/FirebirdGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use HarryGulliford\Firebird\Query\Grammars\FirebirdGrammar as Base;
use Illuminate\Database\Query\Builder;
use RuntimeException;

class FirebirdGrammar extends Base implements ExpressionGrammar
{
Expand Down Expand Up @@ -37,7 +38,7 @@ public function selectPathList(Builder $query, $expression, $column, $pathSepara

public function compilePivotColumnNullValue(string $type, int $precision, int $scale): string
{
return 'null';
throw new RuntimeException('This graph relationship feature is not supported on SQL Server.'); // @codeCoverageIgnore
}

public function compileCycleDetection(string $localKey, string $path): string
Expand Down
4 changes: 4 additions & 0 deletions tests/Graph/Models/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class Node extends Model

protected $table = 'nodes';

protected $casts = [
'id' => 'int',
];

public function getPivotTableName(): string
{
return 'edges';
Expand Down
4 changes: 4 additions & 0 deletions tests/Graph/Models/NodeWithUuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

class NodeWithUuid extends Node
{
protected $casts = [
'id' => 'string',
];

public function getParentKeyName(): string
{
return 'parent_uuid';
Expand Down

0 comments on commit 8ebaea5

Please sign in to comment.