public interface Record
extends com.graphdbapi.driver.v1.types.MapAccessorWithDefaultValue
结果流从Cypher语句执行返回,包含在 StatementResult
内。
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap()
将此记录作为map返回,其中每个值都已使用
Value.asObject() 被转换为默认java对象 |
<T> Map<String,T> |
asMap(com.graphdbapi.driver.v1.util.Function<com.graphdbapi.driver.v1.Value,T> mapper)
将此记录作为map返回,其中结果值使用指定的转换函数进行转换。您可以在
Values 中找到一个公共映射函数库。 |
boolean |
containsKey(String key)
检查键列表是否包含指定键
|
List<com.graphdbapi.driver.v1.util.Pair<String,com.graphdbapi.driver.v1.Value>> |
fields()
检索记录所有结果键值对
|
com.graphdbapi.driver.v1.Value |
get(int index)
检索指定字段索引处的结果值
|
com.graphdbapi.driver.v1.Value |
get(String key)
使用指定键检索属性的值
|
int |
index(String key)
使用指定键检索字段的索引
|
List<String> |
keys()
检索基础映射的键
|
int |
size()
检索此记录中的结果值数量
|
List<com.graphdbapi.driver.v1.Value> |
values()
检索基础映射的值
|
<T> Map<String,T> asMap(com.graphdbapi.driver.v1.util.Function<com.graphdbapi.driver.v1.Value,T> mapper)
Values
中找到一个公共映射函数库。T
- 要转换为的类型mapper
- 映射函数boolean containsKey(String key)
key
- 指定键List<com.graphdbapi.driver.v1.util.Pair<String,com.graphdbapi.driver.v1.Value>> fields()
com.graphdbapi.driver.v1.exceptions.NoSuchRecordException
- 如果关联的底层记录不可用com.graphdbapi.driver.v1.Value get(int index)
index
- 值的索引NullValue
如果索引超出了范围ClientException
- 如果记录尚未初始化com.graphdbapi.driver.v1.Value get(String key)
key
- 属性的键NullValue
如果键不存在com.graphdbapi.driver.v1.exceptions.NoSuchRecordException
- 如果关联的底层记录不可用int index(String key)
key
- 指定键get(int)
互通NoSuchElementException
- 如果指定键不在 keys()
int size()
List<com.graphdbapi.driver.v1.Value> values()
Copyright © 2024. All rights reserved.