Package com.kuzudb

Class DataType

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

public class DataType extends Object implements AutoCloseable
DataType is the kuzu internal representation of data types.
  • Constructor Details

    • DataType

      public DataType(DataTypeID id)
      Create a non-nested DataType object from its internal ID.
      Parameters:
      id - : the kuzu internal representation of data type IDs.
    • DataType

      public DataType(DataTypeID id, DataType child_type, long num_elements_in_array)
  • Method Details

    • close

      public void close() throws ObjectRefDestroyedException
      Close the datatype and release the underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.
      Specified by:
      close in interface AutoCloseable
      Throws:
      ObjectRefDestroyedException - If the data type instance has been destroyed.
    • clone

      public DataType clone()
      Clone the data type instance.
      Overrides:
      clone in class Object
      Returns:
      The cloned data type instance.
    • equals

      public boolean equals(DataType other) throws ObjectRefDestroyedException
      Returns true if the given data type is equal to the other data type, false otherwise.
      Parameters:
      other - The other data type to compare with.
      Returns:
      If the given data type is equal to the other data type or not.
      Throws:
      ObjectRefDestroyedException - If the data type instance has been destroyed.
    • getID

      public DataTypeID getID() throws ObjectRefDestroyedException
      Returns the enum internal id of the given data type.
      Returns:
      The enum internal id of the given data type.
      Throws:
      ObjectRefDestroyedException - If the data type instance has been destroyed.
    • getChildType

      public DataType getChildType() throws ObjectRefDestroyedException
      Returns the child type of the given data type.
      Returns:
      The child type of the given data type.
      Throws:
      ObjectRefDestroyedException - If the data type instance has been destroyed.
    • getFixedNumElementsInList

      public long getFixedNumElementsInList() throws ObjectRefDestroyedException
      Returns the fixed number of elements in the list of the given data type.
      Returns:
      The fixed number of elements in the list of the given data type.
      Throws:
      ObjectRefDestroyedException - If the data type instance has been destroyed.