fix readme

Signed-off-by: persisting <liubinyu3@huawei.com>
This commit is contained in:
persisting
2025-09-26 22:10:43 +08:00
parent 24998a52a6
commit fb262b0e3b
4 changed files with 55 additions and 76 deletions
+30 -49
View File
@@ -2,7 +2,7 @@
## Introduction
The distributeddatamgr_distributeddatamgr_cangjie_wrapper is a capability provided on OpenHarmony for developers using the Cangjie programming language to develop applications. It enables the persistence of various structured data, as well as the synchronization and sharing of data across devices. By leveraging the Cangjie-encapsulated distributed data management, developers can easily achieve seamless connection of application data across different terminal devices, satisfying users' need for a consistent experience when using data across devices.The distributeddatamgr_distributeddatamgr_cangjie_wrapper currently under development only supports standard devices.
The distributeddatamgr_distributeddatamgr_cangjie_wrapper provides persistence of various structured data and synchronization and sharing functions of data between different devices for developers using the Cangjie language for application development on OpenHarmony. Through the Distributed Data Management Cangjie Wrapper, developers can easily achieve seamless connection of application data between different terminal devices, meeting users' consistent experience when using data across devices. The distributeddatamgr_distributeddatamgr_cangjie_wrapper currently under development only supports standard devices.
## System Architecture
@@ -13,24 +13,24 @@ The distributeddatamgr_distributeddatamgr_cangjie_wrapper is a capability provid
As shown in the architecture diagram:
Interface Layer:
- DataShare Predicates: Provides developers with data sharing predicates for implementing different query methods.
- Distributed KV Store: Offers developers the capability to manage key-value pair data.
- User Preferences: Supplies developers with lightweight Key-Value operations, supporting local applications in storing small amounts of data.
- RDB Store: Provides developers with a complete mechanism for managing local databases based on the SQLite component.
- Value Bucket: Gives developers data collections that can be inserted into the database.
- DataShare Predicates: Provides developers with filtering conditions used to query data in databases, including comparison predicate equal conditions, logical predicate AND conditions, range predicate contains conditions, and ascending and descending sorting of result sets.
- Distributed KV Store: Provides developers with distributed collaboration capabilities of databases between different devices, enabling data to be saved to distributed key-value databases, and allowing operations such as adding, deleting, modifying, querying, and end-to-end synchronization of data in distributed key-value databases.
- User Preferences: Provides developers with Key-Value type data processing capabilities, supporting application persistence of lightweight data, and modification and query of such data.
- RDB Store: Provides developers with a complete mechanism based on SQLite components for managing local databases, offering a series of interfaces for adding, deleting, modifying, and querying, and also supporting direct execution of user-input SQL statements.
- Value Bucket: Provides developers with a data collection that can be inserted into databases.
Framework Layer:
- DataShare Predicates Wrapper: Based on the underlying data_share, it implements predicates—filter conditions used for querying data in the database. Predicates can be used to update, delete, and query data.
- Distributed KV Store Wrapper: Built on the underlying kv_store, it enables distributed collaboration capabilities for databases across different devices. It allows data to be stored in the distributed key-value database and supports operations such as adding, deleting, modifying, querying, and end-to-end synchronization of data in the distributed key-value database.
- User Preferences Wrapper: Relying on the underlying preferences, it realizes Key-Value data processing capabilities, supporting persistent storage of lightweight data as well as modification and query of such data.
- RDB Store Wrapper: Based on the underlying relational_store, it implements a database that manages data using a relational model. It provides a series of interfaces for adding, deleting, modifying, and querying data, and also allows direct execution of user-input SQL statements to meet the needs of complex scenarios.
- Value Bucket Wrapper: Implements data collections that Cangjie applications can insert into the database.
- DataShare Predicates Wrapper: Implements data share predicates wrapper based on the underlying data sharing component, providing data share predicates for different query methods.
- Distributed KV Store Wrapper: Implements distributed key-value database wrapper based on the underlying KV database component, providing key-value pair data management capabilities.
- User Preferences Wrapper: Implements preferences wrapper based on the underlying preferences component, providing lightweight Key-Value operations and supporting local applications to store small amounts of data.
- RDB Store Wrapper: Implements relational database wrapper based on the underlying relational database component, providing a database that manages data based on the relational model.
- Value Bucket Wrapper: Implements a data collection that can be inserted into databases.
Dependencies Introduction in Architecture:
- data_share: The DataShare Predicates Wrapper depends on the data_share, which is used to implement the filter conditions for querying data in the database.
- kv_store: The Distributed KV Store Wrapper relies on the kv_store to achieve distributed collaboration capabilities for databases across different devices.
- preferences: The User Preferences Wrapper depends on the preferences, which is used to implement lightweight local Key-Value data processing capabilities.
- relational_store: The RDB Store Wrapper relies on the relational_store to implement the local relational database management mechanism.
- data_share: The DataShare Predicates Wrapper depends on the data_share, which is used to implement filtering conditions for querying data in databases.
- kv_store: The Distributed KV Store Wrapper relies on the kv_store implement distributed collaboration capabilities of databases between different devices.
- preferences: The User Preferences Wrapper depends on the preferences, which is used to implement lightweight local Key-Value type data processing capabilities.
- relational_store: The RDB Store Wrapper relies on the relational_store to implement local relational database management mechanisms.
- ability_cangjie_wrapper: The Distributed KV Store Wrapper, User Preferences Wrapper, and RDB Store Wrapper depend on the application context capability of ability_cangjie_wrapper, which is used for accessing database resources of the current application, among other purposes.
- hiviewdfx_cangjie_wrapper: Depends on HiLog capabilities for printing logs at key points.
- cangjie_ark_interop: Depends on APILevel class definitions and BusinessException class definitions for API annotation and throwing exceptions to users in error branches.
@@ -60,7 +60,7 @@ foundation/communication/netmanager_cangjie_wrapper
## Usage
As shown in the architecture diagram, the distributed data management Cangjie API provides the following functions. Developers can comprehensively use one or more types of interfaces according to their needs:
As shown in the architecture diagram, the distributeddatamgr_distributeddatamgr_cangjie_wrapper provides the following functions:
- DataShare Predicates.
- Distributed KV Store.
@@ -68,23 +68,6 @@ As shown in the architecture diagram, the distributed data management Cangjie AP
- RDB Store.
- Value Bucket.
Compared to ArkTS API, the following functions are not supported:
- Common Data Types.
- DataAbility Predicates.
- DataShare.
- Distributed Data Object.
- Shared User Preferences.
- Shared RDB Store.
- Unified Data Channel.
- Uniform Data Structs.
- Uniform Data Definition and Description.
- ArkData Intelligence Platform.
- DataShare ExtensionAbility.
- Device-Cloud Service.
- Device-Cloud Sharing Extension.
- DataShare Result Set.
For distributed data management related APIs, please refer to:
1. [ohos.data.data_share_predicates](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/API_Reference/source_en/apis/ArkData/cj-apis-data_share_predicates.md)
@@ -97,23 +80,21 @@ For related guidance, please refer to [Distributed Data Management Development G
## Constraints
Compared to ArkTS API, the following functions are not supported:
Compared to ArkTS API:
- Common Data Types.
- DataAbility Predicates.
- DataShare.
- Distributed Data Object.
- Shared User Preferences.
- Shared RDB Store.
- Unified Data Channel.
- Uniform Data Structs.
- Uniform Data Definition and Description.
- ArkData Intelligence Platform.
- DataShare ExtensionAbility.
- Device-Cloud Service.
- Device-Cloud Sharing Extension.
- DataShare Result Set.
- Pasteboard.
- RDB Store does not currently support the following functions:
- Transactions.
- Common Data Types is not currently supported.
- DataAbility Predicates is not currently supported.
- DataShare is not currently supported.
- Distributed Data Object is not currently supported.
- Shared User Preferences is not currently supported.
- Shared RDB Store is not currently supported.
- Unified Data Channel is not currently supported.
- Uniform Data Structs is not currently supported.
- Uniform Data Definition and Description is not currently supported.
- ArkData Intelligence Platform is not currently supported.
- Device-Cloud Service is not currently supported.
## Code Contribution
+25 -27
View File
@@ -2,7 +2,7 @@
## 简介
分布式数据管理仓颉封装是在OpenHarmony上面开发者使用仓颉语言进行应用开发时提供的各种结构化数据的持久化,以及跨设备之间数据的同步、共享功能。开发者通过分布式数据管理仓颉封装,能够方便地完成应用程序数据在不同终端设备间的无缝衔接,满足用户跨设备使用数据的一致性体验。当前开发的分布式数据管理仓颉封装仅支持standard设备。
分布式数据管理仓颉封装是在OpenHarmony上面开发者使用仓颉语言进行应用开发时提供的各种结构化数据的持久化,以及跨设备之间数据的同步、共享功能。开发者通过分布式数据管理仓颉封装,能够方便地完成应用程序数据在不同终端设备间的无缝衔接,满足用户跨设备使用数据的一致性体验。当前开发的分布式数据管理仓颉封装仅支持standard设备。
## 系统架构
@@ -14,25 +14,25 @@
接口层:
- 数据共享谓词:面向开发者提供用于实现不同查询方法的数据共享谓词
- 分布式键值数据库:面向开发者提供键值对数据管理能力
- 用户首选项:面向开发者提供轻量级Key-Value操作,支持本地应用存储少量数据
- 关系型数据库:面向开发者提供了一套基于SQLite组件完整的对本地数据库进行管理的机制。
- 数据共享谓词:面向开发者提供查询数据库中数据所使用的筛选条件,包括比较谓词等于条件,逻辑谓词与条件,范围谓词包含条件以及结果集的递增排序和递减排序
- 分布式键值数据库:面向开发者提供不同设备间数据库的分布式协同能力,能够将数据保存到分布式键值数据库中,并可对分布式键值数据库中的数据进行增加、删除、修改、查询、端端同步等操作
- 用户首选项:面向开发者提供Key-Value键值型的数据处理能力,支持应用持久化轻量级数据,并对其修改和查询
- 关系型数据库:面向开发者提供了一套基于SQLite组件完整的对本地数据库进行管理的机制,对外提供了一系列的增、删、改、查等接口,也支持直接运行用户输入的SQL语句
- 数据集:面向开发者提供可向数据库插入的数据集合。
框架层:
- 数据共享谓词封装:基于底层数据共享部件实现了查询数据库中数据所使用的筛选条件即谓词,利用谓词可以进行数据的更新、删除和查询
- 分布式键值数据库封装:基于底层KV数据库部件实现不同设备间数据库的分布式协同能力,能够将数据保存到分布式键值数据库中,并可对分布式键值数据库中的数据进行增加、删除、修改、查询、端端同步等操作
- 用户首选项封装:基于底层首选项部件实现Key-Value键值型的数据处理能力,支持持久化轻量级数据,并对其修改和查询。
- 关系型数据库封装:基于底层关系型数据库部件实现一种基于关系模型来管理数据的数据库,提供了一系列的增、删、改、查等接口,也可以直接运行用户输入的SQL语句来满足复杂的场景需要
- 数据集封装:实现了仓颉应用向数据库插入的数据集合。
- 数据共享谓词封装:基于底层数据共享部件实现数据共享谓词封装,提供用于不同查询方法的数据共享谓词
- 分布式键值数据库封装:基于底层KV数据库部件实现分布式键值数据库封装,提供键值对数据管理能力
- 用户首选项封装:基于底层首选项部件实现用户首选项封装,提供轻量级Key-Value操作,支持本地应用存储少量数据
- 关系型数据库封装:基于底层关系型数据库部件实现关系型数据库封装,提供一种基于关系模型来管理数据的数据库。
- 数据集封装:实现了向数据库插入的数据集合。
架构图中依赖部件引入说明:
- 数据共享部件:数据共享谓词封装依赖数据共享部件,用于实现查询数据库中数据所使用的筛选条件。
- KV数据库部件:分布式键值数据库封装依赖KV数据库部件,用于实现不同设备间数据库的分布式协同能力。
- 首选项部件:用户首选项封装依赖首选项部件,用于实现轻量级的本地Key-Value键值型数据处理能力。
- 首选项部件:用户首选项封装依赖首选项部件,用于实现轻量级的本地Key-Value键值型数据处理能力。
- 关系型数据库部件:关系型数据库封装依赖关系型数据库部件,用于实现本地关系型数据库管理机制。
- ability_cangjie_wrapper:分布式键值数据库封装、用户首选项封装以及关系型数据库封装依赖ability_cangjie_wrapper的应用上下文能力,用于访问当前应用的数据库资源等。
- hiviewdfx_cangjie_wrapper:依赖hiviewdfx_cangjie_wrapper提供的HiLog日志能力,用于在关键路径打印日志。
@@ -83,23 +83,21 @@ foundation/communication/netmanager_cangjie_wrapper
## 约束
与ArkTS提供的API能力相比,暂不支持以下功能
与ArkTS提供的API能力相比:
- 数据通用类型。
- DataAbility谓词
- 数据共享。
- 分布式数据对象
- 共享用户首选项
- 共享关系型数据库
- 标准化数据通路
- 标准化数据结构
- 标准化数据定义与描述
- 智慧数据平台
- 数据共享扩展能力
- 端云服务
- 端云共享Extension
- 数据共享结果集。
- 剪贴板。
- 关系型数据库暂不支持以下功能:
- 事务
- 暂不支持数据共享。
- 暂不支持数据通用类型
- 暂不支持DataAbility谓词
- 暂不支持分布式数据对象
- 暂不支持共享用户首选项
- 暂不支持共享关系型数据库
- 暂不支持标准化数据通路
- 暂不支持标准化数据结构
- 暂不支持标准化数据定义与描述
- 暂不支持智慧数据平台
- 暂不支持端云服务
## 参与贡献
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB