From b725f2ca8b238dc53f2556969684622e328dfb36 Mon Sep 17 00:00:00 2001 From: wangxiyue Date: Tue, 12 Jul 2022 10:46:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EbatchInsert=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiyue --- api/@ohos.data.rdb.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index 07b0460791..245b29e018 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -117,6 +117,18 @@ declare namespace rdb { insert(table: string, values: ValuesBucket, callback: AsyncCallback): void; insert(table: string, values: ValuesBucket): Promise; + /** + * Inserts a batch of data into the target table. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param table Indicates the target table. + * @param values Indicates the rows of data to be inserted into the table. + * @return Returns the number of values that were inserted if the operation is successful; returns -1 otherwise. + */ + batchInsert(table: string, values: Array, callback: AsyncCallback): void; + batchInsert(table: string, values: Array): Promise; + /** * Updates data in the database based on a a specified instance object of rdbPredicates. * -- Gitee