/** * Record represents an entry in the result of a query */ declare class Record { readonly length: number; private readonly _variables; private readonly _values; private readonly _variableToIndex; /** * This constructor should not be called directly * * @param variables the variables of the query * @param values the values of the record * @param variableToIndex a map from variable to index */ constructor(variables: Array, values: Array, variableToIndex: { [key: string]: number; }); /** * Iterate over all entries (key, value) * * @returns an iterable over all entries */ entries(): IterableIterator<[string, any]>; /** * Iterate over all values * * @returns an iterable over all values */ values(): IterableIterator; /** * Iterate over all values. Equivalent to record.values() * * @returns an iterable over all values */ [Symbol.iterator](): IterableIterator; /** * Get the value associated with the key in the record * * @param key the variable name or its index emmited by the onVariables event * @returns the value associated with the key */ get(key: number | string): any; /** * Check if the record has a value associated with the key * * @param key the variable name or its index emmited by the onVariables event * @returns true if the record has a value associated with the key */ has(key: number | string): boolean; /** * Convert the record to an {@link Object} * * @returns the record as an {@link Object} */ toObject(): Object; } export default Record;