Get Rows
Get a Specific Row
You can retrieve a single specific row from a Data Store table of the given instance using the getRow() method. This is done by passing the unique ROWID of the row as the argument to this method, as shown in the code syntax below.
The <TABLE_INSTANCE> used in the code below is the instance defined in the Table Instance page.
copyFuture<(APIResponse, ZCatalystRow)> <TABLE_INSTANCE>.getRow(int id)
Parameters:
- id: The unique ROWID of the particular row that needs to be retrieved
A sample code snippet is shown below:
copytry { ZCatalystTable table = app.getDataStoreInstance().getTableInstance('Projects'); var (response, row) = await table.getRow(1624000000139040); print(row.id); } on ZCatalystException catch (ex) { print(ex.toString()); }
Get All Rows
You can retrieve all the rows of a table of the given instance using the getRows() method, as shown in the code syntax below. If the operation is successful, this method will return all the rows of the table without any filters or conditions.
The <TABLE_INSTANCE> used in the code syntax below is the instance defined in the Table Instance page.
copyFuture<(APIResponse, List
)> .getRows()
A sample code snippet is shown below:
copytry { var (response, rows, resInfo) = await app .getDataStoreInstance() .getTableInstance('Projects') .getRows(); for (var row in rows) { print(row.getData()); } } on ZCatalystException catch (ex) { print(ex.toString()); }
Last Updated 2024-09-12 18:16:13 +0530 +0530
Yes
No
Send your feedback to us