From 0b0c39a50e5859b0af8aec31a66796447b1d0213 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Fri, 25 Nov 2022 18:30:30 +0800 Subject: [PATCH 1/2] API specification Signed-off-by: duanweiling --- api/@ohos.data.storage.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts index 37be8a4c2d..d0bfc2b9d5 100644 --- a/api/@ohos.data.storage.d.ts +++ b/api/@ohos.data.storage.d.ts @@ -21,6 +21,7 @@ import { AsyncCallback, Callback } from './basic'; * @name storage * @since 6 * @deprecated since 9 + * @useinstead ohos.preferences.preferences * @syscap SystemCapability.DistributedDataManager.Preferences.Core * */ @@ -32,7 +33,7 @@ declare namespace storage { * resides in the memory. You can use removeStorageFromCache to remove the instance from the memory. * * @param path Indicates the path of storage file stored. - * @return Returns the {@link Storage} instance matching the specified storage file name. + * @returns Returns the {@link Storage} instance matching the specified storage file name. * @throws BusinessError if invoked failed * @since 6 * @deprecated since 9 @@ -92,6 +93,7 @@ declare namespace storage { * * @since 6 * @deprecated since 9 + * @useinstead ohos.preferences.preferences */ interface Storage { /** @@ -101,7 +103,7 @@ declare namespace storage { * * @param key Indicates the key of the storage. It cannot be {@code null} or empty. * @param defValue Indicates the default value to return. - * @return Returns the value matching the specified key if it is found; returns the default value otherwise. + * @returns Returns the value matching the specified key if it is found; returns the default value otherwise. * @throws BusinessError if invoked failed * @since 6 * @deprecated since 9 @@ -115,7 +117,7 @@ declare namespace storage { * Checks whether the {@link Storage} object contains a storage matching a specified key. * * @param key Indicates the key of the storage to check for. - * @return Returns {@code true} if the {@link Storage} object contains a storage with the specified key; + * @returns Returns {@code true} if the {@link Storage} object contains a storage with the specified key; * returns {@code false} otherwise. * @throws BusinessError if invoked failed * @since 6 @@ -138,7 +140,6 @@ declare namespace storage { * @throws BusinessError if invoked failed * @since 6 * @deprecated since 9 - * @deprecated since 9 * @useinstead ohos.preferences.preferences.put */ putSync(key: string, value: ValueType): void; -- Gitee From 3da8b3da819cfe9fd57030adb62ffef72af000a3 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Fri, 25 Nov 2022 19:05:48 +0800 Subject: [PATCH 2/2] API specification Signed-off-by: duanweiling --- api/@ohos.data.dataSharePredicates.d.ts | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/api/@ohos.data.dataSharePredicates.d.ts b/api/@ohos.data.dataSharePredicates.d.ts index bb6997f643..7d1f140691 100644 --- a/api/@ohos.data.dataSharePredicates.d.ts +++ b/api/@ohos.data.dataSharePredicates.d.ts @@ -25,7 +25,7 @@ declare namespace dataSharePredicates { */ class DataSharePredicates { /** - * Configures the DataSharePredicates to match the field whose data type is ValueType and value is equal + * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal * to a specified value. * This method is similar to = of the SQL statement. * @@ -39,7 +39,7 @@ declare namespace dataSharePredicates { equalTo(field: string, value: ValueType): DataSharePredicates; /** - * Configures the DataSharePredicates to match the field whose data type is ValueType and value is unequal to + * Configure the DataSharePredicates to match the field whose data type is ValueType and value is unequal to * a specified value. * This method is similar to != of the SQL statement. * @@ -97,7 +97,7 @@ declare namespace dataSharePredicates { */ and(): DataSharePredicates; /** - * Configures the DataSharePredicates to match the field whose data type is string and value + * Configure the DataSharePredicates to match the field whose data type is string and value * contains a specified value. * This method is similar to contains of the SQL statement. * @@ -111,7 +111,7 @@ declare namespace dataSharePredicates { contains(field: string, value: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the field whose data type is string and value starts + * Configure the DataSharePredicates to match the field whose data type is string and value starts * with a specified string. * This method is similar to value% of the SQL statement. * @@ -125,7 +125,7 @@ declare namespace dataSharePredicates { beginsWith(field: string, value: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the field whose data type is string and value + * Configure the DataSharePredicates to match the field whose data type is string and value * ends with a specified string. * This method is similar to %value of the SQL statement. * @@ -139,7 +139,7 @@ declare namespace dataSharePredicates { endsWith(field: string, value: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the fields whose value is null. + * Configure the DataSharePredicates to match the fields whose value is null. * This method is similar to is null of the SQL statement. * * @since 9 @@ -151,7 +151,7 @@ declare namespace dataSharePredicates { isNull(field: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the specified fields whose value is not null. + * Configure the DataSharePredicates to match the specified fields whose value is not null. * This method is similar to is not null of the SQL statement. * * @since 9 @@ -163,7 +163,7 @@ declare namespace dataSharePredicates { isNotNull(field: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the fields whose data type is string and value is + * Configure the DataSharePredicates to match the fields whose data type is string and value is * similar to a specified string. * This method is similar to like of the SQL statement. * @@ -178,7 +178,7 @@ declare namespace dataSharePredicates { like(field: string, value: string): DataSharePredicates; /** - * Configures the DataSharePredicates to match the fields whose data type is string and value is + * Configure the DataSharePredicates to match the fields whose data type is string and value is * similar to a specified string. * This method is similar to unlike of the SQL statement. * @@ -193,7 +193,7 @@ declare namespace dataSharePredicates { unlike(field: string, value: string): DataSharePredicates; /** - * Configures DataSharePredicates to match the specified field whose data type is string and the value contains + * Configure DataSharePredicates to match the specified field whose data type is string and the value contains * a wildcard. * Different from like, the input parameters of this method are case-sensitive. * @@ -220,7 +220,7 @@ declare namespace dataSharePredicates { between(field: string, low: ValueType, high: ValueType): DataSharePredicates; /** - * Configures DataSharePredicates to match the specified field whose data type is int and value is + * Configure DataSharePredicates to match the specified field whose data type is int and value is * out of a given range. * * @since 9 @@ -328,7 +328,7 @@ declare namespace dataSharePredicates { limit(total: number, offset: number): DataSharePredicates; /** - * Configures {@code DataSharePredicates} to group query results by specified columns. + * Configure {@code DataSharePredicates} to group query results by specified columns. * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core @@ -339,7 +339,7 @@ declare namespace dataSharePredicates { groupBy(fields: Array): DataSharePredicates; /** - * Configures {@code DataSharePredicates} to specify the index column. + * Configure {@code DataSharePredicates} to specify the index column. * Before using this method, you need to create an index column. * * @since 9 @@ -351,7 +351,7 @@ declare namespace dataSharePredicates { indexedBy(field: string): DataSharePredicates; /** - * Configures {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values + * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values * are within a given range. * * @since 9 @@ -364,7 +364,7 @@ declare namespace dataSharePredicates { in(field: string, value: Array): DataSharePredicates; /** - * Configures {@code DataSharePredicates} to match the specified field whose data type is String array and values + * Configure {@code DataSharePredicates} to match the specified field whose data type is String array and values * are out of a given range. * * @since 9 @@ -377,7 +377,7 @@ declare namespace dataSharePredicates { notIn(field: string, value: Array): DataSharePredicates; /** - * Configures {@code DataSharePredicates} Creates a query condition using the specified key prefix. + * Configure {@code DataSharePredicates} Creates a query condition using the specified key prefix. * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core @@ -388,7 +388,7 @@ declare namespace dataSharePredicates { prefixKey(prefix: string): DataSharePredicates; /** - * Configures {@code DataSharePredicates} to match the specified value whose key is within a given range. + * Configure {@code DataSharePredicates} to match the specified value whose key is within a given range. * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core -- Gitee