Class NsDb

java.lang.Object
com.surrealdb.NsDb

public class NsDb extends Object
Holds the current namespace and database after a Surreal.useNs(String), Surreal.useDb(String), or Surreal.useDefaults() call. Returned by those methods so the client can use the actual ns/db set by the server.
  • Constructor Details

    • NsDb

      public NsDb(String namespace, String database)
      Creates an NsDb with the given namespace and database (both may be null).
      Parameters:
      namespace - the current namespace, or null
      database - the current database, or null
  • Method Details

    • getNamespace

      public String getNamespace()
      Returns the current namespace.
      Returns:
      the namespace, or null
    • getDatabase

      public String getDatabase()
      Returns the current database.
      Returns:
      the database, or null