Package com.kuzudb

Class ValueMapUtil

java.lang.Object
com.kuzudb.ValueMapUtil

public class ValueMapUtil extends Object
Utility functions for Value of map type.
  • Constructor Details

    • ValueMapUtil

      public ValueMapUtil()
  • Method Details

    • getNumFields

      public static long getNumFields(Value value) throws ObjectRefDestroyedException
      Get the number of fields of the map value.
      Parameters:
      value - : The map value.
      Returns:
      The number of fields of the map value.
      Throws:
      ObjectRefDestroyedException - If the map value has been destroyed.
    • getKey

      public static Value getKey(Value value, long index) throws ObjectRefDestroyedException
      Get the key from the given map value by the given index.
      Parameters:
      value - : The map value.
      index - : The index of the key.
      Returns:
      The key from the given map value by the given index.
      Throws:
      ObjectRefDestroyedException - If the map value has been destroyed.
    • getValue

      public static Value getValue(Value value, long index) throws ObjectRefDestroyedException
      Get the value from the given map value by the given index.
      Parameters:
      value - : The map value.
      index - : The index of the value.
      Returns:
      The value from the given map value by the given index.
      Throws:
      ObjectRefDestroyedException - If the map value has been destroyed.