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

com.scalar.db.sql.metadata.Metadata 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.exception.SqlException;
import java.util.Map;
import java.util.Optional;

/** The metadata of ScalarDB. */
public interface Metadata {

  /**
   * Returns a map of the namespace names and {@link NamespaceMetadata} objects.
   *
   * @return a map of the namespace names and {@link NamespaceMetadata} objects
   * @throws SqlException if an unexpected error happens
   */
  Map getNamespaces();

  /**
   * Returns a {@link NamespaceMetadata} object for the specified namespace
   *
   * @param namespaceName the name of the target namespace
   * @return a {@link NamespaceMetadata} object
   * @throws SqlException if an unexpected error happens
   */
  Optional getNamespace(String namespaceName);

  /**
   * Returns a map of the usernames and {@link UserMetadata} objects.
   *
   * @return a map of the usernames and {@link UserMetadata} objects
   * @throws SqlException if an unexpected error happens
   */
  Map getUsers();

  /**
   * Returns a {@link UserMetadata} object for the specified user.
   *
   * @param username the name of the target user
   * @return a {@link UserMetadata} object
   * @throws SqlException if an unexpected error happens
   */
  Optional getUser(String username);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy