README.md
1# Querying the DDM Result Set
2
3### Introduction
4
5This sample shows how to create a query object to query data in a key-value (KV) store and obtain the result set in distributed data management (DDM).
6
7### Usage
8
91. Touch **Add Data** to save the template data to the RDB store.
10
112. Touch **Query the Result Set** to obtain the result set that contains the specified key.
12
133. Touch **Query the Specified Value Entry** to obtain the result set that contains the specified key based on the predicate.
14
154. Touch **And Condition Query** and specify the predicate to obtain the result set in which **FieldNode** is not a specific value.
16
175. Touch **Query Results in Descending Order** to obtain the result set in which **FieldNode** is not a specific value and list the values in descending order.
18
196. Touch **Query Smaller Than Value** to obtain the KV pairs whose **FieldNode** is less than the specified value based on the predicate.
20
21### Constraints
22
23This sample can only be run on standard-system devices.
24
README_zh.md
1# 结果集与谓词
2
3### 简介
4
5本示例展示了分布式数据管理中,如何通过构建query对象, 查询kvstore中的数据,获取结果集。实现效果如下:
6
7
8
9### 相关概念
10
11KvStoreResultSet:提供获取KVStore数据库结果集的方法,提供查询和移动数据读取位置的方法,在调用KvStoreResultSet的方法前,需要先通过KVStore构建一个KVStore实例。
12
13### 相关权限
14
15允许不同设备间的数据交换:ohos.permission.DISTRIBUTED_DATASYNC
16
17### 使用说明
18
191.点击**添加数据**,将模板数据存入数据库。
20
212.点击**查询指定字段结果集**,从数据库中查询包含指定key字段的结果集。
22
233.点击**查询指定值条目**,通过谓词从数据库中查询包含指定key字段的结果集。
24
254.点击**与条件查询**,通过谓词从数据库中查询FieldNode对应的值不为特定值的结果集。
26
275.点击**查询結果降序**,通过谓词从数据库中查询FieldNode对应的值不为特定值且降序排序的结果集。
28
296.点击**查询小于指定值**,通过谓词从数据库中查询FieldNode对应的值小于特定值的键值对列表。
30
31### 约束与限制
32
331.本示例仅支持在标准系统上运行。
34
352.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。