Home Reference Source
import Record from 'neo4j-driver/lib/v1/record.js'
public class | source

Record

Records make up the contents of the Result, and is how you access the output of a statement. A simple statement might yield a result stream with a single record, for instance:

MATCH (u:User) RETURN u.name, u.age

This returns a stream of records with two fields, named u.name and u.age, each record represents one user found by the statement above. You can access the values of each field either by name:

record.get("u.name")

Or by it's position:

record.get(0)

Member Summary

Public Members
public

keys: *

public

length: *

Method Summary

Public Methods
public

forEach(visitor: function(value: Object, key: string, record: Record))

Run the given function for each field in this record.

public

get(key: string | Number): *

Get a value from this record, either by index or by field key.

public

has(key: string | Number): boolean

Check if a value from this record, either by index or by field key, exists.

public

toObject(): Object

Generates an object out of the current Record

Public Members

public keys: * source

public length: * source

Public Methods

public forEach(visitor: function(value: Object, key: string, record: Record)) source

Run the given function for each field in this record. The function will get three arguments - the value, the key and this record, in that order.

Params:

NameTypeAttributeDescription
visitor function(value: Object, key: string, record: Record)

the function to apply to each field.

public get(key: string | Number): * source

Get a value from this record, either by index or by field key.

Params:

NameTypeAttributeDescription
key string | Number

Field key, or the index of the field.

Return:

*

public has(key: string | Number): boolean source

Check if a value from this record, either by index or by field key, exists.

Params:

NameTypeAttributeDescription
key string | Number

Field key, or the index of the field.

Return:

boolean

public toObject(): Object source

Generates an object out of the current Record

Return:

Object