|
|
@ -22,13 +22,13 @@ final class PermissionQueryBuilder |
|
|
|
|
|
|
|
public function On(string $relativePath): PermissionQueryBuilder |
|
|
|
{ |
|
|
|
// self::ValidateDeegraphPath(target: $relativePath); |
|
|
|
self::ValidateDeegraphPath(target: $relativePath); |
|
|
|
$this->On = $relativePath; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
public function As(string $relativePath): PermissionQueryBuilder |
|
|
|
{ |
|
|
|
// self::ValidateDeegraphPath(target: $relativePath); |
|
|
|
self::ValidateDeegraphPath(target: $relativePath); |
|
|
|
$this->As = $relativePath; |
|
|
|
return $this; |
|
|
|
} |
|
|
@ -37,8 +37,8 @@ final class PermissionQueryBuilder |
|
|
|
{ |
|
|
|
self::ValidateValues(target: $this); |
|
|
|
|
|
|
|
$builder = "PERMISSIONS "; |
|
|
|
if($this->On != "") $builder .= " ON {". $this->On . "}"; |
|
|
|
$builder = "PERMISSIONS ON ". $this->On; |
|
|
|
|
|
|
|
if($this->As != "") $builder .= " AS {". $this->As . "}"; |
|
|
|
|
|
|
|
return new PermissionQuery(queryString: $builder); |
|
|
|