From 4a8c4de3a525736febd2e79c6882810eb47376dd Mon Sep 17 00:00:00 2001 From: duanweiling Date: Thu, 17 Nov 2022 16:49:05 +0800 Subject: [PATCH 1/5] =?UTF-8?q?js=20doc=E9=9D=9E=E6=B3=95=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanweiling --- api/@ohos.data.DataShareResultSet.d.ts | 54 ++++++------ api/@ohos.data.dataAbility.d.ts | 106 ++++++++++-------------- api/@ohos.data.dataSharePredicates.d.ts | 91 ++++++++++---------- api/@ohos.data.rdb.d.ts | 88 +++++++++----------- api/@system.storage.d.ts | 5 -- api/data/rdb/resultSet.d.ts | 92 +++++++------------- 6 files changed, 187 insertions(+), 249 deletions(-) mode change 100755 => 100644 api/data/rdb/resultSet.d.ts diff --git a/api/@ohos.data.DataShareResultSet.d.ts b/api/@ohos.data.DataShareResultSet.d.ts index f03f9547d8..2841c35093 100644 --- a/api/@ohos.data.DataShareResultSet.d.ts +++ b/api/@ohos.data.DataShareResultSet.d.ts @@ -74,9 +74,9 @@ export enum DataType { export default interface DataShareResultSet { /** * Obtains the names of all columns or keys in a result set. - * - * @note The column or key names are returned as a string array, in which the strings are in the same order + * The column or key names are returned as a string array, in which the strings are in the same order * as the columns or keys in the result set. + * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi @@ -85,8 +85,8 @@ export default interface DataShareResultSet { /** * Obtains the number of columns or keys in the result set. + * The returned number is equal to the length of the string array returned by the columnCount method. * - * @note The returned number is equal to the length of the string array returned by the columnCount method. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi @@ -119,7 +119,7 @@ export default interface DataShareResultSet { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns true if the result set is moved successfully; + * @returns Returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. */ goToFirstRow(): boolean; @@ -130,7 +130,7 @@ export default interface DataShareResultSet { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns true if the result set is moved successfully; + * @returns Returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. */ goToLastRow(): boolean; @@ -141,7 +141,7 @@ export default interface DataShareResultSet { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns true if the result set is moved successfully; + * @returns Returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the last row. */ goToNextRow(): boolean; @@ -152,7 +152,7 @@ export default interface DataShareResultSet { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns true if the result set is moved successfully; + * @returns Returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the first row. */ goToPreviousRow(): boolean; @@ -165,7 +165,7 @@ export default interface DataShareResultSet { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param offset Indicates the offset relative to the current position. - * @return Returns true if the result set is moved successfully and does not go beyond the range; + * @returns Returns true if the result set is moved successfully and does not go beyond the range; * returns false otherwise. */ goTo(offset: number): boolean; @@ -177,107 +177,107 @@ export default interface DataShareResultSet { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param position Indicates the index of the specified row, which starts from 1. - * @return Returns true if the result set is moved successfully; returns false otherwise. + * @returns Returns true if the result set is moved successfully; returns false otherwise. */ goToRow(position: number): boolean; /** * Obtains the value of the specified column or key in the current row as a byte array. + * The implementation class determines whether to throw an exception if the value of the specified * - * @note The implementation class determines whether to throw an exception if the value of the specified * column or key in the current row is null or the specified column or key is not of the Blob type. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the specified column index or key index, which starts from 0. - * @return Returns the value of the specified column or key as a byte array. + * @returns Returns the value of the specified column or key as a byte array. */ getBlob(columnIndex: number): Uint8Array; /** * Obtains the value of the specified column or key in the current row as string. + * The implementation class determines whether to throw an exception if the value of the specified * - * @note The implementation class determines whether to throw an exception if the value of the specified * column or key in the current row is null or the specified column or key is not of the string type. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the specified column index or key index, which starts from 0. - * @return Returns the value of the specified column or key as a string. + * @returns Returns the value of the specified column or key as a string. */ getString(columnIndex: number): string; /** * Obtains the value of the specified column or key in the current row as long. - * - * @note The implementation class determines whether to throw an exception if the value of the specified + * The implementation class determines whether to throw an exception if the value of the specified * column or key in the current row is null, the specified column or key is not of the long type. + * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the specified column index or key index, which starts from 0. - * @return Returns the value of the specified column or key as a long. + * @returns Returns the value of the specified column or key as a long. */ getLong(columnIndex: number): number; /** * Obtains the value of the specified column or key in the current row as double. + * The implementation class determines whether to throw an exception if the value of the specified * - * @note The implementation class determines whether to throw an exception if the value of the specified * column or key in the current row is null, the specified column or key is not of the double type. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the specified column index or key index, which starts from 0. - * @return Returns the value of the specified column or key as a double. + * @returns Returns the value of the specified column or key as a double. */ getDouble(columnIndex: number): number; /** * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. * - * @note Calling this method on the result set will release all of its resources and makes it ineffective. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns true if the result set is closed; returns false otherwise. + * @returns Returns true if the result set is closed; returns false otherwise. */ close(): void; /** * Obtains the column index or key index based on the specified column name or key name. + * The column name or key name is passed as an input parameter. * - * @note The column name or key name is passed as an input parameter. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnName Indicates the name of the specified column or key in the result set. - * @return Returns the index of the specified column or key. + * @returns Returns the index of the specified column or key. */ getColumnIndex(columnName: string): number; /** * Obtains the column name or key name based on the specified column index or key index. + * The column index or key index is passed as an input parameter. * - * @note The column index or key index is passed as an input parameter. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the index of the specified column or key in the result set. - * @return Returns the name of the specified column or key. + * @returns Returns the name of the specified column or key. */ getColumnName(columnIndex: number): string; /** * Obtains the dataType of the specified column or key. - * - * @note The implementation class determines whether to throw an exception if the value of the specified + * The implementation class determines whether to throw an exception if the value of the specified * column or key in the current row is null, the specified column or key is not in the data type. + * * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param columnIndex Indicates the specified column index or key index, which starts from 0. - * @return Returns the dataType of the specified column or key. + * @returns Returns the dataType of the specified column or key. */ getDataType(columnIndex: number): DataType; } \ No newline at end of file diff --git a/api/@ohos.data.dataAbility.d.ts b/api/@ohos.data.dataAbility.d.ts index f2eb226ff8..7dd326bdc7 100644 --- a/api/@ohos.data.dataAbility.d.ts +++ b/api/@ohos.data.dataAbility.d.ts @@ -21,18 +21,17 @@ import rdb from './@ohos.data.rdb'; * * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @import import data_dataAbility from '@ohos.data.dataAbility'; */ declare namespace dataAbility { /** * Create an RdbPredicates by table name and DataAbilityPredicates. + * This method is similar to = of the SQL statement. * - * @note This method is similar to = of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param name Indicates the table name. * @param dataAbilityPredicates Indicates the dataAbility predicates. - * @return Returns an RdbPredicates. + * @returns Returns an RdbPredicates. */ function createRdbPredicates(name: string, dataAbilityPredicates: DataAbilityPredicates): rdb.RdbPredicates; @@ -41,174 +40,172 @@ declare namespace dataAbility { * * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @import import data_dataAbility from '@ohos.data.dataAbility'; */ class DataAbilityPredicates { /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to = of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ equalTo(field: string, value: ValueType): DataAbilityPredicates; /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to != of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ notEqualTo(field: string, value: ValueType): DataAbilityPredicates; /** * Adds a left parenthesis to the DataAbilityPredicates. + * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @return Returns the DataAbilityPredicates with the left parenthesis. + * @returns Returns the DataAbilityPredicates with the left parenthesis. */ beginWrap(): DataAbilityPredicates; /** * Adds a right parenthesis to the DataAbilityPredicates. + * This method is similar to ) of the SQL statement and needs to be used together * - * @note This method is similar to ) of the SQL statement and needs to be used together * with beginWrap(). * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @return Returns the DataAbilityPredicates with the right parenthesis. + * @returns Returns the DataAbilityPredicates with the right parenthesis. */ endWrap(): DataAbilityPredicates; /** * Adds an or condition to the DataAbilityPredicates. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @return Returns the DataAbilityPredicates with the or condition. + * @returns Returns the DataAbilityPredicates with the or condition. */ or(): DataAbilityPredicates; /** * Adds an and condition to the DataAbilityPredicates. + * This method is similar to and of the SQL statement. * - * @note This method is similar to and of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @return Returns the DataAbilityPredicates with the and condition. + * @returns Returns the DataAbilityPredicates with the and condition. */ and(): DataAbilityPredicates; /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to contains of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ contains(field: string, value: string): DataAbilityPredicates; /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to value% of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ beginsWith(field: string, value: string): DataAbilityPredicates; /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to %value of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ endsWith(field: string, value: string): DataAbilityPredicates; /** * Configures the DataAbilityPredicates to match the fields whose value is null. + * This method is similar to is null of the SQL statement. * - * @note This method is similar to is null of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ isNull(field: string): DataAbilityPredicates; /** * Configures the DataAbilityPredicates to match the specified fields whose value is not null. + * This method is similar to is not null of the SQL statement. * - * @note This method is similar to is not null of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ isNotNull(field: string): DataAbilityPredicates; /** * Configures the DataAbilityPredicates 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. * - * @note This method is similar to like of the SQL statement. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataAbilityPredicates. The percent sign (%) in the value * is a wildcard (like * in a regular expression). - * @return Returns the DataAbilityPredicates that match the specified field. + * @returns Returns the DataAbilityPredicates that match the specified field. */ like(field: string, value: string): DataAbilityPredicates; /** * Configures DataAbilityPredicates 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. * - * @note Different from like, the input parameters of this method are case-sensitive. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param value Indicates the value to match with DataAbilityPredicates. - * @return Returns the SQL statement with the specified DataAbilityPredicates. + * @returns Returns the SQL statement with the specified DataAbilityPredicates. */ glob(field: string, value: string): DataAbilityPredicates; /** * Restricts the value of the field to the range between low value and high value. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name. * @param low Indicates the minimum value. * @param high Indicates the maximum value. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates; @@ -216,61 +213,56 @@ declare namespace dataAbility { * Configures DataAbilityPredicates to match the specified field whose data type is int and value is * out of a given range. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param low Indicates the minimum value to match with DataAbilityPredicates}. * @param high Indicates the maximum value to match with DataAbilityPredicates}. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ notBetween(field: string, low: ValueType, high: ValueType): DataAbilityPredicates; /** * Restricts the value of the field to be greater than the specified value. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ greaterThan(field: string, value: ValueType): DataAbilityPredicates; /** * Restricts the value of the field to be smaller than the specified value. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ lessThan(field: string, value: ValueType): DataAbilityPredicates; /** * Restricts the value of the field to be greater than or equal to the specified value. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ greaterThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates; /** * Restricts the value of the field to be smaller than or equal to the specified value. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ lessThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates; @@ -278,11 +270,10 @@ declare namespace dataAbility { * Restricts the ascending order of the return list. When there are several orders, * the one close to the head has the highest priority. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name for sorting the return list. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ orderByAsc(field: string): DataAbilityPredicates; @@ -290,66 +281,62 @@ declare namespace dataAbility { * Restricts the descending order of the return list. When there are several orders, * the one close to the head has the highest priority. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name for sorting the return list. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ orderByDesc(field: string): DataAbilityPredicates; /** * Restricts each row of the query result to be unique. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. */ distinct(): DataAbilityPredicates; /** * Restricts the max number of return records. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param value Indicates the max length of the return list. - * @return Returns the SQL query statement with the specified DataAbilityPredicates. + * @returns Returns the SQL query statement with the specified DataAbilityPredicates. * @throws IllegalPredicateException Throws this exception if DataAbilityPredicates are added to a wrong position. */ limitAs(value: number): DataAbilityPredicates; /** * Configures DataAbilityPredicates to specify the start position of the returned result. + * Use this method together with limit(int). * - * @note Use this method together with limit(int). * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param rowOffset Indicates the start position of the returned result. The value is a positive integer. - * @return Returns the SQL query statement with the specified AbsPredicates. + * @returns Returns the SQL query statement with the specified AbsPredicates. */ offsetAs(rowOffset: number): DataAbilityPredicates; /** * Configures DataAbilityPredicates to group query results by specified columns. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param fields Indicates the specified columns by which query results are grouped. - * @return Returns the DataAbilityPredicates with the specified columns by which query results are grouped. + * @returns Returns the DataAbilityPredicates with the specified columns by which query results are grouped. */ groupBy(fields: Array): DataAbilityPredicates; /** * Configures DataAbilityPredicates to specify the index column. + * Before using this method, you need to create an index column. * - * @note Before using this method, you need to create an index column. * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param indexName Indicates the name of the index column. - * @return Returns DataAbilityPredicates with the specified index column. + * @returns Returns DataAbilityPredicates with the specified index column. */ indexedBy(field: string): DataAbilityPredicates; @@ -357,12 +344,11 @@ declare namespace dataAbility { * Configures DataAbilityPredicates to match the specified field whose data type is ValueType array and values * are within a given range. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param values Indicates the values to match with DataAbilityPredicates. - * @return Returns DataAbilityPredicates that matches the specified field. + * @returns Returns DataAbilityPredicates that matches the specified field. */ in(field: string, value: Array): DataAbilityPredicates; @@ -370,12 +356,11 @@ declare namespace dataAbility { * Configures {@code DataAbilityPredicates} to match the specified field whose data type is String array and values * are out of a given range. * - * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @param field Indicates the column name in the database table. * @param values Indicates the values to match with DataAbilityPredicates. - * @return Returns DataAbilityPredicates that matches the specified field. + * @returns Returns DataAbilityPredicates that matches the specified field. */ notIn(field: string, value: Array): DataAbilityPredicates; } @@ -383,7 +368,6 @@ declare namespace dataAbility { * Indicates possible value types * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core - * @import import data_rdb from '@ohos.data.rdb'; */ type ValueType = number | string | boolean; } diff --git a/api/@ohos.data.dataSharePredicates.d.ts b/api/@ohos.data.dataSharePredicates.d.ts index f11e1c96bf..bb6997f643 100644 --- a/api/@ohos.data.dataSharePredicates.d.ts +++ b/api/@ohos.data.dataSharePredicates.d.ts @@ -22,188 +22,187 @@ declare namespace dataSharePredicates { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @import import data_dataShare from '@ohos.data.dataShare'; */ class DataSharePredicates { /** * Configures 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. * - * @note This method is similar to = of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ equalTo(field: string, value: ValueType): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to != of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ notEqualTo(field: string, value: ValueType): DataSharePredicates; /** * Adds a left parenthesis to the DataSharePredicates. + * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns the DataSharePredicates with the left parenthesis. + * @returns Returns the DataSharePredicates with the left parenthesis. */ beginWrap(): DataSharePredicates; /** * Adds a right parenthesis to the DataSharePredicates. + * This method is similar to ) of the SQL statement and needs to be used together * - * @note This method is similar to ) of the SQL statement and needs to be used together * with beginWrap(). * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns the DataSharePredicates with the right parenthesis. + * @returns Returns the DataSharePredicates with the right parenthesis. */ endWrap(): DataSharePredicates; /** * Adds an or condition to the DataSharePredicates. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns the DataSharePredicates with the or condition. + * @returns Returns the DataSharePredicates with the or condition. */ or(): DataSharePredicates; /** * Adds an and condition to the DataSharePredicates. + * This method is similar to and of the SQL statement. * - * @note This method is similar to and of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns the DataSharePredicates with the and condition. + * @returns Returns the DataSharePredicates with the and condition. */ and(): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to contains of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ contains(field: string, value: string): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to value% of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ beginsWith(field: string, value: string): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to %value of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ endsWith(field: string, value: string): DataSharePredicates; /** * Configures the DataSharePredicates to match the fields whose value is null. + * This method is similar to is null of the SQL statement. * - * @note This method is similar to is null of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ isNull(field: string): DataSharePredicates; /** * Configures the DataSharePredicates to match the specified fields whose value is not null. + * This method is similar to is not null of the SQL statement. * - * @note This method is similar to is not null of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ isNotNull(field: string): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to like of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value * is a wildcard (like * in a regular expression). - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ like(field: string, value: string): DataSharePredicates; /** * Configures 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. * - * @note This method is similar to unlike of the SQL statement. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value * is a wildcard (like * in a regular expression). - * @return Returns the DataSharePredicates that match the specified field. + * @returns Returns the DataSharePredicates that match the specified field. */ unlike(field: string, value: string): DataSharePredicates; /** * Configures 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. * - * @note Different from like, the input parameters of this method are case-sensitive. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name in the database table. * @param value Indicates the value to match with DataSharePredicates. - * @return Returns the SQL statement with the specified DataSharePredicates. + * @returns Returns the SQL statement with the specified DataSharePredicates. */ glob(field: string, value: string): DataSharePredicates; @@ -216,7 +215,7 @@ declare namespace dataSharePredicates { * @param field Indicates the column name. * @param low Indicates the minimum value. * @param high Indicates the maximum value. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ between(field: string, low: ValueType, high: ValueType): DataSharePredicates; @@ -230,7 +229,7 @@ declare namespace dataSharePredicates { * @param field Indicates the column name in the database table. * @param low Indicates the minimum value to match with DataSharePredicates. * @param high Indicates the maximum value to match with DataSharePredicates. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates; @@ -242,7 +241,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ greaterThan(field: string, value: ValueType): DataSharePredicates; @@ -254,7 +253,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ lessThan(field: string, value: ValueType): DataSharePredicates; @@ -266,7 +265,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates; @@ -278,7 +277,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name. * @param value Indicates the String field. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates; @@ -290,7 +289,7 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name for sorting the return list. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ orderByAsc(field: string): DataSharePredicates; @@ -302,7 +301,7 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the column name for sorting the return list. - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ orderByDesc(field: string): DataSharePredicates; @@ -312,7 +311,7 @@ declare namespace dataSharePredicates { * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi - * @return Returns the SQL query statement with the specified DataSharePredicates. + * @returns Returns the SQL query statement with the specified DataSharePredicates. */ distinct(): DataSharePredicates; @@ -324,7 +323,7 @@ declare namespace dataSharePredicates { * @systemapi * @param total Represents the specified number of results. * @param offset Indicates the starting position. - * @return Returns the query object. + * @returns Returns the query object. */ limit(total: number, offset: number): DataSharePredicates; @@ -335,19 +334,19 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param fields Indicates the specified columns by which query results are grouped. - * @return Returns the DataSharePredicates with the specified columns by which query results are grouped. + * @returns Returns the DataSharePredicates with the specified columns by which query results are grouped. */ groupBy(fields: Array): DataSharePredicates; /** * Configures {@code DataSharePredicates} to specify the index column. + * Before using this method, you need to create an index column. * - * @note Before using this method, you need to create an index column. * @since 9 * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param field Indicates the name of the index column. - * @return Returns DataSharePredicates with the specified index column. + * @returns Returns DataSharePredicates with the specified index column. */ indexedBy(field: string): DataSharePredicates; @@ -360,7 +359,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name in the database table. * @param values Indicates the values to match with DataSharePredicates. - * @return Returns DataSharePredicates that matches the specified field. + * @returns Returns DataSharePredicates that matches the specified field. */ in(field: string, value: Array): DataSharePredicates; @@ -373,7 +372,7 @@ declare namespace dataSharePredicates { * @systemapi * @param field Indicates the column name in the database table. * @param values Indicates the values to match with DataSharePredicates. - * @return Returns DataSharePredicates that matches the specified field. + * @returns Returns DataSharePredicates that matches the specified field. */ notIn(field: string, value: Array): DataSharePredicates; @@ -384,7 +383,7 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param prefix Represents the specified key prefix. - * @return Returns the query object. + * @returns Returns the query object. */ prefixKey(prefix: string): DataSharePredicates; @@ -395,7 +394,7 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @param keys Represents the key names. - * @return Returns the query object. + * @returns Returns the query object. */ inKeys(keys: Array): DataSharePredicates; } diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index 28762906aa..eedc42c1e8 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -22,7 +22,6 @@ import dataSharePredicates from './@ohos.data.dataSharePredicates'; /** * Provides methods for rdbStore create and delete. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 */ @@ -238,7 +237,6 @@ declare namespace rdb * * This class provides methods for creating, querying, updating, and deleting RDBs. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -568,7 +566,6 @@ declare namespace rdb * * This class provides methods for creating, querying, updating, and deleting RDBs. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1017,7 +1014,6 @@ declare namespace rdb /** * Indicates possible value types * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 */ @@ -1026,7 +1022,6 @@ declare namespace rdb /** * Values in buckets are stored in key-value pairs * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 */ @@ -1036,7 +1031,6 @@ declare namespace rdb /** * Manages relational database configurations. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -1049,7 +1043,6 @@ interface StoreConfig { /** * Manages relational database configurations. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1057,7 +1050,6 @@ interface StoreConfigV9 { /** * The database name. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1066,7 +1058,6 @@ interface StoreConfigV9 { /** * Specifies whether the database is encrypted. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1075,7 +1066,6 @@ interface StoreConfigV9 { /** * Specifies whether the database is encrypted. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1085,7 +1075,6 @@ interface StoreConfigV9 { /** * Manages relational database configurations. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -1105,8 +1094,8 @@ class RdbPredicates { /** * Sync data between devices. + * When query database, this function should not be called. * - * @note When query database, this function should not be called. * @param {Array} devices - Indicates specified remote devices. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1118,8 +1107,8 @@ class RdbPredicates { /** * Specify all remote devices which connect to local device when syncing distributed database. + * When query database, this function should not be called. * - * @note When query database, this function should not be called. * @returns {RdbPredicates} - the {@link RdbPredicates} self. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 8 @@ -1131,8 +1120,8 @@ class RdbPredicates { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to = of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} self. @@ -1146,8 +1135,8 @@ class RdbPredicates { /** * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to * a specified value. + * This method is similar to != of the SQL statement. * - * @note This method is similar to != of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} self. @@ -1160,8 +1149,8 @@ class RdbPredicates { /** * Adds a left parenthesis to the RdbPredicates. + * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * @returns {RdbPredicates} - the {@link RdbPredicates} with the left parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 @@ -1172,8 +1161,8 @@ class RdbPredicates { /** * Adds a right parenthesis to the RdbPredicates. + * This method is similar to ) of the SQL statement and needs to be used together * - * @note This method is similar to ) of the SQL statement and needs to be used together * with beginWrap(). * @returns {RdbPredicates} - the {@link RdbPredicates} with the right parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1185,9 +1174,9 @@ class RdbPredicates { /** * Adds an or condition to the RdbPredicates. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicates} with the or condition. + * @returns Returns the {@link RdbPredicates} with the or condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -1197,9 +1186,9 @@ class RdbPredicates { /** * Adds an and condition to the RdbPredicates. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicates} with the or condition. + * @returns Returns the {@link RdbPredicates} with the or condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -1210,8 +1199,8 @@ class RdbPredicates { /** * Configures the RdbPredicates 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. * - * @note This method is similar to contains of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} self. @@ -1225,8 +1214,8 @@ class RdbPredicates { /** * Configures the RdbPredicates 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. * - * @note This method is similar to value% of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} self. @@ -1240,8 +1229,8 @@ class RdbPredicates { /** * Configures the RdbPredicates 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. * - * @note This method is similar to %value of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} self. @@ -1254,8 +1243,8 @@ class RdbPredicates { /** * Configures the RdbPredicates to match the fields whose value is null. + * This method is similar to is null of the SQL statement. * - * @note This method is similar to is null of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @returns {RdbPredicates} - the {@link RdbPredicates} self. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1267,8 +1256,8 @@ class RdbPredicates { /** * Configures the RdbPredicates to match the specified fields whose value is not null. + * This method is similar to is not null of the SQL statement. * - * @note This method is similar to is not null of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @returns {RdbPredicates} - the {@link RdbPredicates} self. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -1282,8 +1271,8 @@ class RdbPredicates { /** * Configures the RdbPredicates 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. * - * @note This method is similar to like of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the {@link RdbPredicates} that match the specified field. @@ -1297,8 +1286,8 @@ class RdbPredicates { /** * Configures RdbPredicates 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. * - * @note Different from like, the input parameters of this method are case-sensitive. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. @@ -1442,8 +1431,8 @@ class RdbPredicates { /** * Configures RdbPredicatesV9 to specify the start position of the returned result. + * Use this method together with limit(int). * - * @note Use this method together with limit(int). * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1467,8 +1456,8 @@ class RdbPredicates { /** * Configures RdbPredicatesV9 to specify the index column. + * Before using this method, you need to create an index column. * - * @note Before using this method, you need to create an index column. * @param {string} field - Indicates the name of the index column. * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1510,7 +1499,6 @@ class RdbPredicates { /** * Manages relational database configurations. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1527,8 +1515,8 @@ class RdbPredicatesV9 { /** * Sync data between devices. + * When query database, this function should not be called. * - * @note When query database, this function should not be called. * @param {Array} devices - Indicates specified remote devices. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -1539,8 +1527,8 @@ class RdbPredicatesV9 { /** * Specify all remote devices which connect to local device when syncing distributed database. + * When query database, this function should not be called. * - * @note When query database, this function should not be called. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -1550,8 +1538,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to = of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. @@ -1564,8 +1552,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to * a specified value. + * This method is similar to != of the SQL statement. * - * @note This method is similar to != of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. @@ -1577,8 +1565,8 @@ class RdbPredicatesV9 { /** * Adds a left parenthesis to the RdbPredicatesV9. + * This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the left parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -1587,8 +1575,8 @@ class RdbPredicatesV9 { /** * Adds a right parenthesis to the RdbPredicatesV9. + * This method is similar to ) of the SQL statement and needs to be used together * - * @note This method is similar to ) of the SQL statement and needs to be used together * with beginWrap(). * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the right parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1598,9 +1586,9 @@ class RdbPredicatesV9 { /** * Adds an or condition to the RdbPredicatesV9. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicatesV9} with the or condition. + * @returns Returns the {@link RdbPredicatesV9} with the or condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1608,9 +1596,9 @@ class RdbPredicatesV9 { /** * Adds an and condition to the RdbPredicatesV9. + * This method is similar to or of the SQL statement. * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicatesV9} with the or condition. + * @returns Returns the {@link RdbPredicatesV9} with the or condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1619,8 +1607,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to contains of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. @@ -1633,8 +1621,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to value% of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. @@ -1647,8 +1635,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to %value of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. @@ -1660,8 +1648,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 to match the fields whose value is null. + * This method is similar to is null of the SQL statement. * - * @note This method is similar to is null of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -1672,8 +1660,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 to match the specified fields whose value is not null. + * This method is similar to is not null of the SQL statement. * - * @note This method is similar to is not null of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -1685,8 +1673,8 @@ class RdbPredicatesV9 { /** * Configures the RdbPredicatesV9 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. * - * @note This method is similar to like of the SQL statement. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} that match the specified field. @@ -1699,8 +1687,8 @@ class RdbPredicatesV9 { /** * Configures RdbPredicatesV9 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. * - * @note Different from like, the input parameters of this method are case-sensitive. * @param {string} field - Indicates the column name in the database table. * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. @@ -1832,8 +1820,8 @@ class RdbPredicatesV9 { /** * Configures RdbPredicatesV9 to specify the start position of the returned result. + * Use this method together with limit(int). * - * @note Use this method together with limit(int). * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -1855,8 +1843,8 @@ class RdbPredicatesV9 { /** * Configures RdbPredicatesV9 to specify the index column. + * Before using this method, you need to create an index column. * - * @note Before using this method, you need to create an index column. * @param {string} field - Indicates the name of the index column. * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. * @throws {BusinessError} 401 - if the parameter type is incorrect. diff --git a/api/@system.storage.d.ts b/api/@system.storage.d.ts index ad103508c8..0135d75cce 100644 --- a/api/@system.storage.d.ts +++ b/api/@system.storage.d.ts @@ -14,7 +14,6 @@ */ /** - * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @deprecated since 6 @@ -65,7 +64,6 @@ export interface GetStorageOptions { } /** - * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @deprecated since 6 @@ -115,7 +113,6 @@ export interface SetStorageOptions { } /** - * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @deprecated since 6 @@ -148,7 +145,6 @@ export interface ClearStorageOptions { } /** - * @import import storage from '@system.storage'; * @since 3 * @deprecated since 6 * @FAModelOnly @@ -190,7 +186,6 @@ export interface DeleteStorageOptions { } /** - * @import import storage from '@system.storage'; * @since 3 * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @deprecated since 6 diff --git a/api/data/rdb/resultSet.d.ts b/api/data/rdb/resultSet.d.ts old mode 100755 new mode 100644 index 8b080538ff..6a9c462376 --- a/api/data/rdb/resultSet.d.ts +++ b/api/data/rdb/resultSet.d.ts @@ -18,7 +18,6 @@ import { AsyncCallback } from '../../basic' /** * Provides methods for accessing a database result set generated by querying the database. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -28,9 +27,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the names of all columns in a result set. - * - * @note The column names are returned as a string array, in which the strings are in the same order + * 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. + * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -40,9 +39,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the number of columns in the result set. - * - * @note The returned number is equal to the length of the string array returned by the + * The returned number is equal to the length of the string array returned by the * columnCount method. + * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -53,7 +52,6 @@ import { AsyncCallback } from '../../basic' /** * Obtains the number of rows in the result set. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -63,8 +61,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the current index of the result set. + * The result set index starts from 0. * - * @note The result set index starts from 0. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -75,7 +73,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned at the first row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -86,7 +83,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned at the last row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -97,7 +93,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned after the last row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -109,7 +104,6 @@ import { AsyncCallback } from '../../basic' * returns whether the cursor is pointing to the position before the first * row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -122,7 +116,6 @@ import { AsyncCallback } from '../../basic' * * If the result set is closed by calling the close method, true will be returned. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -132,8 +125,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the column index based on the specified column name. + * The column name is passed as an input parameter. * - * @note The column name is passed as an input parameter. * @param {string} columnName - Indicates the name of the specified column in the result set. * @returns {number} return the index of the specified column. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -145,8 +138,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the column name based on the specified column index. + * The column index is passed as an input parameter. * - * @note The column index is passed as an input parameter. * @param {number} columnIndex - Indicates the index of the specified column in the result set. * @returns {string} returns the name of the specified column. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -160,7 +153,6 @@ import { AsyncCallback } from '../../basic' * 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. * - * @note N/A * @param {number} offset - Indicates the offset relative to the current position. * @returns {string} returns true if the result set is moved successfully and does not go beyond the range; * returns false otherwise. @@ -174,7 +166,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the specified row of the result set. * - * @note N/A * @param {number} rowIndex - Indicates the index of the specified row, which starts from 0. * @returns {boolean} returns true if the result set is moved successfully; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -187,7 +178,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the first row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -200,7 +190,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the last row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -213,7 +202,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the next row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the last row. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -226,7 +214,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the previous row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the first row. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -238,9 +225,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as a byte array. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null or the specified column is not of the Blob type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {Uint8Array} returns the value of the specified column as a byte array. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -252,9 +239,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as string. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null or the specified column is not of the string type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {string} returns the value of the specified column as a string. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -266,9 +253,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as long. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the integer type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {number} returns the value of the specified column as a long. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -280,9 +267,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as double. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the double type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {number} returns the value of the specified column as a double. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -295,7 +282,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the value of the specified column in the current row is null. * - * @note N/A * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {boolean} returns true if the value of the specified column in the current row is null; * returns false otherwise. @@ -308,8 +294,8 @@ import { AsyncCallback } from '../../basic' /** * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. * - * @note Calling this method on the result set will release all of its resources and makes it ineffective. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 * @deprecated since 9 @@ -321,7 +307,6 @@ import { AsyncCallback } from '../../basic' /** * Provides methods for accessing a database result set generated by querying the database. * - * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -329,9 +314,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the names of all columns in a result set. - * - * @note The column names are returned as a string array, in which the strings are in the same order + * 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. + * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -339,9 +324,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the number of columns in the result set. - * - * @note The returned number is equal to the length of the string array returned by the + * The returned number is equal to the length of the string array returned by the * columnCount method. + * * @since 9 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core */ @@ -350,7 +335,6 @@ import { AsyncCallback } from '../../basic' /** * Obtains the number of rows in the result set. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -358,8 +342,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the current index of the result set. + * The result set index starts from 0. * - * @note The result set index starts from 0. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -368,7 +352,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned at the first row. * - * @note N/A * @since 9 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core */ @@ -377,7 +360,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned at the last row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -386,7 +368,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the result set is positioned after the last row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -395,7 +376,6 @@ import { AsyncCallback } from '../../basic' /** * Returns whether the cursor is pointing to the position before the first row. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -406,7 +386,6 @@ import { AsyncCallback } from '../../basic' * * If the result set is closed by calling the close method, true will be returned. * - * @note N/A * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -414,8 +393,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the column index based on the specified column name. + * The column name is passed as an input parameter. * - * @note The column name is passed as an input parameter. * @param {string} columnName - Indicates the name of the specified column in the result set. * @returns {number} return the index of the specified column. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -427,8 +406,8 @@ import { AsyncCallback } from '../../basic' /** * Obtains the column name based on the specified column index. + * The column index is passed as an input parameter. * - * @note The column index is passed as an input parameter. * @param {number} columnIndex - Indicates the index of the specified column in the result set. * @returns {string} returns the name of the specified column. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -442,7 +421,6 @@ import { AsyncCallback } from '../../basic' * 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. * - * @note N/A * @param {number} offset - Indicates the offset relative to the current position. * @returns {string} returns true if the result set is moved successfully and does not go beyond the range; * returns false otherwise. @@ -456,7 +434,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the specified row of the result set. * - * @note N/A * @param {number} rowIndex - Indicates the index of the specified row, which starts from 0. * @returns {boolean} returns true if the result set is moved successfully; returns false otherwise. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. @@ -469,7 +446,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the first row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. @@ -481,7 +457,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the last row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is empty. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. @@ -493,7 +468,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the next row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the last row. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. @@ -505,7 +479,6 @@ import { AsyncCallback } from '../../basic' /** * Go to the previous row of the result set. * - * @note N/A * @returns {boolean} returns true if the result set is moved successfully; * returns false otherwise, for example, if the result set is already in the first row. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. @@ -516,9 +489,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as a byte array. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null or the specified column is not of the Blob type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {Uint8Array} returns the value of the specified column as a byte array. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -530,9 +503,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as string. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null or the specified column is not of the string type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {string} returns the value of the specified column as a string. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -544,9 +517,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as long. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the integer type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {number} returns the value of the specified column as a long. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -558,9 +531,9 @@ import { AsyncCallback } from '../../basic' /** * Obtains the value of the specified column in the current row as double. - * - * @note The implementation class determines whether to throw an exception if the value of the specified column + * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the double type. + * * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {number} returns the value of the specified column as a double. * @throws {BusinessError} 14800013 - The column value is null or the column type is incompatible. @@ -573,7 +546,6 @@ import { AsyncCallback } from '../../basic' /** * Checks whether the value of the specified column in the current row is null. * - * @note N/A * @param {number} columnIndex - Indicates the specified column index, which starts from 0. * @returns {boolean} returns true if the value of the specified column in the current row is null; * returns false otherwise. @@ -586,8 +558,8 @@ import { AsyncCallback } from '../../basic' /** * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. * - * @note Calling this method on the result set will release all of its resources and makes it ineffective. * @throws {BusinessError} 14800012 - The result set is empty or the specified location is invalid. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 -- Gitee From 258e608bc7fe0de84fb0340abda00df9418947b1 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Thu, 17 Nov 2022 20:40:08 +0800 Subject: [PATCH 2/5] erroe word and permission Signed-off-by: duanweiling --- api/@ohos.data.dataAbility.d.ts | 31 +++++----- api/@ohos.data.distributedDataObject.d.ts | 4 +- api/@ohos.data.rdb.d.ts | 72 +++++++++++------------ api/@ohos.data.storage.d.ts | 8 +-- 4 files changed, 58 insertions(+), 57 deletions(-) diff --git a/api/@ohos.data.dataAbility.d.ts b/api/@ohos.data.dataAbility.d.ts index 7dd326bdc7..670ef3d2f7 100644 --- a/api/@ohos.data.dataAbility.d.ts +++ b/api/@ohos.data.dataAbility.d.ts @@ -43,7 +43,7 @@ declare namespace dataAbility { */ class DataAbilityPredicates { /** - * Configures the DataAbilityPredicates to match the field whose data type is ValueType and value is equal + * Configure the DataAbilityPredicates 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. * @@ -56,8 +56,9 @@ declare namespace dataAbility { equalTo(field: string, value: ValueType): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the field whose data type is ValueType and value is unequal to + * Configure the DataAbilityPredicates to match the field whose data type is ValueType and value is unequal to * a specified value. + * Configure the data capability predicate to match a field where the data type is a value type and the value is not equal to the specified value. * This method is similar to != of the SQL statement. * * @since 7 @@ -110,7 +111,7 @@ declare namespace dataAbility { and(): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the field whose data type is string and value + * Configure the DataAbilityPredicates 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. * @@ -123,7 +124,7 @@ declare namespace dataAbility { contains(field: string, value: string): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the field whose data type is string and value starts + * Configure the DataAbilityPredicates 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. * @@ -136,7 +137,7 @@ declare namespace dataAbility { beginsWith(field: string, value: string): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the field whose data type is string and value + * Configure the DataAbilityPredicates 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. * @@ -149,7 +150,7 @@ declare namespace dataAbility { endsWith(field: string, value: string): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the fields whose value is null. + * Configure the DataAbilityPredicates to match the fields whose value is null. * This method is similar to is null of the SQL statement. * * @since 7 @@ -160,7 +161,7 @@ declare namespace dataAbility { isNull(field: string): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the specified fields whose value is not null. + * Configure the DataAbilityPredicates to match the specified fields whose value is not null. * This method is similar to is not null of the SQL statement. * * @since 7 @@ -171,7 +172,7 @@ declare namespace dataAbility { isNotNull(field: string): DataAbilityPredicates; /** - * Configures the DataAbilityPredicates to match the fields whose data type is string and value is + * Configure the DataAbilityPredicates 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. * @@ -185,7 +186,7 @@ declare namespace dataAbility { like(field: string, value: string): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to match the specified field whose data type is string and the value contains + * Configure DataAbilityPredicates 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. * @@ -210,7 +211,7 @@ declare namespace dataAbility { between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to match the specified field whose data type is int and value is + * Configure DataAbilityPredicates to match the specified field whose data type is int and value is * out of a given range. * * @since 7 @@ -309,7 +310,7 @@ declare namespace dataAbility { limitAs(value: number): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to specify the start position of the returned result. + * Configure DataAbilityPredicates to specify the start position of the returned result. * Use this method together with limit(int). * * @since 7 @@ -320,7 +321,7 @@ declare namespace dataAbility { offsetAs(rowOffset: number): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to group query results by specified columns. + * Configure DataAbilityPredicates to group query results by specified columns. * * @since 7 * @syscap SystemCapability.DistributedDataManager.DataShare.Core @@ -330,7 +331,7 @@ declare namespace dataAbility { groupBy(fields: Array): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to specify the index column. + * Configure DataAbilityPredicates to specify the index column. * Before using this method, you need to create an index column. * * @since 7 @@ -341,7 +342,7 @@ declare namespace dataAbility { indexedBy(field: string): DataAbilityPredicates; /** - * Configures DataAbilityPredicates to match the specified field whose data type is ValueType array and values + * Configure DataAbilityPredicates to match the specified field whose data type is ValueType array and values * are within a given range. * * @since 7 @@ -353,7 +354,7 @@ declare namespace dataAbility { in(field: string, value: Array): DataAbilityPredicates; /** - * Configures {@code DataAbilityPredicates} to match the specified field whose data type is String array and values + * Configure {@code DataAbilityPredicates} to match the specified field whose data type is String array and values * are out of a given range. * * @since 7 diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index c42521376c..55715e51aa 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -212,7 +212,7 @@ declare namespace distributedDataObject { /* * Change object session. * - * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param {string} sessionId - sessionId The sessionId to be joined, if empty, leave all session. * @param {AsyncCallback} callback - the callback of setSessionId. * @throws {BusinessError} 201 - the permissions check failed. @@ -227,7 +227,7 @@ declare namespace distributedDataObject { /* * Change object session. * - * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param {string} sessionId - sessionId The sessionId to be joined, if empty, leave all session. * @returns {Promise} - the promise returned by the function. * @throws {BusinessError} 201 - the permissions check failed. diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index eedc42c1e8..8e7a2b49b1 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -424,7 +424,7 @@ declare namespace rdb executeSql(sql: string, bindArgs ?: Array): Promise; /** - * Begin Transaction before excute your sql. + * Begin Transaction before execute your sql. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 8 @@ -434,7 +434,7 @@ declare namespace rdb beginTransaction(): void; /** - * Commit the the sql you have excuted. + * Commit the the sql you have executed. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 8 @@ -444,7 +444,7 @@ declare namespace rdb commit(): void; /** - * Roll back the sql you have already excuted. + * Roll back the sql you have already executed. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 8 @@ -841,7 +841,7 @@ declare namespace rdb executeSql(sql: string, bindArgs ?: Array): Promise; /** - * BeginTransaction before excute your sql. + * BeginTransaction before execute your sql. * * @throws {BusinessError} 401 - if the parameter type is incorrect. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -1118,7 +1118,7 @@ class RdbPredicates { inAllDevices(): RdbPredicates; /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal + * Configure the RdbPredicatesV9 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. * @@ -1133,7 +1133,7 @@ class RdbPredicates { equalTo(field: string, value: ValueType): RdbPredicates; /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to + * Configure the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to * a specified value. * This method is similar to != of the SQL statement. * @@ -1197,7 +1197,7 @@ class RdbPredicates { and(): RdbPredicates; /** - * Configures the RdbPredicates to match the field whose data type is string and value + * Configure the RdbPredicates 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. * @@ -1212,7 +1212,7 @@ class RdbPredicates { contains(field: string, value: string): RdbPredicates; /** - * Configures the RdbPredicates to match the field whose data type is string and value starts + * Configure the RdbPredicates 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. * @@ -1227,7 +1227,7 @@ class RdbPredicates { beginsWith(field: string, value: string): RdbPredicates; /** - * Configures the RdbPredicates to match the field whose data type is string and value + * Configure the RdbPredicates 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. * @@ -1242,7 +1242,7 @@ class RdbPredicates { endsWith(field: string, value: string): RdbPredicates; /** - * Configures the RdbPredicates to match the fields whose value is null. + * Configure the RdbPredicates to match the fields whose value is null. * This method is similar to is null of the SQL statement. * * @param {string} field - Indicates the column name in the database table. @@ -1255,7 +1255,7 @@ class RdbPredicates { isNull(field: string): RdbPredicates; /** - * Configures the RdbPredicates to match the specified fields whose value is not null. + * Configure the RdbPredicates to match the specified fields whose value is not null. * This method is similar to is not null of the SQL statement. * * @param {string} field - Indicates the column name in the database table. @@ -1269,7 +1269,7 @@ class RdbPredicates { isNotNull(field: string): RdbPredicates; /** - * Configures the RdbPredicates to match the fields whose data type is string and value is + * Configure the RdbPredicates 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. * @@ -1284,7 +1284,7 @@ class RdbPredicates { like(field: string, value: string): RdbPredicates; /** - * Configures RdbPredicates to match the specified field whose data type is string and the value contains + * Configure RdbPredicates 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. * @@ -1299,7 +1299,7 @@ class RdbPredicates { glob(field: string, value: string): RdbPredicates; /** - * Configures RdbPredicates to match the specified field whose data type is string and the value contains + * Configure RdbPredicates to match the specified field whose data type is string and the value contains * a wildcard. * * @param {string} field - Indicates the column name. @@ -1314,7 +1314,7 @@ class RdbPredicates { between(field: string, low: ValueType, high: ValueType): RdbPredicates; /** - * Configures RdbPredicates to match the specified field whose data type is int and value is + * Configure RdbPredicates to match the specified field whose data type is int and value is * out of a given range. * * @param {string} field - Indicates the column name in the database table. @@ -1430,7 +1430,7 @@ class RdbPredicates { limitAs(value: number): RdbPredicates; /** - * Configures RdbPredicatesV9 to specify the start position of the returned result. + * Configure RdbPredicatesV9 to specify the start position of the returned result. * Use this method together with limit(int). * * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. @@ -1443,7 +1443,7 @@ class RdbPredicates { offsetAs(rowOffset: number): RdbPredicates; /** - * Configures RdbPredicatesV9 to group query results by specified columns. + * Configure RdbPredicatesV9 to group query results by specified columns. * * @param {Array} fields - Indicates the specified columns by which query results are grouped. * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. @@ -1455,7 +1455,7 @@ class RdbPredicates { groupBy(fields: Array): RdbPredicates; /** - * Configures RdbPredicatesV9 to specify the index column. + * Configure RdbPredicatesV9 to specify the index column. * Before using this method, you need to create an index column. * * @param {string} field - Indicates the name of the index column. @@ -1468,7 +1468,7 @@ class RdbPredicates { indexedBy(field: string): RdbPredicates; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * Configure RdbPredicatesV9 to match the specified field whose data type is ValueType array and values * are within a given range. * * @param {string} field - Indicates the column name in the database table. @@ -1482,7 +1482,7 @@ class RdbPredicates { in(field: string, value: Array): RdbPredicates; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * Configure RdbPredicatesV9 to match the specified field whose data type is ValueType array and values * are out of a given range. * * @param {string} field - Indicates the column name in the database table. @@ -1536,7 +1536,7 @@ class RdbPredicatesV9 { inAllDevices(): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal + * Configure the RdbPredicatesV9 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. * @@ -1550,7 +1550,7 @@ class RdbPredicatesV9 { equalTo(field: string, value: ValueType): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to + * Configure the RdbPredicatesV9 to match the field whose data type is ValueType and value is not equal to * a specified value. * This method is similar to != of the SQL statement. * @@ -1605,7 +1605,7 @@ class RdbPredicatesV9 { and(): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value + * Configure the RdbPredicatesV9 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. * @@ -1619,7 +1619,7 @@ class RdbPredicatesV9 { contains(field: string, value: string): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value starts + * Configure the RdbPredicatesV9 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. * @@ -1633,7 +1633,7 @@ class RdbPredicatesV9 { beginsWith(field: string, value: string): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value + * Configure the RdbPredicatesV9 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. * @@ -1647,7 +1647,7 @@ class RdbPredicatesV9 { endsWith(field: string, value: string): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the fields whose value is null. + * Configure the RdbPredicatesV9 to match the fields whose value is null. * This method is similar to is null of the SQL statement. * * @param {string} field - Indicates the column name in the database table. @@ -1659,7 +1659,7 @@ class RdbPredicatesV9 { isNull(field: string): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the specified fields whose value is not null. + * Configure the RdbPredicatesV9 to match the specified fields whose value is not null. * This method is similar to is not null of the SQL statement. * * @param {string} field - Indicates the column name in the database table. @@ -1671,7 +1671,7 @@ class RdbPredicatesV9 { isNotNull(field: string): RdbPredicatesV9; /** - * Configures the RdbPredicatesV9 to match the fields whose data type is string and value is + * Configure the RdbPredicatesV9 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. * @@ -1685,7 +1685,7 @@ class RdbPredicatesV9 { like(field: string, value: string): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains + * Configure RdbPredicatesV9 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. * @@ -1699,7 +1699,7 @@ class RdbPredicatesV9 { glob(field: string, value: string): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains + * Configure RdbPredicatesV9 to match the specified field whose data type is string and the value contains * a wildcard. * * @param {string} field - Indicates the column name. @@ -1713,7 +1713,7 @@ class RdbPredicatesV9 { between(field: string, low: ValueType, high: ValueType): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is int and value is + * Configure RdbPredicatesV9 to match the specified field whose data type is int and value is * out of a given range. * * @param {string} field - Indicates the column name in the database table. @@ -1819,7 +1819,7 @@ class RdbPredicatesV9 { limitAs(value: number): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to specify the start position of the returned result. + * Configure RdbPredicatesV9 to specify the start position of the returned result. * Use this method together with limit(int). * * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. @@ -1831,7 +1831,7 @@ class RdbPredicatesV9 { offsetAs(rowOffset: number): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to group query results by specified columns. + * Configure RdbPredicatesV9 to group query results by specified columns. * * @param {Array} fields - Indicates the specified columns by which query results are grouped. * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. @@ -1842,7 +1842,7 @@ class RdbPredicatesV9 { groupBy(fields: Array): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to specify the index column. + * Configure RdbPredicatesV9 to specify the index column. * Before using this method, you need to create an index column. * * @param {string} field - Indicates the name of the index column. @@ -1854,7 +1854,7 @@ class RdbPredicatesV9 { indexedBy(field: string): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * Configure RdbPredicatesV9 to match the specified field whose data type is ValueType array and values * are within a given range. * * @param {string} field - Indicates the column name in the database table. @@ -1867,7 +1867,7 @@ class RdbPredicatesV9 { in(field: string, value: Array): RdbPredicatesV9; /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * Configure RdbPredicatesV9 to match the specified field whose data type is ValueType array and values * are out of a given range. * * @param {string} field - Indicates the column name in the database table. diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts index 86b8edd9de..80b5597a56 100644 --- a/api/@ohos.data.storage.d.ts +++ b/api/@ohos.data.storage.d.ts @@ -48,7 +48,7 @@ declare namespace storage { * storage file. * *

When deleting the {@link Storage} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, inconsistent data * will occur. * * @param path Indicates the path of storage file @@ -65,7 +65,7 @@ declare namespace storage { * from the cache. * *

When deleting the {@link Storage} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, inconsistent data * will occur. * * @param path Indicates the path of storage file. @@ -82,7 +82,7 @@ declare namespace storage { * *

The storage data is stored in a file, which matches only one {@link Storage} instance in the memory. * You can use getStorage to obtain the {@link Storage} instance matching - * the file that stores storage data, and use emoveStorageFromCache + * the file that stores storage data, and use removeStorageFromCache * to remove the {@link Storage} instance from the memory. * * @syscap SystemCapability.DistributedDataManager.Preferences.Core @@ -190,7 +190,7 @@ declare namespace storage { on(type: 'change', callback: Callback): void; /** - * Unregisters an existing observer. + * Unregister an existing observer. * * @param callback Indicates the registered callback. * @throws BusinessError if invoked failed -- Gitee From 803abbf9a70b4c6d06aacca18f2d3edeb59a7ca4 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Thu, 17 Nov 2022 21:09:35 +0800 Subject: [PATCH 3/5] unknow deprecated Signed-off-by: duanweiling --- api/@system.storage.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@system.storage.d.ts b/api/@system.storage.d.ts index 0135d75cce..14eb618379 100644 --- a/api/@system.storage.d.ts +++ b/api/@system.storage.d.ts @@ -196,6 +196,7 @@ export default class Storage { * Reads the stored content. * @param options Options. * @deprecated since 6 + * @useinstead ohos.preferences.preferences.get * @FAModelOnly */ static get(options: GetStorageOptions): void; @@ -204,6 +205,7 @@ export default class Storage { * Modifies the stored content. * @param options Options. * @deprecated since 6 + * @useinstead ohos.preferences.preferences.set * @FAModelOnly */ static set(options: SetStorageOptions): void; @@ -212,6 +214,7 @@ export default class Storage { * Clears the stored content. * @param options Options. * @deprecated since 6 + * @useinstead ohos.preferences.preferences.clear * @FAModelOnly */ static clear(options?: ClearStorageOptions): void; @@ -220,6 +223,7 @@ export default class Storage { * Deletes the stored content. * @param options Options. * @deprecated since 6 + * @useinstead ohos.preferences.preferences.delete * @FAModelOnly */ static delete(options: DeleteStorageOptions): void; -- Gitee From 5503c49254166bb4e9ecd05a97b9afc3aaef826b Mon Sep 17 00:00:00 2001 From: duanweiling Date: Thu, 17 Nov 2022 21:16:42 +0800 Subject: [PATCH 4/5] unknow deprecated1 Signed-off-by: duanweiling --- api/@system.storage.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@system.storage.d.ts b/api/@system.storage.d.ts index 14eb618379..ee70b15efe 100644 --- a/api/@system.storage.d.ts +++ b/api/@system.storage.d.ts @@ -205,7 +205,6 @@ export default class Storage { * Modifies the stored content. * @param options Options. * @deprecated since 6 - * @useinstead ohos.preferences.preferences.set * @FAModelOnly */ static set(options: SetStorageOptions): void; -- Gitee From 1ca293c3db659e2dfcc70138bfb8e972a4ab36b3 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Fri, 18 Nov 2022 11:45:34 +0800 Subject: [PATCH 5/5] js api Signed-off-by: duanweiling --- api/@ohos.data.storage.d.ts | 40 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts index 80b5597a56..37be8a4c2d 100644 --- a/api/@ohos.data.storage.d.ts +++ b/api/@ohos.data.storage.d.ts @@ -20,7 +20,7 @@ import { AsyncCallback, Callback } from './basic'; * * @name storage * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 * @syscap SystemCapability.DistributedDataManager.Preferences.Core * */ @@ -35,7 +35,8 @@ declare namespace storage { * @return Returns the {@link Storage} instance matching the specified storage file name. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.getPreferences */ function getStorageSync(path: string): Storage; @@ -54,7 +55,8 @@ declare namespace storage { * @param path Indicates the path of storage file * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.deletePreferences */ function deleteStorageSync(path: string): void; function deleteStorage(path: string, callback: AsyncCallback): void; @@ -71,7 +73,8 @@ declare namespace storage { * @param path Indicates the path of storage file. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.removePreferencesFromCache */ function removeStorageFromCacheSync(path: string): void; function removeStorageFromCache(path: string, callback: AsyncCallback): void; @@ -88,7 +91,7 @@ declare namespace storage { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 */ interface Storage { /** @@ -101,7 +104,8 @@ declare namespace storage { * @return 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, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.get */ getSync(key: string, defValue: ValueType): ValueType; get(key: string, defValue: ValueType, callback: AsyncCallback): void; @@ -115,7 +119,8 @@ declare namespace storage { * returns {@code false} otherwise. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.has */ hasSync(key: string): boolean; has(key: string, callback: AsyncCallback): boolean; @@ -132,7 +137,9 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.put */ putSync(key: string, value: ValueType): void; put(key: string, value: ValueType, callback: AsyncCallback): void; @@ -148,7 +155,8 @@ declare namespace storage { * MAX_KEY_LENGTH. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.delete */ deleteSync(key: string): void; delete(key: string, callback: AsyncCallback): void; @@ -162,7 +170,8 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.clear */ clearSync(): void; clear(callback: AsyncCallback): void; @@ -173,7 +182,8 @@ declare namespace storage { * * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.flush */ flushSync(): void; flush(callback: AsyncCallback): void; @@ -185,7 +195,8 @@ declare namespace storage { * @param callback Indicates the callback when storage changes. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.on */ on(type: 'change', callback: Callback): void; @@ -195,7 +206,8 @@ declare namespace storage { * @param callback Indicates the registered callback. * @throws BusinessError if invoked failed * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 + * @useinstead ohos.preferences.preferences.off */ off(type: 'change', callback: Callback): void; } @@ -211,7 +223,7 @@ declare namespace storage { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * * @since 6 - * @deprecated since 9, please use @ohos.data.preferences instead. + * @deprecated since 9 */ interface StorageObserver { /** -- Gitee