llt test构建配置修改 Created-by: qq_35037212 Commit-by: fangwusheng Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) https://gitcode.com/openharmony/distributeddatamgr_distributeddatamgr_cangjie_wrapper/issues/51 ### 二、建议测试周期和提测地址 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: 无 ### 三、变更内容 * 3.1 关联PR列表 https://gitcode.com/openharmony/distributeddatamgr_distributeddatamgr_cangjie_wrapper/pull/76 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无" 无 * 3.4 其他技术优化内容(做了什么,变更了什么) 根据仓上对应分支修改用例工程构建配置,Dev/Trunk分支修改为6.1.0-APILevel23,Cangjie-build-support同样匹配对应版本构建方式 主要修改: hvigor-config.json5文件 test目录下build-profile.json5文件 检查module.json5中的设备类型HarmonyOS工程为"phone",OpenHarmony工程对应为"default" * 3.5 废弃通知(什么字段、方法弃用?) 不涉及 * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 不涉及 ### 四、研发自测点(自测哪些?冒烟用例全部自测?) 自测测试结论: 测试通过 ### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方) 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试:不涉及 性能测试:不涉及 并发测试:不涉及 其他: See merge request: openharmony/distributeddatamgr_distributeddatamgr_cangjie_wrapper!76
distributeddatamgr_distributeddatamgr_cangjie_wrapper(beta feature)
Introduction
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. The distributeddatamgr_distributeddatamgr_cangjie_wrapper currently under development only supports standard devices.
System Architecture
Figure 1 Distributed Data Management Cangjie Wrapper Architecture Diagram
As shown in the architecture diagram:
Interface Layer:
-
DataShare Predicates: Provides developers with data query filtering capabilities, supporting the construction of complex query conditions.
- Comparison Predicates: Supports equal-to conditions.
- Logical Predicates: Supports AND conditions.
- Range Predicates: Supports IN conditions.
- Sorting Functions: Supports ascending and descending order of result sets.
- Other Functions: Supports pagination queries. When developers need to retrieve data without focusing on specific database types, data share predicates can be used as general query conditions, such as retrieval of photos and videos in albums.
-
Distributed KV Database: Provides developers with cross-device distributed data collaboration capabilities, supporting seamless synchronization and sharing of data between multiple devices.
- Database Management: Supports database creation, closure, deletion, and obtaining identifier IDs of all created databases.
- Database Operations: Supports database backup and restore operations.
- Data Operations: Supports addition, deletion, modification, and query of data records.
- Transaction Support: Supports transaction enabling, commit, and rollback.
- Data Subscription: Supports subscription and unsubscription of specified types of data changes.
- Synchronization Function: Supports end-to-end database synchronization.
-
User Preferences: Provides developers with lightweight Key-Value data processing capabilities, specifically for persistent storage of application configuration information and user preferences.
- Database Management: Supports database acquisition, deletion, and removal from cache.
- Database Operations: Supports clearing all data, obtaining all data, and data persistence.
- Data Operations: Supports data writing, searching, and deletion.
- Data Subscription: Supports subscription and unsubscription of data changes based on Key or Value values, with callback triggering after persistent file changes.
-
RDB Store: Provides developers with a complete local database management mechanism based on SQLite components, supporting standard relational data models.
- Database Management: Supports database creation and deletion.
- Database Operations: Supports database backup and restore operations.
- Data Operations: Provides addition, deletion, modification, and query of data records.
- SQL Execution: Supports direct execution of user-defined SQL statements, including table structure definition and data manipulation for complex database operations. Currently, only the creation and deletion of tables via SQL statements are supported.
-
Value Bucket: Provides developers with standardized data field type enumeration classes, including Integer, Double, StringValue, and Boolean.
Framework Layer:
- 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 standardized data field type enumerations.
Dependencies Introduction in Architecture:
- 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: Framework Layer depends on HiLog capabilities for printing logs at key points.
- cangjie_ark_interop: Framework Layer depends on APILevel class definitions and BusinessException class definitions for API annotation and throwing exceptions to users in error branches.
Directory Structure
The directory structure is as follows:
foundation/communication/netmanager_cangjie_wrapper
├── figures # architecture pictures
├── kit # Cangjie kit code
│ └── ArkData # ArkData module implementation
└── ohos # Cangjie distributed data management interface implementation
│ └── data
│ ├── data_share_predicates # Data share predicates module
│ ├── distributed_kv_store # Distributed key-value database module
│ ├── preferences # User preferences module
│ ├── relational_store # Relational database module
│ └── values_bucket # Value bucket module
└── test # Cangjie distributed data management test cases
├── data_share_predicates # Data share predicates test cases
├── distributed_kv_store # Distributed key-value database test cases
├── preferences # User preferences test cases
└── relational_store # Relational database test cases
Usage
The distributeddatamgr_distributeddatamgr_cangjie_wrapper provides the following functions:
- DataShare Predicates.
- Distributed KV Store.
- User Preferences.
- RDB Store.
- Value Bucket.
For distributed data management related APIs, please refer to:
- ohos.data.data_share_predicates
- ohos.data.distributed_kv_store
- ohos.data.preferences
- ohos.data.relational_store
- ohos.data.values_bucket
For related guidance, please refer to Distributed Data Management Development Guide
Constraints
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.
- Device-Cloud Service.
RDB Store does not currently support the following functions:
- Transactions.
Code Contribution
Developers are welcome to contribute code, documentation, etc. For specific contribution processes and methods, please refer to Code Contribution.
Repositories Involved
ability_ability_cangjie_wrapper
arkcompiler_cangjie_ark_interop
distributeddatamgr_preferences
