This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > %Library.Counter

%Library.Counter

datatype class %Library.Counter extends %Library.Integer

ODBC Type: INTEGER

%Library.Counter is a datatype class that extends %Library.Integer. It does not override any inherited behavior.

Any property whose type class is %Library.Counter will be assigned a value on insert if no value is specified. The counter value is assigned by incrementing a counter that is defined in the storage definition of the class. The default counter location is the same as the DATALOCATION default but with a "C" suffix instead of a "D". Individual counters are located in the COUNTERLOCATION subscripted by the property name.

The value of a counter property is assigned automatically only when a new object is inserted into the database, either using Objects or an SQL INSERT statement. No value is assigned if a value is specified. If a value is specified and that value is greater than the current counter value then the value of the counter is set to the property's value.

Inherited Members

Inherited Methods (Including Private)

FeedbackOpens in a new window