From d6706a99ba3dea8491b5caffb88d4ff836343fb6 Mon Sep 17 00:00:00 2001 From: lichenlong1 Date: Fri, 7 Jan 2022 21:26:51 +0800 Subject: [PATCH] description: add rdb transaction interface API Signed-off-by: lichenlong1 --- api/@ohos.data.rdb.d.ts | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index df961acd5e..eb0813c4ac 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -145,8 +145,41 @@ declare namespace rdb { * @devices phone, tablet, tv, wearable, car * @param newEncryptKey the encrypted key is uint8 form in a vector. */ - changeEncryptKey(newEncryptKey:Uint8Array, callback: AsyncCallback):void; - changeEncryptKey(newEncryptKey:Uint8Array): Promise; + changeEncryptKey(newEncryptKey:Uint8Array, callback: AsyncCallback):void; + changeEncryptKey(newEncryptKey:Uint8Array): Promise; + + /** + * beginTransaction before excute your sql + * + * @note N/A + * @since 8 + * @sysCap SystemCapability.Data.DATA_APPDATAMGR + * @devices phone, tablet, tv, wearable, car + */ + beginTransaction(callback: AsyncCallback):void; + beginTransaction(): Promise; + + /** + * commit the the sql you have excuted. + * + * @note N/A + * @since 8 + * @sysCap SystemCapability.Data.DATA_APPDATAMGR + * @devices phone, tablet, tv, wearable, car + */ + commit(callback: AsyncCallback):void; + commit(): Promise; + + /** + * roll back the sql you have already excuted + * + * @note N/A + * @since 8 + * @sysCap SystemCapability.Data.DATA_APPDATAMGR + * @devices phone, tablet, tv, wearable, car + */ + rollBack(callback: AsyncCallback):void; + rollBack(): Promise; } /** -- Gitee