All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scalar.db.sql.metadata.UserMetadata Maven / Gradle / Ivy

There is a newer version: 3.14.0
Show newest version
package com.scalar.db.sql.metadata;

import com.scalar.db.sql.Privilege;
import java.util.Set;

/** The metadata of a user. */
public interface UserMetadata {

  /**
   * Returns the name of the user.
   *
   * @return the name of the user
   */
  String getName();

  /**
   * Returns {@code true} if the user is a superuser, {@code false} otherwise.
   *
   * @return {@code true} if the user is a superuser, {@code false} otherwise
   */
  boolean isSuperuser();

  /**
   * Returns the user's privileges on the specified namespace.
   *
   * @param namespaceName the name of the target namespace
   * @return the privileges of the user
   */
  Set getPrivileges(String namespaceName);

  /**
   * Returns the user's privileges on the specified table.
   *
   * @param namespaceName the name of the namespace of the target table
   * @param tableName the name of the target table
   * @return the privileges of the user
   */
  Set getPrivileges(String namespaceName, String tableName);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy