list method

Future<ListRowsResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? view,
  7. String? $fields,
})

Lists rows in a table.

Returns NOT_FOUND if the table does not exist.

Request parameters:

parent - Required. The parent table. Format: tables/{table} Value must have pattern ^tables/\[^/\]+$.

filter - Optional. Filter to only include resources matching the requirements. For more information, see Filtering list results.

orderBy - Optional. Sorting order for the list of rows on createTime/updateTime.

pageSize - The maximum number of rows to return. The service may return fewer than this value. If unspecified, at most 50 rows are returned. The maximum value is 1,000; values above 1,000 are coerced to 1,000.

pageToken - A page token, received from a previous ListRows call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListRows must match the call that provided the page token.

view - Optional. Column key to use for values in the row. Defaults to user entered name. Possible string values are:

  • "VIEW_UNSPECIFIED" : Defaults to user entered text.
  • "COLUMN_ID_VIEW" : Uses internally generated column id to identify values.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListRowsResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListRowsResponse> list(
  core.String parent, {
  core.String? filter,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.String? view,
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (orderBy != null) 'orderBy': [orderBy],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return ListRowsResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}