Merge branch 'dev0928' of git@gitcode.com:goukun/distributeddatamgr_distributeddatamgr_cangjie_wrapper.git into 'master'

# Conflicts:
#   conflict ohos/data/distributed_kv_store/distributed_kv_store_common.cj
#   conflict test/data_share_predicates/test/entry/src/main/cangjie/src/Test_data_share_predicates.cj
#   conflict test/distributed_kv_store/test/entry/src/main/cangjie/src/Test_distributed_kv_store_error.cj
#   conflict test/preferences/test/entry/src/main/cangjie/src/Test_preferences.cj
#   conflict test/relational_store/test/entry/src/main/cangjie/src/Test_relational_store.cj
This commit is contained in:
goukun
2025-10-09 09:23:57 +08:00
46 changed files with 189 additions and 500 deletions
+36 -9
View File
@@ -1,4 +1,4 @@
# distributeddatamgr_distributeddatamgr_cangjie_wrapper
# distributeddatamgr_distributeddatamgr_cangjie_wrapper(beta feature)
## Introduction
@@ -6,27 +6,54 @@ The distributeddatamgr_distributeddatamgr_cangjie_wrapper provides persistence o
## System Architecture
**Figure 1** distributeddatamgr_cangjie_wrapper architecture
**Figure 1** Distributed Data Management Cangjie Wrapper Architecture Diagram
![Architecture of the distributeddatamgr_distributeddatamgr_cangjie_wrapper](figures/distributeddatamgr_cangjie_wrapper_architecture_en.png)
![Distributed Data Management Cangjie Wrapper Architecture Diagram](figures/distributeddatamgr_cangjie_wrapper_architecture.png)
As shown in the architecture diagram:
Interface Layer:
- 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.
- 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](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/Dev_Guide/source_zh_cn/media/medialibrary/cj-photoAccessHelper-systemAlbum-guidelines.md).
- 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 a data collection that can be inserted into databases.
- 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.
+32 -10
View File
@@ -1,4 +1,4 @@
# 分布式数据管理仓颉封装
# 分布式数据管理仓颉封装beta特性)
## 简介
@@ -14,11 +14,36 @@
接口层:
- 数据共享谓词:面向开发者提供查询数据库中数据时所使用的筛选条件,包括比较谓词等于条件,逻辑谓词与条件,范围谓词包含条件以及结果集的递增排序和递减排序
- 分布式键值数据库:面向开发者提供不同设备间数据库的分布式协同能力,能够将数据保存到分布式键值数据库中,并可对分布式键值数据库中的数据进行增加、删除、修改、查询、端端同步等操作
- 用户首选项:面向开发者提供Key-Value键值型的数据处理能力,支持应用持久化轻量级数据,并对其修改和查询
- 关系型数据库:面向开发者提供了一套基于SQLite组件的对本地数据库进行管理的完整机制,包括一系列的增、删、改、查等接口,也支持直接运行用户输入的SQL语句
- 数据集:面向开发者提供可向数据库插入的数据类型集合
- 数据共享谓词:面向开发者提供数据查询筛选能力,支持构建复杂的查询条件
- 比较谓词:支持等于条件
- 逻辑谓词:支持与条件
- 范围谓词:支持包含条件
- 排序功能:支持结果集的递增和递减排序
- 其他功能:支持分页查询。
当开发者需要在不关注具体数据库类型的情况下检索数据时,数据共享谓词可作为通用的查询条件使用,例如[相册中图片和视频的检索](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/Dev_Guide/source_zh_cn/media/medialibrary/cj-photoAccessHelper-systemAlbum-guidelines.md)。
- 分布式键值数据库:面向开发者提供跨设备的分布式数据协同能力,支持在多个设备间实现数据的无缝同步与共享。
- 数据库管理:支持数据库的创建、关闭、删除、获取所有已创建数据库的标识id。
- 数据库操作:支持数据库的备份和恢复操作。
- 数据操作:支持数据记录的增、删、改、查。
- 事务支持:支持事务的启用、提交、回滚。
- 数据订阅:支持订阅以及取消订阅指定类型的数据变更。
- 同步功能:支持数据库的端到端同步。
- 用户首选项:面向开发者提供轻量级的Key-Value键值型数据处理能力,专门用于应用配置信息和用户偏好的持久化存储。
- 数据库管理:支持数据库的获取、删除以及从缓存中移除。
- 数据库操作:支持清空所有数据、获取所有数据以及数据持久化。
- 数据操作:支持数据的写入、查找和删除。
- 数据订阅:支持基于Key值或者Value值订阅以及取消订阅数据变更,持久化文件发生变更后回调触发。
- 关系型数据库:面向开发者提供一套基于SQLite组件的完整本地数据库管理机制,支持标准的关系型数据模型。
- 数据库管理:支持数据库的创建、删除。
- 数据库操作:支持数据库的备份和恢复操作。
- 数据操作:提供数据记录的增、删、改、查。
- SQL执行:支持直接执行用户自定义的SQL语句,当前仅支持通过SQL语句实现表的创建以及删除操作。
- 数据集:面向开发者提供标准化的数据字段类型枚举类,包括整型、浮点型、字符串型、布尔型。
框架层:
@@ -26,7 +51,7 @@
- 分布式键值数据库封装:基于底层KV数据库部件实现分布式键值数据库封装,提供键值对数据管理能力。
- 用户首选项封装:基于底层首选项部件实现用户首选项封装,提供轻量级Key-Value操作,支持本地应用存储少量数据。
- 关系型数据库封装:基于底层关系型数据库部件实现关系型数据库封装,提供一种基于关系模型来管理数据的数据库。
- 数据集封装:实现了可向数据库插入的数据类型集合
- 数据集封装:实现了标准化的数据字段类型枚举类
架构图中依赖部件引入说明:
@@ -97,9 +122,6 @@ foundation/communication/netmanager_cangjie_wrapper
- 智慧数据平台。
- 端云服务。
关系型数据库暂不支持以下功能:
- 事务。
## 参与贡献
欢迎广大开发者贡献代码、文档等,具体的贡献流程和方式请参见[参与贡献](https://gitcode.com/openharmony/docs/blob/master/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)。
+2 -3
View File
@@ -16,8 +16,7 @@
"SystemCapability.DistributedDataManager.DataShare.Core",
"SystemCapability.DistributedDataManager.KVStore.Core",
"SystemCapability.DistributedDataManager.Preferences.Core",
"SystemCapability.DistributedDataManager.RelationalStore.Core",
"SystemCapability.DistributedDataManager.DataShare.Core"
"SystemCapability.DistributedDataManager.RelationalStore.Core"
],
"features": [],
"adapted_system_type": [
@@ -43,7 +42,7 @@
"//foundation/distributeddatamgr/distributeddatamgr_cangjie_wrapper/ohos/data/preferences:ohos.data.preferences",
"//foundation/distributeddatamgr/distributeddatamgr_cangjie_wrapper/ohos/data/relational_store:ohos.data.relational_store",
"//foundation/distributeddatamgr/distributeddatamgr_cangjie_wrapper/ohos/data/values_bucket:ohos.data.values_bucket",
"//foundation/distributeddatamgr/distributeddatamgr_cangjie_wrapper/kit/ArkData:ArkData"
"//foundation/distributeddatamgr/distributeddatamgr_cangjie_wrapper/kit/ArkData:kit.ArkData"
],
"inner_kits": [
{
+3 -1
View File
@@ -11,10 +11,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
ohos_cangjie_shared_library("ArkData") {
ohos_cangjie_shared_library("kit.ArkData") {
sources = [ "index.cj" ]
cj_deps = [
+3 -1
View File
@@ -13,7 +13,9 @@
* limitations under the License.
*/
package ArkData
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package kit.ArkData
public import ohos.data.*
public import ohos.data.data_share_predicates.*
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
+2
View File
@@ -13,4 +13,6 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.data_share_predicates
import ohos.data.values_bucket.*
@@ -38,8 +40,6 @@ private func createDataSharePredicates(): Int64 {
/**
* Manages relational database configurations.
*
* @relation class DataSharePredicates
*/
@!APILevel[
22,
@@ -71,7 +71,6 @@ public class DataSharePredicates <: RemoteDataLite {
* @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
* @throws { BusinessException } 401 - Parameter error.
* @throws { BusinessException } -1 - Instance invalid.
* @relation equalTo(field: string, value: ValueType): DataSharePredicates
*/
@!APILevel[
22,
@@ -101,7 +100,6 @@ public class DataSharePredicates <: RemoteDataLite {
*
* @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
* @throws { BusinessException } -1 - Instance invalid.
* @relation and(): DataSharePredicates
*/
@!APILevel[
22,
@@ -123,7 +121,6 @@ public class DataSharePredicates <: RemoteDataLite {
* @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
* @throws { BusinessException } 401 - Parameter error.
* @throws { BusinessException } -1 - Instance invalid.
* @relation orderByAsc(field: string): DataSharePredicates
*/
@!APILevel[
22,
@@ -151,7 +148,6 @@ public class DataSharePredicates <: RemoteDataLite {
* @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
* @throws { BusinessException } 401 - Parameter error.
* @throws { BusinessException } -1 - Instance invalid.
* @relation orderByDesc(field: string): DataSharePredicates
*/
@!APILevel[
22,
@@ -180,7 +176,6 @@ public class DataSharePredicates <: RemoteDataLite {
* @returns { DataSharePredicates } Returns the query object.
* @throws { BusinessException } 401 - Parameter error.
* @throws { BusinessException } -1 - Instance invalid.
* @relation limit(total: number, offset: number): DataSharePredicates
*/
@!APILevel[
22,
@@ -208,7 +203,6 @@ public class DataSharePredicates <: RemoteDataLite {
* @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
* @throws { BusinessException } 401 - Parameter error.
* @throws { BusinessException } -1 - Instance invalid.
* @relation in(field: string, value: Array<ValueType>): DataSharePredicates
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.data_share_predicates
import ohos.hilog.*
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.data_share_predicates
import ohos.data.values_bucket.*
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.labels.*
@@ -29,8 +31,6 @@ import ohos.business_exception.BusinessException
* data by device, and cannot modify data synchronized from remote devices. When an application writes a
* key-value pair entry
* into the database, the system automatically adds the ID of the device running the application to the key.
*
* @relation interface DeviceKVStore extends SingleKVStore
*/
@!APILevel[
22,
@@ -58,7 +58,6 @@ public class DeviceKVStore <: SingleKVStore {
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100004 - Not found.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation get(key: string): Promise<boolean | string | number | Uint8Array>
*/
@!APILevel[
22,
@@ -96,7 +95,6 @@ public class DeviceKVStore <: SingleKVStore {
* <br>2.Incorrect parameters types.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation getEntries(keyPrefix: string): Promise<Entry[]>
*/
@!APILevel[
22,
@@ -134,7 +132,6 @@ public class DeviceKVStore <: SingleKVStore {
* <br>2.Incorrect parameters types.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation getEntries(query: Query): Promise<Entry[]>
*/
@!APILevel[
22,
@@ -174,7 +171,6 @@ public class DeviceKVStore <: SingleKVStore {
* @throws { BusinessException } 15100001 - Over max limits.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation getResultSet(keyPrefix: string): Promise<KVStoreResultSet>
*/
@!APILevel[
22,
@@ -212,7 +208,6 @@ public class DeviceKVStore <: SingleKVStore {
* @throws { BusinessException } 15100001 - Over max limits.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation getResultSet(query: Query): Promise<KVStoreResultSet>
*/
@!APILevel[
22,
@@ -244,7 +239,6 @@ public class DeviceKVStore <: SingleKVStore {
* <br>2.Incorrect parameters types.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation getResultSize(query: Query): Promise<number>
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.app.ability.ui_ability.{UIAbilityContext, getStageContext}
@@ -30,8 +32,6 @@ type StageContext = CPointer<Unit>
/**
* Provider interfaces to create a {@link KVManager} instance.
*
* @relation declare namespace distributedKVStore
*/
@!APILevel[
22,
@@ -44,7 +44,6 @@ public class DistributedKVStore {
* to create a {@link KVManager} instance.
*
* @throws { IllegalArgumentException } - The context type is not supported. Only support UIAbilityContext.
* @relation function createKVManager(config: KVManagerConfig): KVManager;
*/
@!APILevel[
22,
@@ -70,8 +69,6 @@ public class DistributedKVStore {
/**
* Provides interfaces to manage a {@code SingleKVStore} database, including obtaining, closing, and deleting the
* {@code SingleKVStore}.
*
* @relation interface KVManager
*/
@!APILevel[
22,
@@ -116,7 +113,6 @@ public class KVManager <: RemoteDataLite {
* @throws { IllegalArgumentException } The type is not supported yet.
* @throws { BusinessException } 15100002 - Open existed database with changed options.
* @throws { BusinessException } 15100003 - Database corrupted.
* @relation getKVStore<T>(storeId: string, options: Options): Promise<T>
*/
@!APILevel[
22,
@@ -140,7 +136,6 @@ public class KVManager <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Parameter verification failed.
* @relation closeKVStore(appId: string, storeId: string): Promise<void>
*/
@!APILevel[
22,
@@ -171,7 +166,6 @@ public class KVManager <: RemoteDataLite {
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Parameter verification failed.
* @throws { BusinessException } 15100004 - Not found.
* @relation deleteKVStore(appId: string, storeId: string): Promise<void>
*/
@!APILevel[
22,
@@ -199,7 +193,6 @@ public class KVManager <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Parameter verification failed.
* @relation getAllKVStoreId(appId: string): Promise<string[]>
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.app.ability.BaseContext
@@ -23,7 +25,6 @@ import std.collection.*
/**
* KVStore constants
* @relation interface Constants
*/
@!APILevel[
22,
@@ -32,7 +33,6 @@ import std.collection.*
public class Constants {
/**
* Max key length is 1024.
* @relation readonly MAX_KEY_LENGTH: number;
*/
@!APILevel[
22,
@@ -42,7 +42,6 @@ public class Constants {
/**
* Max value length is 4194303.
* @relation readonly MAX_VALUE_LENGTH: number;
*/
@!APILevel[
22,
@@ -52,7 +51,6 @@ public class Constants {
/**
* Max device coordinate key length is 896.
* @relation readonly MAX_KEY_LENGTH_DEVICE: number;
*/
@!APILevel[
22,
@@ -62,7 +60,6 @@ public class Constants {
/**
* Max store id length is 128.
* @relation readonly MAX_STORE_ID_LENGTH: number;
*/
@!APILevel[
22,
@@ -72,7 +69,6 @@ public class Constants {
/**
* Max query length is 512000.
* @relation readonly MAX_QUERY_LENGTH: number;
*/
@!APILevel[
22,
@@ -82,7 +78,6 @@ public class Constants {
/**
* Max batch operation size is 128.
* @relation readonly MAX_BATCH_SIZE: number;
*/
@!APILevel[
22,
@@ -95,8 +90,6 @@ public class Constants {
/**
* Indicates the {@code KVValueType}.
*
* @relation enum KVValueType
*/
@!APILevel[
22,
@@ -105,8 +98,6 @@ public class Constants {
public enum KVValueType {
/**
* Indicates that the value type is string.
*
* @relation STRING,
*/
@!APILevel[
22,
@@ -116,8 +107,6 @@ public enum KVValueType {
|
/**
* Indicates that the value type is int.
*
* @relation INTEGER,
*/
@!APILevel[
22,
@@ -127,8 +116,6 @@ public enum KVValueType {
|
/**
* Indicates that the value type is float.
*
* @relation FLOAT,
*/
@!APILevel[
22,
@@ -138,8 +125,6 @@ public enum KVValueType {
|
/**
* Indicates that the value type is byte array.
*
* @relation BYTE_ARRAY,
*/
@!APILevel[
22,
@@ -149,8 +134,6 @@ public enum KVValueType {
|
/**
* Indicates that the value type is boolean.
*
* @relation BOOLEAN,
*/
@!APILevel[
22,
@@ -160,8 +143,6 @@ public enum KVValueType {
|
/**
* Indicates that the value type is double.
*
* @relation DOUBLE
*/
@!APILevel[
22,
@@ -174,8 +155,6 @@ public enum KVValueType {
/**
* Provides configuration information to create a {@link KVManager} instance,
* which includes the caller's package name and ability or hap context.
*
* @relation interface KVManagerConfig
*/
@!APILevel[
22,
@@ -184,8 +163,6 @@ public enum KVValueType {
public class KVManagerConfig {
/**
* Indicates the ability or hap context
*
* @relation context: BaseContext
*/
@!APILevel[
22,
@@ -195,8 +172,6 @@ public class KVManagerConfig {
/**
* Indicates the bundleName
*
* @relation bundleName: string
*/
@!APILevel[
22,
@@ -232,8 +207,6 @@ enum KVStoreType {
/**
* Describes the KVStore security level.
*
* @relation enum SecurityLevel
*/
@!APILevel[
22,
@@ -243,8 +216,6 @@ public enum KVSecurityLevel {
/**
* S1: means the db is in the low security level
* There are some low impact when the data is leaked.
*
* @relation S1,
*/
@!APILevel[
22,
@@ -255,8 +226,6 @@ public enum KVSecurityLevel {
/**
* S2: means the db is in the middle security level
* There are some major impact when the data is leaked.
*
* @relation S2,
*/
@!APILevel[
22,
@@ -267,8 +236,6 @@ public enum KVSecurityLevel {
/**
* S3: means the db is in the high security level
* There are some severity impact when the data is leaked.
*
* @relation S3,
*/
@!APILevel[
22,
@@ -279,8 +246,6 @@ public enum KVSecurityLevel {
/**
* S4: means the db is in the critical security level
* There are some critical impact when the data is leaked.
*
* @relation S4
*/
@!APILevel[
22,
@@ -316,8 +281,6 @@ public enum KVSecurityLevel {
* <p>With a {@link Schema} instance, you can define the value fields which stored in the database.
* <p>A FieldNode of the {@link Schema} instance is either a leaf or a non-leaf node.
* <p>The leaf node must have a value; the non-leaf node must have a child {@code FieldNode}.
*
* @relation class FieldNode
*/
@!APILevel[
22,
@@ -326,8 +289,6 @@ public enum KVSecurityLevel {
public class FieldNode {
/**
* Indicates the nullable of database field.
*
* @relation nullable: boolean;
*/
@!APILevel[
22,
@@ -337,8 +298,6 @@ public class FieldNode {
/**
* Indicates the default value of field node.
*
* @relation default: string;
*/
@!APILevel[
22,
@@ -348,8 +307,6 @@ public class FieldNode {
/**
* Indicates the type of value.
*
* @relation type: number;
*/
@!APILevel[
22,
@@ -375,8 +332,6 @@ public class FieldNode {
/**
* Represents the database schema.
* You can set the schema object in options when create or open the database.
*
* @relation class Schema
*/
@!APILevel[
22,
@@ -385,8 +340,6 @@ public class FieldNode {
public class Schema {
/**
* Indicates the root json object.
*
* @relation root: FieldNode;
*/
@!APILevel[
22,
@@ -396,8 +349,6 @@ public class Schema {
/**
* Indicates the string array of json.
*
* @relation indexes: Array<string>;
*/
@!APILevel[
22,
@@ -407,8 +358,6 @@ public class Schema {
/**
* Indicates the mode of schema.
*
* @relation mode: number;
*/
@!APILevel[
22,
@@ -418,8 +367,6 @@ public class Schema {
/**
* Indicates the skip size of schema.
*
* @relation skip: number;
*/
@!APILevel[
22,
@@ -445,8 +392,6 @@ public class Schema {
/**
* Provides configuration options to create a {@code SingleKVStore} or {@code DeviceKVStore}.
*
* @relation interface Options
*/
@!APILevel[
22,
@@ -456,7 +401,6 @@ public class KVOptions {
/**
* Indicates whether to create a database when the database file does not exist
* @relation createIfMissing?: boolean
*/
@!APILevel[
22,
@@ -466,7 +410,6 @@ public class KVOptions {
/**
* Indicates whether database files to be encrypted
* @relation encrypt?: boolean
*/
@!APILevel[
22,
@@ -476,7 +419,6 @@ public class KVOptions {
/**
* Indicates whether to back up database files
* @relation backup?: boolean
*/
@!APILevel[
22,
@@ -486,7 +428,6 @@ public class KVOptions {
/**
* Indicates whether database files are automatically synchronized
* @relation autoSync?: boolean
*/
@!APILevel[
22,
@@ -497,7 +438,6 @@ public class KVOptions {
/**
* Indicates the database security level
* @relation securityLevel: SecurityLevel
*/
@!APILevel[
22,
@@ -507,7 +447,6 @@ public class KVOptions {
/**
* Indicates the database schema
* @relation schema?: Schema
*/
@!APILevel[
22,
@@ -536,8 +475,6 @@ public class KVOptions {
/**
* Provides key-value pairs stored in the distributedKVStore.
*
* @relation interface Entry
*/
@!APILevel[
22,
@@ -546,8 +483,6 @@ public class KVOptions {
public class Entry {
/**
* Indicates the key.
*
* @relation key: string;
*/
@!APILevel[
22,
@@ -557,8 +492,6 @@ public class Entry {
/**
* Indicates the value.
*
* @relation value: Value;
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.ffi.*
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.labels.*
@@ -23,8 +25,6 @@ import ohos.ffi.*
* <p>The result set is created by using the {@code getResultSet} method in the {@code SingleKVStore} or
* {@code DeviceKVStore} class. This interface also provides methods to move the data read
* position in the result set.
*
* @relation interface KVStoreResultSet
*/
@!APILevel[
22,
@@ -41,8 +41,6 @@ public class KVStoreResultSet <: RemoteDataLite {
/**
* Obtains the number of lines in a result set.
*
* @relation getCount(): number
*/
@!APILevel[
22,
+2 -4
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import ohos.labels.*
@@ -23,8 +25,6 @@ import ohos.ffi.*
* <p>This class provides a constructor used to create a {@code Query} instance, which is used to query data
* matching specified conditions in the database.
* <p>This class also provides methods to add predicates to the {@code Query} instance.
*
* @relation class Query
*/
@!APILevel[
22,
@@ -33,8 +33,6 @@ import ohos.ffi.*
public class Query <: RemoteDataLite {
/**
* A constructor used to create a Query instance.
*
* @relation constructor()
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.distributed_kv_store
import std.sync.*
@@ -39,8 +41,6 @@ class SingleKVStoreImpl {}
* This database synchronizes data to other databases in time sequence.
* The {@code SingleKVStore} database does not support
* synchronous transactions, or data search using snapshots.
*
* @relation interface SingleKVStore
*/
@!APILevel[
22,
@@ -73,7 +73,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation put(key: string, value: Uint8Array | string | number | boolean): Promise<void>
*/
@!APILevel[
22,
@@ -101,7 +100,6 @@ public open class SingleKVStore <: RemoteDataLite {
* <br>2.Incorrect parameters types.
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation putBatch(entries: Entry[]): Promise<void>
*/
@!APILevel[
22,
@@ -128,7 +126,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation delete(key: string): Promise<void>
*/
@!APILevel[
22,
@@ -155,7 +152,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation deleteBatch(keys: string[]): Promise<void>
*/
@!APILevel[
22,
@@ -182,7 +178,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 15100003 - Database corrupted.
* @throws { BusinessException } 15100004 - Not found.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation get(key: string): Promise<boolean | string | number | Uint8Array>
*/
@!APILevel[
22,
@@ -210,7 +205,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Parameter verification failed.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation backup(file:string): Promise<void>
*/
@!APILevel[
22,
@@ -234,7 +228,6 @@ public open class SingleKVStore <: RemoteDataLite {
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Parameter verification failed.
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation restore(file:string): Promise<void>
*/
@!APILevel[
22,
@@ -257,7 +250,6 @@ public open class SingleKVStore <: RemoteDataLite {
* <p>After the database transaction is started, you can submit or roll back the operation.
*
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation startTransaction(): Promise<void>
*/
@!APILevel[
22,
@@ -278,7 +270,6 @@ public open class SingleKVStore <: RemoteDataLite {
* Submits a transaction operation in the {@code SingleKVStore} database.
*
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation commit(): Promise<void>
*/
@!APILevel[
22,
@@ -298,7 +289,6 @@ public open class SingleKVStore <: RemoteDataLite {
* Rolls back a transaction operation in the {@code SingleKVStore} database.
*
* @throws { BusinessException } 15100005 - Database or result set already closed.
* @relation rollback(): Promise<void>
*/
@!APILevel[
22,
@@ -319,7 +309,6 @@ public open class SingleKVStore <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Incorrect parameters types.
* @relation enableSync(enabled: boolean): Promise<void>
*/
@!APILevel[
22,
@@ -341,7 +330,6 @@ public open class SingleKVStore <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified;
* <br>2.Incorrect parameters types.
* @relation setSyncParam(defaultAllowedDelayMs: number): Promise<void>
*/
@!APILevel[
22,
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
+2 -23
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.preferences
import ohos.ffi.*
@@ -66,8 +68,6 @@ public enum PreferencesEvent {
/**
* Provides interfaces to obtain and modify preferences data.
*
* @relation interface Preferences
*/
@!APILevel[
22,
@@ -113,8 +113,6 @@ public class Preferences <: RemoteDataLite {
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function getPreferences(context: Context, name: string, callback: AsyncCallback<Preferences>): void
*/
@!APILevel[
22,
@@ -138,8 +136,6 @@ public class Preferences <: RemoteDataLite {
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function getPreferences(context: Context, options: Options, callback: AsyncCallback<Preferences>): void
*/
@!APILevel[
22,
@@ -163,7 +159,6 @@ public class Preferences <: RemoteDataLite {
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @throws { BusinessException } 15500010 - Failed to delete the user preferences persistence file.
* @relation function deletePreferences(context: Context, name: string): Promise<void>
*/
@!APILevel[
22,
@@ -186,8 +181,6 @@ public class Preferences <: RemoteDataLite {
* @throws { BusinessException } 15501001 - The operations is supported in stage mode only.
* @throws { BusinessException } 15501002 - Invalid dataGroupId.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function deletePreferences(context: Context, options: Options): Promise<void>
*/
@!APILevel[
22,
@@ -230,7 +223,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation function removePreferencesFromCacheSync(context: Context, name: string): void
*/
@!APILevel[
22,
@@ -257,8 +249,6 @@ public class Preferences <: RemoteDataLite {
* @throws { BusinessException } 15501001 - The operations is supported in stage mode only.
* @throws { BusinessException } 15501002 - Invalid dataGroupId.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function removePreferencesFromCacheSync(context: Context, options: Options): void
*/
@!APILevel[
22,
@@ -293,7 +283,6 @@ public class Preferences <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Mandatory parameters are left unspecified.
* @throws { BusinessException } 15500000 - Inner error.
* @relation flush(): Promise<void>
*/
@!APILevel[
22,
@@ -309,7 +298,6 @@ public class Preferences <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Mandatory parameters are left unspecified.
* @throws { BusinessException } 15500000 - Inner error.
* @relation clear(): Promise<void>
*/
@!APILevel[
22,
@@ -331,7 +319,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation get(key: string, defValue: ValueType): Promise<ValueType>
*/
@!APILevel[
22,
@@ -360,7 +347,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation put(key: string, value: ValueType): Promise<void>
*/
@!APILevel[
22,
@@ -389,7 +375,6 @@ public class Preferences <: RemoteDataLite {
* @returns { HashMap<String, PreferencesValueType> } The values and keys in an HashMap.
* @throws { BusinessException } 401 - Parameter error. Mandatory parameters are left unspecified.
* @throws { BusinessException } 15500000 - Inner error.
* @relation getAllSync(): Object;
*/
@!APILevel[
22,
@@ -412,7 +397,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation delete(key: string): Promise<void>
*/
@!APILevel[
22,
@@ -442,7 +426,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation has(key: string): Promise<boolean>
*/
@!APILevel[
22,
@@ -473,8 +456,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation on(type: 'change', callback: Callback<string>): void
* @relation on(type: 'multiProcessChange', callback: Callback<string>): void
*/
@!APILevel[
@@ -518,8 +499,6 @@ public class Preferences <: RemoteDataLite {
* <br>1. Mandatory parameters are left unspecified; <br>2. Incorrect parameter types;
* <br>3. Parameter verification failed.
* @throws { BusinessException } 15500000 - Inner error.
* @relation off(type: 'change', callback?: Callback<string>): void
* @relation off(type: 'multiProcessChange', callback?: Callback<string>): void
*/
@!APILevel[
22,
+2
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.preferences
import ohos.ffi.*
+2 -15
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.preferences
import ohos.labels.*
@@ -22,7 +24,6 @@ import std.collection.*
/**
* the storage type
* @relation enum StorageType
*/
@!APILevel[
22,
@@ -31,7 +32,6 @@ import std.collection.*
public enum StorageType {
/**
* XML storage type
* @relation XML = 0
*/
@!APILevel[
22,
@@ -42,7 +42,6 @@ public enum StorageType {
/**
* GSKV storage type
* @relation GSKV
*/
@!APILevel[
22,
@@ -134,8 +133,6 @@ public enum PreferencesValueType {
/**
* The Max length of key.
*
* @relation const MAX_KEY_LENGTH: number
*/
@!APILevel[
22,
@@ -145,8 +142,6 @@ public const MAX_KEY_LENGTH: UInt32 = 1024
/**
* The Max length of value.
*
* @relation const MAX_VALUE_LENGTH: number
*/
@!APILevel[
22,
@@ -242,8 +237,6 @@ func getCJErrorCode(code: Int32): Int32 {
/**
* Manages preferences file configurations.
*
* @relation interface Options
*/
@!APILevel[
22,
@@ -252,8 +245,6 @@ func getCJErrorCode(code: Int32): Int32 {
public class PreferencesOptions {
/**
* The preferences file name.
*
* @relation name: string
*/
@!APILevel[
22,
@@ -263,8 +254,6 @@ public class PreferencesOptions {
/**
* Application Group Id.
*
* @relation dataGroupId?: string | null | undefined
*/
@!APILevel[
22,
@@ -274,8 +263,6 @@ public class PreferencesOptions {
/**
* The preferences storage type.
*
* @relation storageType?: StorageType | null | undefined;
*/
@!APILevel[
22,
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
+2 -38
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.labels.*
@@ -21,8 +23,6 @@ import ohos.business_exception.{ BusinessException, ERR_PARAMETER_ERROR }
/**
* Manages relational database configurations.
*
* @relation class RdbPredicates
*/
@!APILevel[
22,
@@ -31,8 +31,6 @@ import ohos.business_exception.{ BusinessException, ERR_PARAMETER_ERROR }
public class RdbPredicates <: RemoteDataLite {
/**
* A parameterized constructor used to create a RdbPredicates instance.
*
* @relation constructor(name: string);
*/
@!APILevel[
22,
@@ -49,8 +47,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Specifies all remote devices which connect to local device when syncing distributed database.
* When query database, this function should not be called.
*
* @relation inAllDevices(): RdbPredicates
*/
@!APILevel[
22,
@@ -67,8 +63,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Adds a left parenthesis to the RdbPredicates.
* This method is similar to ( of the SQL statement and needs to be used together with endWrap().
*
* @relation beginWrap(): RdbPredicates
*/
@!APILevel[
22,
@@ -85,8 +79,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Adds a right parenthesis to the RdbPredicates.
* This method is similar to ) of the SQL statement and needs to be used together with beginWrap().
*
* @relation endWrap(): RdbPredicates
*/
@!APILevel[
22,
@@ -103,8 +95,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Adds an or condition to the RdbPredicates.
* This method is similar to or of the SQL statement.
*
* @relation or(): RdbPredicates
*/
@!APILevel[
22,
@@ -121,8 +111,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Adds an and condition to the RdbPredicates.
* This method is similar to and of the SQL statement.
*
* @relation and(): RdbPredicates
*/
@!APILevel[
22,
@@ -143,7 +131,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation contains(field: string, value: string): RdbPredicates
*/
@!APILevel[
22,
@@ -172,7 +159,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation beginsWith(field: string, value: string): RdbPredicates
*/
@!APILevel[
22,
@@ -200,7 +186,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation endsWith(field: string, value: string): RdbPredicates
*/
@!APILevel[
22,
@@ -228,7 +213,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation isNull(field: string): RdbPredicates
*/
@!APILevel[
22,
@@ -256,7 +240,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation isNotNull(field: string): RdbPredicates
*/
@!APILevel[
22,
@@ -285,7 +268,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation like(field: string, value: string): RdbPredicates
*/
@!APILevel[
22,
@@ -314,7 +296,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation glob(field: string, value: string): RdbPredicates
*/
@!APILevel[
22,
@@ -342,7 +323,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation orderByAsc(field: string): RdbPredicates
*/
@!APILevel[
22,
@@ -370,7 +350,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation orderByDesc(field: string): RdbPredicates
*/
@!APILevel[
22,
@@ -394,8 +373,6 @@ public class RdbPredicates <: RemoteDataLite {
/**
* Restricts each row of the query result to be unique.
*
* @relation distinct(): RdbPredicates
*/
@!APILevel[
22,
@@ -415,7 +392,6 @@ public class RdbPredicates <: RemoteDataLite {
* @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}.
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation limitAs(value: number): RdbPredicates
*/
@!APILevel[
22,
@@ -435,7 +411,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation offsetAs(rowOffset: number): RdbPredicates
*/
@!APILevel[
22,
@@ -454,7 +429,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation groupBy(fields: Array<string>): RdbPredicates
*/
@!APILevel[
22,
@@ -492,7 +466,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -526,7 +499,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation equalTo(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -557,7 +529,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -589,7 +560,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation greaterThan(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -621,7 +591,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation lessThan(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -654,7 +623,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation notEqualTo(field: string, value: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -686,7 +654,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -726,7 +693,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation between(field: string, low: ValueType, high: ValueType): RdbPredicates
*/
@!APILevel[
22,
@@ -766,7 +732,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation in(field: string, value: Array<ValueType>): RdbPredicates
*/
@!APILevel[
22,
@@ -815,7 +780,6 @@ public class RdbPredicates <: RemoteDataLite {
*
* @throws { BusinessException } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @relation notIn(field: string, value: Array<ValueType>): RdbPredicates
*/
@!APILevel[
22,
+2 -17
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.ffi.*
@@ -25,8 +27,6 @@ import ohos.business_exception.{ BusinessException, ERR_PARAMETER_ERROR }
/**
* Provides methods for managing the relational database (RDB).
* This class provides methods for creating, querying, updating, and deleting RDBs.
*
* @relation interface RdbStore
*/
@!APILevel[
22,
@@ -55,7 +55,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800014 - The RdbStore or ResultSet is already closed.
* @throws { BusinessException } 14800015 - The database does not respond.
* @relation query(predicates: RdbPredicates, columns?: Array<string>): Promise<ResultSet>
*/
@!APILevel[
22,
@@ -120,7 +119,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation delete(predicates: RdbPredicates): Promise<number>;
*/
@!APILevel[
22,
@@ -160,7 +158,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation backup(destName: string): Promise<void>;
*/
@!APILevel[
22,
@@ -204,7 +201,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation restore(srcName: string): Promise<void>;
*/
@!APILevel[
22,
@@ -247,7 +243,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation commit():void
*/
@!APILevel[
22,
@@ -281,7 +276,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation rollBack():void
*/
@!APILevel[
22,
@@ -316,7 +310,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation beginTransaction():void
*/
@!APILevel[
22,
@@ -367,7 +360,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number;
*/
@!APILevel[
22,
@@ -422,7 +414,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number;
*/
@!APILevel[
22,
@@ -464,7 +455,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800031 - SQLite: TEXT or BLOB exceeds size limit.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation batchInsert(table: string, values: Array<ValuesBucket>):Promise<number>
*/
@!APILevel[
22,
@@ -519,7 +509,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800014 - The RdbStore or ResultSet is already closed.
* @throws { BusinessException } 14800015 - The database does not respond.
* @relation querySql(sql: string, bindArgs?: Array<ValueType>):Promise<ResultSet>
*/
@!APILevel[
22,
@@ -589,7 +578,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @throws { BusinessException } 14800047 - The WAL file size exceeds the default limit.
* @relation executeSql(sql: string, bindArgs?: Array<ValueType>): Promise<void>;
*/
@!APILevel[
22,
@@ -659,7 +647,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800014 - The RdbStore or ResultSet is already closed.
* @throws { BusinessException } 14800050 - Failed to obtain the subscription service.
* @relation on(event: string, interProcess: boolean, observer: Callback<void>): void
*/
@!APILevel[
22,
@@ -709,7 +696,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800014 - The RdbStore or ResultSet is already closed.
* @throws { BusinessException } 14800050 - Failed to obtain the subscription service.
* @relation off(event: string, interProcess: boolean, observer?: Callback<void>): void
*/
@!APILevel[
22,
@@ -793,7 +779,6 @@ public class RdbStore <: RemoteDataLite {
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800014 - The RdbStore or ResultSet is already closed.
* @throws { BusinessException } 14800050 - Failed to obtain the subscription service.
* @relation emit(event: string): void
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.app.ability.ui_ability.{UIAbilityContext, getStageContext}
@@ -42,8 +44,6 @@ import ohos.labels.*
* @throws { BusinessException } 14800029 - SQLite: The database is full.
* @throws { BusinessException } 14800030 - SQLite: Unable to open the database file.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function getRdbStore(context: Context, config: StoreConfig): Promise<RdbStore>;
*/
@!APILevel[
22,
@@ -74,8 +74,6 @@ public func getRdbStore(context: UIAbilityContext, config: StoreConfig): RdbStor
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800010 - Failed to open or delete the database by an invalid database path.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function deleteRdbStore(context: Context, name: string): Promise<void>;
*/
@!APILevel[
22,
@@ -106,8 +104,6 @@ public func deleteRdbStore(context: UIAbilityContext, name: String): Unit {
* @throws { BusinessException } 14801001 - The operation is supported in the stage model only.
* @throws { BusinessException } 14801002 - Invalid data group ID.
* @throws { IllegalArgumentException } - The context is invalid.
*
* @relation function deleteRdbStore(context: Context, config: StoreConfig): Promise<void>;
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.ffi.*
@@ -26,19 +28,16 @@ let RELATIONAL_STORE_LOG = HilogChannel(0, 0xD001650, "CJ-Relational_Store")
/**
* Indicates several assets in one column
* @relation type Assets = Asset[]
*/
public type Assets = Array<Asset>
/**
* Values in buckets are stored in key-value pairs
* @relation type ValuesBucket = Record<string, ValueType>
*/
public type ValuesBucket = Map<String, RelationalStoreValueType>
/**
* Specifies the cryptographic parameters used when opening an encrypted database.
* @relation interface CryptoParam
*/
@!APILevel[
22,
@@ -48,7 +47,6 @@ public class CryptoParam {
/**
* Specifies the key used when opening an encrypted database.
* When finished passing the key to the database, its content should be set to all-zero.
* @relation encryptionKey: Uint8Array;
*/
@!APILevel[
22,
@@ -60,7 +58,6 @@ public class CryptoParam {
* Specifies the number of KDF iterations used when opening an encrypted database.
* Default number is 10000.
* When the number is set to 0, use default iteration number and encryption algorithm.
* @relation iterationCount?: number;
*/
@!APILevel[
22,
@@ -71,7 +68,6 @@ public class CryptoParam {
/**
* Specifies the encryption algorithm when opening an encrypted database.
* Default encryption algorithm is AES_256_GCM.
* @relation encryptionAlgo?: EncryptionAlgo;
*/
@!APILevel[
22,
@@ -82,7 +78,6 @@ public class CryptoParam {
/**
* Specifies the HMAC algorithm when opening an encrypted database.
* Default HMAC algorithm is SHA256.
* @relation hmacAlgo?: HmacAlgo;
*/
@!APILevel[
22,
@@ -93,7 +88,6 @@ public class CryptoParam {
/**
* Specifies the KDF algorithm when opening an encrypted database.
* Default KDF SHA algorithm is the same as HMAC algorithm.
* @relation kdfAlgo?: KdfAlgo;
*/
@!APILevel[
22,
@@ -104,7 +98,6 @@ public class CryptoParam {
/**
* Specifies the page size used when opening an encrypted database.
* Default crypto page size is 1024.
* @relation cryptoPageSize?: number;
*/
@!APILevel[
22,
@@ -134,7 +127,6 @@ public class CryptoParam {
/**
* Enumerates the supported KDF algorithm when opening a database.
* @relation enum KdfAlgo
*/
@!APILevel[
22,
@@ -143,7 +135,6 @@ public class CryptoParam {
public enum KdfAlgo {
/**
* KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm.
* @relation KDF_SHA1 = 0
*/
@!APILevel[
22,
@@ -153,7 +144,6 @@ public enum KdfAlgo {
|
/**
* PBKDF2_HMAC_SHA256 algorithm.
* @relation KDF_SHA256
*/
@!APILevel[
22,
@@ -163,7 +153,6 @@ public enum KdfAlgo {
|
/**
* PBKDF2_HMAC_SHA512 algorithm.
* @relation KDF_SHA512
*/
@!APILevel[
22,
@@ -175,7 +164,6 @@ public enum KdfAlgo {
/**
* Enumerates the supported HMAC algorithm when opening a database.
* @relation enum HmacAlgo
*/
@!APILevel[
22,
@@ -184,7 +172,6 @@ public enum KdfAlgo {
public enum HmacAlgo {
/**
* HMAC_SHA1 algorithm.
* @relation SHA1 = 0
*/
@!APILevel[
22,
@@ -194,7 +181,6 @@ public enum HmacAlgo {
|
/**
* HMAC_SHA256 algorithm.
* @relation SHA256
*/
@!APILevel[
22,
@@ -204,7 +190,6 @@ public enum HmacAlgo {
|
/**
* HMAC_SHA512 algorithm.
* @relation SHA512
*/
@!APILevel[
22,
@@ -216,7 +201,6 @@ public enum HmacAlgo {
/**
* Enumerates the supported encryption algorithm when opening a database.
* @relation enum EncryptionAlgo
*/
@!APILevel[
22,
@@ -225,7 +209,6 @@ public enum HmacAlgo {
public enum EncryptionAlgo {
/**
* Database is encrypted using AES_256_GCM.
* @relation AES_256_GCM = 0
*/
@!APILevel[
22,
@@ -235,7 +218,6 @@ public enum EncryptionAlgo {
|
/**
* Database is encrypted using AES_256_CBC.
* @relation AES_256_CBC
*/
@!APILevel[
22,
@@ -247,7 +229,6 @@ public enum EncryptionAlgo {
/**
* Enumerates the supported tokenizer when opening a database.
* @relation enum Tokenizer
*/
@!APILevel[
22,
@@ -256,7 +237,6 @@ public enum EncryptionAlgo {
public enum Tokenizer {
/**
* not use tokenizer.
* @relation NONE_TOKENIZER = 0
*/
@!APILevel[
22,
@@ -266,7 +246,6 @@ public enum Tokenizer {
|
/**
* native icu tokenizer.
* @relation ICU_TOKENIZER
*/
@!APILevel[
22,
@@ -276,7 +255,6 @@ public enum Tokenizer {
|
/**
* self-developed enhance tokenizer.
* @relation CUSTOM_TOKENIZER
*/
@!APILevel[
22,
@@ -297,8 +275,6 @@ public enum Tokenizer {
/**
* Describes the {@code RdbStore} type.
*
* @relation enum SecurityLevel
*/
@!APILevel[
22,
@@ -308,8 +284,6 @@ public enum RelationalStoreSecurityLevel {
/**
* S1: means the db is low level security
* There are some low impact, when the data is leaked.
*
* @relation S1 = 1,
*/
@!APILevel[
22,
@@ -320,8 +294,6 @@ public enum RelationalStoreSecurityLevel {
/**
* S2: means the db is middle level security
* There are some major impact, when the data is leaked.
*
* @relation S2 = 2,
*/
@!APILevel[
22,
@@ -332,8 +304,6 @@ public enum RelationalStoreSecurityLevel {
/**
* S3: means the db is high level security
* There are some severity impact, when the data is leaked.
*
* @relation S3 = 3,
*/
@!APILevel[
22,
@@ -344,8 +314,6 @@ public enum RelationalStoreSecurityLevel {
/**
* S4: means the db is critical level security
* There are some critical impact, when the data is leaked.
*
* @relation S4 = 4
*/
@!APILevel[
22,
@@ -367,8 +335,6 @@ public enum RelationalStoreSecurityLevel {
/**
* Describes the change type.
*
* @relation enum ChangeType
*/
@!APILevel[
22,
@@ -377,8 +343,6 @@ public enum RelationalStoreSecurityLevel {
public enum ChangeType {
/**
* Means the change type is data change.
*
* @relation DATA_CHANGE,
*/
@!APILevel[
22,
@@ -388,8 +352,6 @@ public enum ChangeType {
|
/**
* Means the change type is asset change.
*
* @relation ASSET_CHANGE
*/
@!APILevel[
22,
@@ -417,8 +379,6 @@ public enum ChangeType {
/**
* Manages relational database configurations.
*
* @relation interface StoreConfig
*/
@!APILevel[
22,
@@ -427,7 +387,6 @@ public enum ChangeType {
public class StoreConfig {
/**
* The database name.
* @relation name: string;
*/
@!APILevel[
22,
@@ -437,7 +396,6 @@ public class StoreConfig {
/**
* Specifies the security level of the database.
* @relation securityLevel: SecurityLevel;
*/
@!APILevel[
22,
@@ -447,7 +405,6 @@ public class StoreConfig {
/**
* Specifies whether the database is encrypted.
* @relation encrypt?: boolean;
*/
@!APILevel[
22,
@@ -457,7 +414,6 @@ public class StoreConfig {
/**
* The data group id of application.
* @relation dataGroupId?: string;
*/
@!APILevel[
22,
@@ -467,7 +423,6 @@ public class StoreConfig {
/**
* Specifies the directory relative to the database directory obtained from context.
* @relation customDir?: string;
*/
@!APILevel[
22,
@@ -477,7 +432,6 @@ public class StoreConfig {
/**
* Specifies the root directory relative to the database
* @relation rootDir?: string;
*/
@!APILevel[
22,
@@ -488,7 +442,6 @@ public class StoreConfig {
/**
* Specifies whether to clean up dirty data that is synchronized to
* the local but deleted in the cloud.
* @relation autoCleanDirtyData?: boolean;
*/
@!APILevel[
22,
@@ -498,7 +451,6 @@ public class StoreConfig {
/**
* Specifies whether database allows rebuild.
* @relation allowRebuild?: boolean;
*/
@!APILevel[
22,
@@ -509,7 +461,6 @@ public class StoreConfig {
/**
* Specifies whether the database opened is read-only.
* If isReadOnly is true, other configuration items will become invalid.
* @relation isReadOnly?: boolean;
*/
@!APILevel[
22,
@@ -519,7 +470,6 @@ public class StoreConfig {
/**
* Indicates the names of the shared library containing fts etc.
* @relation pluginLibs?: Array<string>;
*/
@!APILevel[
22,
@@ -529,7 +479,6 @@ public class StoreConfig {
/**
* Specifies the cryptographic parameters used when opening an encrypted database.
* @relation cryptoParam?: CryptoParam;
*/
@!APILevel[
22,
@@ -539,7 +488,6 @@ public class StoreConfig {
/**
* Specifies whether the vector type is supported.
* @relation vector?: boolean;
*/
@!APILevel[
22,
@@ -549,7 +497,6 @@ public class StoreConfig {
/**
* Specifies the tokenizer type when using fts capability.
* @relation tokenizer?: Tokenizer;
*/
@!APILevel[
22,
@@ -559,7 +506,6 @@ public class StoreConfig {
/**
* Specifies whether the database need persistence.
* @relation persist?: boolean;
*/
@!APILevel[
22,
@@ -569,7 +515,6 @@ public class StoreConfig {
/**
* Specifies whether the database enable the capabilities for semantic indexing processing.
* @relation enableSemanticIndex?: boolean;
*/
@!APILevel[
22,
@@ -613,8 +558,6 @@ public class StoreConfig {
/**
* Describes the status of asset
*
* @relation enum AssetStatus
*/
@!APILevel[
22,
@@ -623,8 +566,6 @@ public class StoreConfig {
public enum AssetStatus {
/**
* ASSET_NORMAL: means the status of asset is normal.
*
* @relation ASSET_NORMAL,
*/
@!APILevel[
22,
@@ -634,8 +575,6 @@ public enum AssetStatus {
|
/**
* ASSET_INSERT: means the asset needs to be inserted.
*
* @relation ASSET_INSERT,
*/
@!APILevel[
22,
@@ -645,8 +584,6 @@ public enum AssetStatus {
|
/**
* ASSET_UPDATE: means the asset needs to be updated.
*
* @relation ASSET_UPDATE,
*/
@!APILevel[
22,
@@ -656,8 +593,6 @@ public enum AssetStatus {
|
/**
* ASSET_DELETE: means the asset needs to be deleted.
*
* @relation ASSET_DELETE,
*/
@!APILevel[
22,
@@ -667,8 +602,6 @@ public enum AssetStatus {
|
/**
* ASSET_ABNORMAL: means the status of asset is abnormal.
*
* @relation ASSET_ABNORMAL,
*/
@!APILevel[
22,
@@ -678,8 +611,6 @@ public enum AssetStatus {
|
/**
* ASSET_DOWNLOADING: means the status of asset is downloading.
*
* @relation ASSET_DOWNLOADING
*/
@!APILevel[
22,
@@ -715,8 +646,6 @@ public enum AssetStatus {
/**
* Enumerates the field.
*
* @relation enum Field
*/
@!APILevel[
22,
@@ -725,8 +654,6 @@ public enum AssetStatus {
public enum Field {
/**
* Cursor field.
*
* @relation CURSOR_FIELD = '#_cursor',
*/
@!APILevel[
22,
@@ -736,8 +663,6 @@ public enum Field {
|
/**
* Origin field. For details, see {@link Origin}.
*
* @relation ORIGIN_FIELD = '#_origin',
*/
@!APILevel[
22,
@@ -748,8 +673,6 @@ public enum Field {
/**
* Deleted flag field.
* Indicates whether data has deleted in cloud.
*
* @relation DELETED_FLAG_FIELD = '#_deleted_flag',
*/
@!APILevel[
22,
@@ -759,8 +682,6 @@ public enum Field {
|
/**
* Owner field.
*
* @relation OWNER_FIELD = '#_cloud_owner',
*/
@!APILevel[
22,
@@ -770,8 +691,6 @@ public enum Field {
|
/**
* Privilege field.
*
* @relation PRIVILEGE_FIELD = '#_cloud_privilege',
*/
@!APILevel[
22,
@@ -781,8 +700,6 @@ public enum Field {
|
/**
* Sharing resource field.
*
* @relation SHARING_RESOURCE_FIELD = '#_sharing_resource_field'
*/
@!APILevel[
22,
@@ -806,8 +723,6 @@ public enum Field {
/**
* Describes the conflict resolutions to insert data into the table.
*
* @relation enum ConflictResolution
*/
@!APILevel[
22,
@@ -816,8 +731,6 @@ public enum Field {
public enum ConflictResolution {
/**
* Implements no action when conflict occurs.
*
* @relation ON_CONFLICT_NONE = 0,
*/
@!APILevel[
22,
@@ -827,8 +740,6 @@ public enum ConflictResolution {
|
/**
* Implements rollback operation when conflict occurs.
*
* @relation ON_CONFLICT_ROLLBACK = 1,
*/
@!APILevel[
22,
@@ -838,8 +749,6 @@ public enum ConflictResolution {
|
/**
* Implements abort operation when conflict occurs.
*
* @relation ON_CONFLICT_ABORT = 2,
*/
@!APILevel[
22,
@@ -849,8 +758,6 @@ public enum ConflictResolution {
|
/**
* Implements fail operation when conflict occurs.
*
* @relation ON_CONFLICT_FAIL = 3,
*/
@!APILevel[
22,
@@ -860,8 +767,6 @@ public enum ConflictResolution {
|
/**
* Implements ignore operation when conflict occurs.
*
* @relation ON_CONFLICT_IGNORE = 4,
*/
@!APILevel[
22,
@@ -871,8 +776,6 @@ public enum ConflictResolution {
|
/**
* Implements replace operation operator when conflict occurs.
*
* @relation ON_CONFLICT_REPLACE = 5
*/
@!APILevel[
22,
@@ -896,8 +799,6 @@ public enum ConflictResolution {
/**
* Records information of the asset.
*
* @relation interface Asset
*/
@!APILevel[
22,
@@ -906,8 +807,6 @@ public enum ConflictResolution {
public class Asset {
/**
* The name of asset.
*
* @relation name: string;
*/
@!APILevel[
22,
@@ -917,8 +816,6 @@ public class Asset {
/**
* The uri of asset.
*
* @relation uri: string;
*/
@!APILevel[
22,
@@ -928,8 +825,6 @@ public class Asset {
/**
* The path of asset.
*
* @relation path: string;
*/
@!APILevel[
22,
@@ -939,8 +834,6 @@ public class Asset {
/**
* The create time of asset.
*
* @relation createTime: string;
*/
@!APILevel[
22,
@@ -950,8 +843,6 @@ public class Asset {
/**
* The modify time of asset.
*
* @relation modifyTime: string;
*/
@!APILevel[
22,
@@ -961,8 +852,6 @@ public class Asset {
/**
* The size of asset.
*
* @relation size: string;
*/
@!APILevel[
22,
@@ -972,8 +861,6 @@ public class Asset {
/**
* The status of asset.
*
* @relation status?: AssetStatus;
*/
@!APILevel[
22,
@@ -1003,8 +890,6 @@ public class Asset {
/**
* Indicates possible value types.
*
* @relation type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint;
*/
@!APILevel[
22,
@@ -1101,8 +986,6 @@ enum DataPosition {
/**
* Describes the distribution type of the tables.
*
* @relation enum DistributedType
*/
@!APILevel[
22,
@@ -1111,8 +994,6 @@ enum DataPosition {
public enum DistributedType {
/**
* Indicates the table is distributed among the devices.
*
* @relation DISTRIBUTED_DEVICE,
*/
@!APILevel[
22,
@@ -1122,8 +1003,6 @@ public enum DistributedType {
|
/**
* Indicates the table is distributed between the cloud and the devices.
*
* @relation DISTRIBUTED_CLOUD
*/
@!APILevel[
22,
@@ -1143,8 +1022,6 @@ public enum DistributedType {
/**
* Indicates the database synchronization mode.
*
* @relation enum SyncMode
*/
@!APILevel[
22,
@@ -1153,8 +1030,6 @@ public enum DistributedType {
public enum SyncMode {
/**
* Indicates the data is pushed to remote device from local device.
*
* @relation SYNC_MODE_PUSH = 0,
*/
@!APILevel[
22,
@@ -1164,8 +1039,6 @@ public enum SyncMode {
|
/**
* Indicates the data is pulled from remote device to local device.
*
* @relation SYNC_MODE_PULL = 1,
*/
@!APILevel[
22,
@@ -1175,8 +1048,6 @@ public enum SyncMode {
|
/**
* Indicates the data is pulled from remote device to local device.
*
* @relation SYNC_MODE_TIME_FIRST,
*/
@!APILevel[
22,
@@ -1186,8 +1057,6 @@ public enum SyncMode {
|
/**
* Indicates force push the native data to the cloud.
*
* @relation SYNC_MODE_NATIVE_FIRST,
*/
@!APILevel[
22,
@@ -1197,8 +1066,6 @@ public enum SyncMode {
|
/**
* Indicates the data is pulled from cloud to local device.
*
* @relation SYNC_MODE_CLOUD_FIRST
*/
@!APILevel[
22,
@@ -1221,8 +1088,6 @@ public enum SyncMode {
/**
* The cloud sync progress.
*
* @relation enum Progress
*/
@!APILevel[
22,
@@ -1231,8 +1096,6 @@ public enum SyncMode {
public enum Progress {
/**
* ISYNC_BEGIN: means the sync process begin.
*
* @relation SYNC_BEGIN,
*/
@!APILevel[
22,
@@ -1242,8 +1105,6 @@ public enum Progress {
|
/**
* SYNC_BEGIN: means the sync process is in progress.
*
* @relation SYNC_IN_PROGRESS,
*/
@!APILevel[
22,
@@ -1253,8 +1114,6 @@ public enum Progress {
|
/**
* SYNC_BEGIN: means the sync process is finished.
*
* @relation SYNC_FINISH
*/
@!APILevel[
22,
@@ -1284,8 +1143,6 @@ public enum Progress {
/**
* Describes the subscription type.
*
* @relation enum SubscribeType
*/
@!APILevel[
22,
@@ -1294,8 +1151,6 @@ public enum Progress {
public enum SubscribeType {
/**
* Subscription to remote data changes.
*
* @relation SUBSCRIBE_TYPE_REMOTE = 0,
*/
@!APILevel[
22,
@@ -1305,8 +1160,6 @@ public enum SubscribeType {
|
/**
* Subscription to cloud data changes.
*
* @relation SUBSCRIBE_TYPE_CLOUD,
*/
@!APILevel[
22,
@@ -1316,8 +1169,6 @@ public enum SubscribeType {
|
/**
* Subscription to cloud data changes details.
*
* @relation SUBSCRIBE_TYPE_CLOUD_DETAILS,
*/
@!APILevel[
22,
@@ -1338,8 +1189,6 @@ public enum SubscribeType {
/**
* Describes the data origin sources.
*
* @relation enum Origin
*/
@!APILevel[
22,
@@ -1348,8 +1197,6 @@ public enum SubscribeType {
public enum Origin {
/**
* Indicates the data source is local.
*
* @relation LOCAL,
*/
@!APILevel[
22,
@@ -1359,8 +1206,6 @@ public enum Origin {
|
/**
* Indicates the data source is cloud.
*
* @relation CLOUD,
*/
@!APILevel[
22,
@@ -1370,8 +1215,6 @@ public enum Origin {
|
/**
* Indicates the data source is remote.
*
* @relation REMOTE,
*/
@!APILevel[
22,
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.ffi.*
+2 -42
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.relational_store
import ohos.labels.*
@@ -22,8 +24,6 @@ import ohos.business_exception.{ BusinessException, ERR_PARAMETER_ERROR }
/**
* Provides methods for accessing a database result set generated by querying the database.
*
* @relation interface ResultSet
*/
@!APILevel[
22,
@@ -42,8 +42,6 @@ public class ResultSet <: RemoteDataLite {
* Obtains the names of all columns in a result set.
* The column names are returned as a string array, in which the strings are in the same order
* as the columns in the result set.
*
* @relation columnNames: Array<string>;
*/
@!APILevel[
22,
@@ -74,8 +72,6 @@ public class ResultSet <: RemoteDataLite {
* Obtains the number of columns in the result set.
* The returned number is equal to the length of the string array returned by the
* columnNames method.
*
* @relation columnCount: number;
*/
@!APILevel[
22,
@@ -94,8 +90,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Obtains the number of rows in the result set.
*
* @relation rowCount: number;
*/
@!APILevel[
22,
@@ -115,8 +109,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Obtains the current index of the result set.
* The result set index starts from 0.
*
* @relation rowIndex: number;
*/
@!APILevel[
22,
@@ -135,8 +127,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Checks whether the cursor is positioned at the first row.
*
* @relation isAtFirstRow: boolean;
*/
@!APILevel[
22,
@@ -155,8 +145,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Checks whether the cursor is positioned at the last row.
*
* @relation isAtLastRow: boolean;
*/
@!APILevel[
22,
@@ -175,8 +163,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Checks whether the cursor is positioned after the last row.
*
* @relation isEnded: boolean;
*/
@!APILevel[
22,
@@ -195,8 +181,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Checks whether the cursor is positioned before the first row.
*
* @relation isStarted: boolean;
*/
@!APILevel[
22,
@@ -216,8 +200,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Checks whether the current result set is closed.
* If the result set is closed by calling the close method, true will be returned.
*
* @relation isClosed: boolean;
*/
@!APILevel[
22,
@@ -261,7 +243,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getDouble(columnIndex: number): number
*/
@!APILevel[
22,
@@ -278,8 +259,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Go to the specified row of the result set.
*
* @relation goToRow(position: number): boolean
*/
@!APILevel[
22,
@@ -295,8 +274,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Go to the previous row of the result set.
*
* @relation goToPreviousRow(): boolean
*/
@!APILevel[
22,
@@ -333,7 +310,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation goToLastRow(): boolean
*/
@!APILevel[
22,
@@ -373,7 +349,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getColumnName(columnIndex: number): string
*/
@!APILevel[
22,
@@ -419,7 +394,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation isColumnNull(columnIndex: number): boolean
*/
@!APILevel[
22,
@@ -461,7 +435,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getAsset(columnIndex: number): Asset
*/
@!APILevel[
22,
@@ -495,7 +468,6 @@ public class ResultSet <: RemoteDataLite {
*
* @throws { BusinessException } 14800000 - Inner error.
* @throws { BusinessException } 14800012 - ResultSet is empty or pointer index is out of bounds.
* @relation close(): void
*/
@!APILevel[
22,
@@ -532,7 +504,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getColumnIndex(columnName: string): number
*/
@!APILevel[
22,
@@ -583,7 +554,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getString(columnIndex: number): string
*/
@!APILevel[
22,
@@ -602,8 +572,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Go to the first row of the result set.
*
* @relation goToFirstRow(): boolean
*/
@!APILevel[
22,
@@ -645,7 +613,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getAssets(columnIndex: number): Assets
*/
@!APILevel[
22,
@@ -706,7 +673,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getLong(columnIndex: number): number
*/
@!APILevel[
22,
@@ -723,8 +689,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Go to the next row of the result set.
*
* @relation goToNextRow(): boolean
*/
@!APILevel[
22,
@@ -765,7 +729,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getBlob(columnIndex: number): Uint8Array
*/
@!APILevel[
22,
@@ -793,8 +756,6 @@ public class ResultSet <: RemoteDataLite {
/**
* Go to the specified row of the result set forwards or backwards by an offset relative to its current position.
* A positive offset indicates moving backwards, and a negative offset indicates moving forwards.
*
* @relation goTo(offset: number): boolean
*/
@!APILevel[
22,
@@ -833,7 +794,6 @@ public class ResultSet <: RemoteDataLite {
* @throws { BusinessException } 14800032 - SQLite: Abort due to constraint violation.
* @throws { BusinessException } 14800033 - SQLite: Data type mismatch.
* @throws { BusinessException } 14800034 - SQLite: Library used incorrectly.
* @relation getRow(): ValuesBucket
*/
@!APILevel[
22,
+2
View File
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
import("//build/ohos.gni")
import("//build/templates/cangjie/cjc.gni")
+2 -1
View File
@@ -13,6 +13,8 @@
* limitations under the License.
*/
// The Cangjie API is in Beta. For details on its capabilities and limitations, please refer to the README file.
package ohos.data.values_bucket
import ohos.ffi.CTypeResource
@@ -20,7 +22,6 @@ import ohos.labels.APILevel
/**
* Indicates possible value types
* @relation export type ValueType = number | string | boolean;
*/
@!APILevel[
22,
@@ -15,9 +15,9 @@
package ohos_app_cangjie_entry
import AbilityKit.Ability
import AbilityKit.AbilityStage
import AbilityKit.AbilityStage
import kit.AbilityKit.Ability
import kit.AbilityKit.AbilityStage
import kit.AbilityKit.AbilityStage
class MyAbilityStage <: AbilityStage {
public func onCreate(): Unit {
@@ -17,7 +17,7 @@ package ohos_app_cangjie_entry
import ohos.arkui.state_management.AppStorage
import ohos.window.WindowStage
import AbilityKit.*
import kit.AbilityKit.*
class MainAbility <: UIAbility {
@@ -15,8 +15,8 @@
package ohos_app_cangjie_entry
import AbilityKit.*
import TestKit.*
import kit.AbilityKit.*
import kit.TestKit.*
import ohos.hilog.Hilog
import ohos.app.ability.ability_delegator_registry.*
import std.unittest.XmlReporter
@@ -33,7 +33,7 @@ import std.unittest.TestClass
import std.collection.HashSet
import std.collection.ArrayList
import std.unittest.TestSuite
import AbilityKit.Want
import kit.AbilityKit.Want
import std.process.Process
import ohos.arkui.component.Line
import std.unittest.common.Configuration
@@ -50,20 +50,20 @@ import ohos.file.fs.FileIo as FileFs
import std.unittest.testmacro.*
import std.unittest.*
import std.unittest.common.*
import AbilityKit.AbilityStageContext
import kit.AbilityKit.AbilityStageContext
import ohos.bundle.bundle_manager.BundleInfo
import AbilityKit.UIAbilityContext
import AbilityKit.Permissions
import AbilityKit.AbilityAccessCtrl
import AbilityKit.GrantStatus
import kit.AbilityKit.UIAbilityContext
import kit.AbilityKit.Permissions
import kit.AbilityKit.AbilityAccessCtrl
import kit.AbilityKit.GrantStatus
import std.collection.collectArray
import ohos.resource_manager.ResourceManager
import AbilityKit.ApplicationContext
import kit.AbilityKit.ApplicationContext
import std.collection.enumerate
import std.io.ByteBuffer
import stdx.encoding.json.stream.JsonWriter
import std.collection.filterMap
import PerformanceAnalysisKit.Hilog
import kit.PerformanceAnalysisKit.Hilog
foreign func __gcov_dump(): Unit
@@ -15,12 +15,12 @@
package ohos_app_cangjie_entry
internal import PerformanceAnalysisKit.*
internal import kit.PerformanceAnalysisKit.*
internal import ohos.base.*
internal import std.collection.*
import std.unittest.testmacro.*
import ArkData.*
import kit.ArkData.*
import ohos.data.distributed_kv_store.Entry as KVEntry
import std.runtime.*
@@ -15,7 +15,7 @@
package ohos_app_cangjie_entry
internal import PerformanceAnalysisKit.*
internal import kit.PerformanceAnalysisKit.*
internal import ohos.base.*
internal import std.collection.*
import std.unittest.testmacro.*
@@ -15,9 +15,9 @@
package ohos_app_cangjie_entry
import AbilityKit.Ability
import AbilityKit.AbilityStage
import AbilityKit.AbilityStage
import kit.AbilityKit.Ability
import kit.AbilityKit.AbilityStage
import kit.AbilityKit.AbilityStage
class MyAbilityStage <: AbilityStage {
public func onCreate(): Unit {
@@ -17,7 +17,7 @@ package ohos_app_cangjie_entry
import ohos.arkui.state_management.AppStorage
import ohos.window.WindowStage
import AbilityKit.*
import kit.AbilityKit.*
class MainAbility <: UIAbility {
@@ -15,8 +15,8 @@
package ohos_app_cangjie_entry
import AbilityKit.*
import TestKit.*
import kit.AbilityKit.*
import kit.TestKit.*
import ohos.hilog.Hilog
import ohos.app.ability.ability_delegator_registry.*
import std.unittest.XmlReporter
@@ -33,7 +33,7 @@ import std.unittest.TestClass
import std.collection.HashSet
import std.collection.ArrayList
import std.unittest.TestSuite
import AbilityKit.Want
import kit.AbilityKit.Want
import std.process.Process
import ohos.arkui.component.Line
import std.unittest.common.Configuration
@@ -50,20 +50,20 @@ import ohos.file.fs.FileIo as FileFs
import std.unittest.testmacro.*
import std.unittest.*
import std.unittest.common.*
import AbilityKit.AbilityStageContext
import kit.AbilityKit.AbilityStageContext
import ohos.bundle.bundle_manager.BundleInfo
import AbilityKit.UIAbilityContext
import AbilityKit.Permissions
import AbilityKit.AbilityAccessCtrl
import AbilityKit.GrantStatus
import kit.AbilityKit.UIAbilityContext
import kit.AbilityKit.Permissions
import kit.AbilityKit.AbilityAccessCtrl
import kit.AbilityKit.GrantStatus
import std.collection.collectArray
import ohos.resource_manager.ResourceManager
import AbilityKit.ApplicationContext
import kit.AbilityKit.ApplicationContext
import std.collection.enumerate
import std.io.ByteBuffer
import stdx.encoding.json.stream.JsonWriter
import std.collection.filterMap
import PerformanceAnalysisKit.Hilog
import kit.PerformanceAnalysisKit.Hilog
foreign func __gcov_dump(): Unit
@@ -15,9 +15,9 @@
package ohos_app_cangjie_entry
import AbilityKit.Ability
import AbilityKit.AbilityStage
import AbilityKit.AbilityStage
import kit.AbilityKit.Ability
import kit.AbilityKit.AbilityStage
import kit.AbilityKit.AbilityStage
class MyAbilityStage <: AbilityStage {
public func onCreate(): Unit {
@@ -17,7 +17,7 @@ package ohos_app_cangjie_entry
import ohos.arkui.state_management.AppStorage
import ohos.window.WindowStage
import AbilityKit.*
import kit.AbilityKit.*
class MainAbility <: UIAbility {
@@ -15,8 +15,8 @@
package ohos_app_cangjie_entry
import AbilityKit.*
import TestKit.*
import kit.AbilityKit.*
import kit.TestKit.*
import ohos.hilog.Hilog
import ohos.app.ability.ability_delegator_registry.*
import std.unittest.XmlReporter
@@ -33,7 +33,7 @@ import std.unittest.TestClass
import std.collection.HashSet
import std.collection.ArrayList
import std.unittest.TestSuite
import AbilityKit.Want
import kit.AbilityKit.Want
import std.process.Process
import ohos.arkui.component.Line
import std.unittest.common.Configuration
@@ -50,20 +50,20 @@ import ohos.file.fs.FileIo as FileFs
import std.unittest.testmacro.*
import std.unittest.*
import std.unittest.common.*
import AbilityKit.AbilityStageContext
import kit.AbilityKit.AbilityStageContext
import ohos.bundle.bundle_manager.BundleInfo
import AbilityKit.UIAbilityContext
import AbilityKit.Permissions
import AbilityKit.AbilityAccessCtrl
import AbilityKit.GrantStatus
import kit.AbilityKit.UIAbilityContext
import kit.AbilityKit.Permissions
import kit.AbilityKit.AbilityAccessCtrl
import kit.AbilityKit.GrantStatus
import std.collection.collectArray
import ohos.resource_manager.ResourceManager
import AbilityKit.ApplicationContext
import kit.AbilityKit.ApplicationContext
import std.collection.enumerate
import std.io.ByteBuffer
import stdx.encoding.json.stream.JsonWriter
import std.collection.filterMap
import PerformanceAnalysisKit.Hilog
import kit.PerformanceAnalysisKit.Hilog
foreign func __gcov_dump(): Unit
@@ -15,9 +15,9 @@
package ohos_app_cangjie_entry
import AbilityKit.Ability
import AbilityKit.AbilityStage
import AbilityKit.AbilityStage
import kit.AbilityKit.Ability
import kit.AbilityKit.AbilityStage
import kit.AbilityKit.AbilityStage
class MyAbilityStage <: AbilityStage {
public func onCreate(): Unit {
@@ -17,7 +17,7 @@ package ohos_app_cangjie_entry
import ohos.arkui.state_management.AppStorage
import ohos.window.WindowStage
import AbilityKit.*
import kit.AbilityKit.*
class MainAbility <: UIAbility {
@@ -15,8 +15,8 @@
package ohos_app_cangjie_entry
import AbilityKit.*
import TestKit.*
import kit.AbilityKit.*
import kit.TestKit.*
import ohos.hilog.Hilog
import ohos.app.ability.ability_delegator_registry.*
import std.unittest.XmlReporter
@@ -33,7 +33,7 @@ import std.unittest.TestClass
import std.collection.HashSet
import std.collection.ArrayList
import std.unittest.TestSuite
import AbilityKit.Want
import kit.AbilityKit.Want
import std.process.Process
import ohos.arkui.component.Line
import std.unittest.common.Configuration
@@ -50,20 +50,20 @@ import ohos.file.fs.FileIo as FileFs
import std.unittest.testmacro.*
import std.unittest.*
import std.unittest.common.*
import AbilityKit.AbilityStageContext
import kit.AbilityKit.AbilityStageContext
import ohos.bundle.bundle_manager.BundleInfo
import AbilityKit.UIAbilityContext
import AbilityKit.Permissions
import AbilityKit.AbilityAccessCtrl
import AbilityKit.GrantStatus
import kit.AbilityKit.UIAbilityContext
import kit.AbilityKit.Permissions
import kit.AbilityKit.AbilityAccessCtrl
import kit.AbilityKit.GrantStatus
import std.collection.collectArray
import ohos.resource_manager.ResourceManager
import AbilityKit.ApplicationContext
import kit.AbilityKit.ApplicationContext
import std.collection.enumerate
import std.io.ByteBuffer
import stdx.encoding.json.stream.JsonWriter
import std.collection.filterMap
import PerformanceAnalysisKit.Hilog
import kit.PerformanceAnalysisKit.Hilog
foreign func __gcov_dump(): Unit