Skip to main content

reconcile

Function reconcile 

Source
pub async fn reconcile(
    client: &Client,
    executor: &DeploymentExecutor<'_>,
    obj_id: &ObjectId,
    grants: &[GrantPrivilegesStatement<Raw>],
    kind: &GrantObjectKind,
) -> Result<(), CliError>
Expand description

Reconcile grants for a single object: apply desired grants, revoke stale ones.

Three-step algorithm:

  1. Apply all desired GRANTs idempotently (GRANT is a no-op if already present).
  2. Query the live grant state and default-privilege grants from the catalog.
  3. Compute the set difference (current - desired - protected) and REVOKE stale grants.