Skip to main content

QueryResult

  • Namespace: PPDS.Dataverse.Query
  • Assembly: PPDS.Dataverse
  • Kind: Class

Summary

Represents the result of a query execution against Dataverse. Contains the records, column metadata, and paging information.

Members

Methods

Empty

QueryResult Empty(string entityLogicalName)

Creates an empty result with no records.

Properties

Columns

IReadOnlyList<QueryColumn> Columns { get; set; }

Metadata about the columns in the result set.

Count

int Count { get; set; }

The number of records in this result page.

EntityLogicalName

string EntityLogicalName { get; set; }

The logical name of the primary entity being queried.

ExecutedFetchXml

string ExecutedFetchXml { get; set; }

The FetchXML that was actually executed. For SQL queries, this is the transpiled FetchXML.

ExecutionTimeMs

long ExecutionTimeMs { get; set; }

The time taken to execute the query.

IsAggregate

bool IsAggregate { get; set; }

Whether the query was an aggregate query.

MoreRecords

bool MoreRecords { get; set; }

Whether there are more records available beyond this page.

PageNumber

int PageNumber { get; set; }

The current page number (1-based).

PagingCookie

string PagingCookie { get; set; }

The paging cookie for fetching the next page of results. Pass this to the next query execution to continue.

Records

IReadOnlyList<IReadOnlyDictionary<string, QueryValue>> Records { get; set; }

The records returned by the query. Each record is a dictionary mapping column names to their values.

TotalCount

Nullable<int> TotalCount { get; set; }

The total number of records matching the query, if count was requested. Only populated when the query includes returntotalrecordcount.