diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index ee482d899aa95e63b72d8772ca7fc3b4f9b067ee..be786d6ea55e6fb5a931444fe86fae1c9c37f526 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -6452,25 +6452,6 @@ declare namespace photoAccessHelper { * @since 20 */ getRecentPhotoInfo(options?: RecentPhotoOptions): Promise; - - /** - * Queries data in the database based on specified conditions. - * - * @permission ohos.permission.ACCESS_MEDIALIB_THUMB_DB - * @param { string } sql - The query conditions. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 201 - Permission denied - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800151 - The scenario parameter verification fails. - *
Possible causes: The SQL statement is abnormal. - * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs. - *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - query(sql: string): Promise; } /** @@ -11381,160 +11362,6 @@ declare namespace photoAccessHelper { addLcdJumpCount(ids: Array): Promise>; } - /** - * Indicates possible value types - * - * @typedef { number | string | boolean | Uint8Array | null } ValueType - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - type ValueType = number | string | boolean | Uint8Array | null; - - /** - * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record - * - * @typedef { Record } ValuesBucket - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - type ValuesBucket = Record; - - /** - * Provides methods for accessing a database result set generated by querying the database. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - class ResultSet { - /** - * Obtains the number of columns in the result set. - * - * @type { number } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - columnCount: number; - /** - * Obtains the number of rows in the result set. - * - * @type { number } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - rowCount: number; - /** - * Obtains the current index of the result set. - * - * @type { number } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - rowIndex: number; - /** - * Checks whether the cursor is positioned at the last row. - * - * @type { boolean } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - isAtLastRow: boolean; - /** - * Go to the specified row of the result set. - * - * @param { number } position - Indicates the index of the specified row, which starts from 0. - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes: position invalid. - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - goToRow(position: number): boolean; - /** - * Go to the first row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - goToFirstRow(): boolean; - /** - * Go to the next row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - goToNextRow(): boolean; - /** - * Obtains the values of all columns in the specified row. - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - getRow(): ValuesBucket; - /** - * Obtains the value of the specified column in the current row. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { ValueType } The value of the specified column.. - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes: columnIndex invalid. - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - getValue(columnIndex: number): ValueType; - /** - * Closes the result set. - * - * @throws { BusinessError } 202 - Called by non-system application - * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. - *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 22 - * @arkts 1.1&1.2 - */ - close(): void; - } - } export default photoAccessHelper;