|
|
@ -27,9 +27,10 @@ final class GrantQueryBuilder implements QueryBuilderInterface |
|
|
|
public function Build(): GrantQuery |
|
|
|
{ |
|
|
|
$builder = "GRANT "; |
|
|
|
if(sizeof($this->PermissionTypes)) $builder .= implode(separator: ",", array: $this->PermissionTypes); |
|
|
|
if($this->GrantOn != "") $builder .= " ON $this->GrantOn"; |
|
|
|
if($this->GrantWhere != "") $builder .= " WHERE $this->GrantWhere"; |
|
|
|
|
|
|
|
if(sizeof($this->PermissionTypes)) $builder .= implode(separator: ",", array: $this->PermissionTypes); |
|
|
|
if($this->GrantOn != "") $builder .= " ON $this->GrantOn"; |
|
|
|
if($this->GrantWhere != "") $builder .= " WHERE $this->GrantWhere"; |
|
|
|
|
|
|
|
return new GrantQuery(queryString: $builder); |
|
|
|
} |
|
|
@ -64,4 +65,15 @@ final class GrantQueryBuilder implements QueryBuilderInterface |
|
|
|
$this->GrantWhere = "$target $operator->value $value"; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
|
|
|
|
public function IsDelegatable(): GrantQueryBuilder |
|
|
|
{ |
|
|
|
$this->GrantDelegatable = true; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
public function NotDelegatable(): GrantQueryBuilder |
|
|
|
{ |
|
|
|
$this->GrantDelegatable = false; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|