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