Bulk Delete Rows
Catalyst enables you to delete records or rows of data in bulk from a specific table in the Data Store. The table is referred by its unique ID or name. You can obtain the table ID from Data Store or from the URL when the table is opened in the console.
The bulk delete operation can delete a maximum of 200 rows in a single operation. You can add the unique ROWIDs of the rows to be deleted in an ArrayList as shown in the sample code below. You must include at least one ROWID, and can include upto 200 ROWIDs, in the code.
The ArrayList is passed to the deleteRows() function through a ZCRowObject list. The table name or table ID must be passed to getTableInstance().
Ensure the following packages are imported:
import com.zc.component.object.ZCObject; import com.zc.component.object.ZCRowObject;
//Define an ArrayList and add the ROWIDs of the records to be deleted in it ArrayList rowIdList = new ArrayList<>(); rowIdList.add(1028000000171815L); // replace row id rowIdList.add(1028000000171810L); rowIdList.add(1028000000171805L); rowIdList.add(1028000000171617L); rowIdList.add(1028000000171098L); //Pass the ArrayList to the deleteRows() function. //Pass the table ID or table name as a ZCObject. List <ZCRowObject> deletedRowList = ZCObject.getInstance().getTableInstance("EmpDetails").deleteRows(rowIdList);
Last Updated 2023-09-03 01:06:41 +0530 +0530
Send your feedback to us