queryRecordChanges
Returns records that changed since a specified sync token or since a zone was created.
Declaration
CancellablePromise queryRecordChanges(
QueryRecordChangesParams params
);Parameters
- params:
A dictionary as described in the Discussion section.
Return Value
A CancellablePromise with the following resolutions.
Discussion
If the promise is successful, it will resolve with one of the following dictionaries:
{ statusCode: 200; result: CKDBRecordChangesResponse }
The promise may reject and throw the following:
DocumentedResponseError, if the HTTP status code is 421. The result member will be a dictionary conforming to AuthenticationRequiredError.DocumentedResponseError, if the HTTP status code is none of the above and in the range 400 to 599. The result member will be a dictionary conforming to RequestError.ValidationError, if the parameters to the method are incorrect.A
FetchErrordescendant, if there is a problem with the network request. A reference to the request object can be used to examine the underlying cause.
Discussion
The params dictionary has the following properties:
dictionary QueryRecordChangesParams {
string containerId;
CKEnvironment environment;
string databaseType;
string zoneName;
CKDBRecordChangesRequestBody? body;
}containerId: The container identifier. SeeContainer.environment: The container environment. For valid values, seeCKEnvironment.databaseType: The database type. For valid values, seeCKDatabaseType.zoneName: The zone name. SeeCKDBZone.body: Request parameters for fetching record changes. You can customize record changes that the server fetches by providing starting change token, record types, and fields in the body parameter. SeeCKDBRecordChangesRequestBody.
If successful, the response contains a CKDBRecordChangesResponse object with an array of CKDBRecordResult objects. CKDBRecordResult can represent three types of records: existing, deleted, and error. You can verify that a returned record isn’t missing or deleted by checking that the type is set to existing.