null - 如何在 aerospike 中获取记录的空值

标签 null record aerospike aql

enter image description here

我正在使用 aerospike。使用 AQL,我插入了一些数据。我想获取 aerospike 中具有特定字段的记录的空值。我在那个图片中标记图片一个记录没有名字它的空白处

最佳答案

Aeropsike 是无模式的——每条记录都是 self 描述的。任何非空的 bin 都是记录的一部分。任何更新为 null 的 bin 实际上都会从记录中删除。因此,考虑记录单元而不是包含列的表。您可以从记录中查询特定的 bin,如果未找到,Aeropsike 将返回 null。这是 Java API:

public final Record get(Policy policy,
         Key key,
         String... binNames)
                 throws AerospikeException
Read record header and bins for specified key. The policy can be used to specify timeouts.
Specified by:
get in interface IAerospikeClient
Parameters:
policy - generic configuration parameters, pass in null for defaults
key - unique record identifier
binNames - bins to retrieve
Returns:
if found, return record instance. If not found, return null.
Throws:
AerospikeException - if read fails

关于null - 如何在 aerospike 中获取记录的空值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44927124/

相关文章:

Haskell 记录语法和类型类

android - 停止失败,带有 TarsosDSP 的 Android 应用程序

database - 如何创建命名空间和设置

Postgresql NOT NULL AND <> '' 与 NOT NULL OR <> ''

java - 将参数设置为持久值

nullpointerexception - 华为 P8 Lite 应用崩溃;在其他设备上工作正常

go - 如何使用 aerospike 客户端进行“触摸获取”

忽略 NaN 的 Python pandas 独特值(value)

audio - j2me记录和流没有间隙?

java - Aerospike Java Spark 连接器