Package com.kuzudb

Class KuzuMap

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

public class KuzuMap extends Object implements AutoCloseable
  • Constructor Details

    • KuzuMap

      public KuzuMap(Value value)
      Construct a map from a value
      Parameters:
      value - the value to construct the map from
    • KuzuMap

      public KuzuMap(Value[] keys, Value[] values)
      Construct a map literal from a given set of keys/values. The length of the key/value arrays must be the same.
      Parameters:
      keys - : The keys in the map
      values - : The values in the map
  • Method Details

    • getValue

      public Value getValue()
      Returns:
      Gets the underlying Value for the map
    • getNumFields

      public long getNumFields()
      Returns:
      The number of fields in the map.
      Throws:
      RuntimeException - If the map has been destroyed.
    • getKey

      public Value getKey(long index)
      Get the key at the given index.
      Parameters:
      index - : The index of the key.
      Returns:
      The key.
      Throws:
      RuntimeException - If the map has been destroyed.
    • getValue

      public Value getValue(long index)
      Get the value at the given index.
      Parameters:
      index - : The index of the value.
      Returns:
      The value.
      Throws:
      RuntimeException - If the map value has been destroyed.
    • close

      public void close()
      Closes this object, relinquishing the underlying value
      Specified by:
      close in interface AutoCloseable
      Throws:
      RuntimeException