Package com.kuzudb

Class Database

java.lang.Object
com.kuzudb.Database
All Implemented Interfaces:
AutoCloseable

public class Database extends Object implements AutoCloseable
The Database class is the main class of KuzuDB. It manages all database components.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a database object.
    Database(String databasePath)
    Creates a database object.
    Database(String databasePath, long bufferPoolSize, boolean enableCompression, boolean readOnly, long maxDBSize)
    Creates a database object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the database and release the underlying resources.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Database

      public Database()
      Creates a database object. The database will be created in memory with default settings.
    • Database

      public Database(String databasePath)
      Creates a database object.
      Parameters:
      databasePath - : Database path. If the database does not already exist, it will be created.
    • Database

      public Database(String databasePath, long bufferPoolSize, boolean enableCompression, boolean readOnly, long maxDBSize)
      Creates a database object.
      Parameters:
      databasePath - : Database path. If the path is empty, or equal to `:memory:`, the database will be created in memory.
      bufferPoolSize - : Max size of the buffer pool in bytes.
      enableCompression - : Enable compression in storage.
      readOnly - : Open the database in READ_ONLY mode.
      maxDBSize - : The maximum size of the database in bytes. Note that this is introduced temporarily for now to get around with the default 8TB mmap address space limit some environment.
  • Method Details