Synergex.SynergyDE.Select.ChangeTracking

WTSupported in traditional Synergy on Windows

WNSupported in Synergy .NET on Windows

USupported on UNIX

namespace Synergex.SynergyDE.Select

public sealed class ChangeTracking

The ChangeTracking class returns snapshot information for a file, enabling you to perform change tracking functions from within your program rather than spawning a ctutl command. See Change tracking for an overview of change tracking.

Constructors

ChangeTracking

public ChangeTracking(filename)

Creates the snapshot information object for the specified ISAM file (the ctutl filename) (a) in the Snapshots arrayed field.

Properties

ChangeTrackingEnabled

protected property ChangeTrackingEnabled

Indicates whether change tracking is enabled. Implements a get method that returns true if the file has change tracking enabled or false if change tracking is not enabled. (boolean)

Methods

ChangeTracking.ApplySnapshot

public ApplySnapshot(), void

Synchronizes the file with the ChangeTracking snapshot.

Any activity that occurs after snapshots are enabled is tracked in a pseudo snapshot. This pseudo snapshot is always the last one in the list, but it isn’t an actual snapshot; it just contains all of the activity since the last snapshot. When the ApplySnapshot() method is invoked, a new snapshot is created that contains the contents of the pseudo snapshot, and a new pseudo snapshot begins tracking any new activity. The Snapshots field contains both SnapshotInfo structure information for each snapshot as well as post‑snapshot information from the pseudo snapshot.

If change tracking is not enabled, an error will occur.

ChangeTracking.Refresh

public Refresh(), void

Updates the Snapshots array with the file’s current information.

Fields

SnapshotInfo structure

Contains the following fields:

Type

The enumeration of the SSType enumeration (see below). (SSType)

Number

The snapshot number. (int)

Inserts

The number of new records inserted into the file since the last snapshot. (int)

Updates

The number of records updated in the file since the last snapshot. (int)

Deletes

The number of records deleted in the file since the last snapshot. (int)

Ulinks

The number of updated records not in the previous snapshot. (int)

DateTime

Either the date and time of the snapshot in %DATETIME format or, when Type is SSType.Ending, the date and time of the query. (a20)

When Type is SSType.Beginning, DateTime represents the date and time that ChangeTracking entries begin in the file. The Inserts, Updates, Deletes, and Ulinks values are always zero. There can only be one Beginning per set of snapshots.

When Type is SSType.Snapshot, DateTime represents the date and time the snapshot was applied to the file, and Inserts, Updates, Deletes, and Ulinks indicate the number of entries applied between the previous snapshot and DateTime.

When Type is SSType.Ending, DateTime represents the date and time of the inquiry, and Inserts, Updates, Deletes, and Ulinks indicate the number of entries made between the previous snapshot and the current time. There can only be one Ending per set of snapshots.

Snapshots field

An arrayed field that will be populated with the SnapshotInfo structure information for each snapshot, as well as information about the activity that occurred after the last snapshot. ([#]SnapshotInfo)