Interface Record

All Superinterfaces:
MapAccessor, MapAccessorWithDefaultValue

@Immutable public interface Record extends MapAccessorWithDefaultValue
Container for Cypher result values.

Streams of records are returned from Cypher query execution, contained within a Result.

A record is a form of ordered map and, as such, contained values can be accessed by either positional index or textual key.

Since:
1.0
  • Method Details

    • keys

      List<String> keys()
      Retrieve the keys of the underlying map
      Specified by:
      keys in interface MapAccessor
      Returns:
      all field keys in order
    • values

      List<Value> values()
      Retrieve the values of the underlying map
      Specified by:
      values in interface MapAccessor
      Returns:
      all field keys in order
    • index

      int index(String key)
      Retrieve the index of the field with the given key
      Parameters:
      key - the give key
      Returns:
      the index of the field as used by get(int)
      Throws:
      NoSuchElementException - if the given key is not from keys()
    • get

      Value get(int index)
      Retrieve the value at the given field index
      Parameters:
      index - the index of the value
      Returns:
      the value or a NullValue if the index is out of bounds
      Throws:
      ClientException - if record has not been initialized
    • fields

      List<Pair<String,Value>> fields()
      Retrieve all record fields
      Returns:
      all fields in key order
      Throws:
      NoSuchRecordException - if the associated underlying record is not available