Documentation

Home > Documentation > CREATE LOCKSET Statement

CREATE LOCKSET Statement

Syntax

CREATE LOCKSET lockset_identifier (
  identifier type[,...]
);

Substitutable Fields

lockset_identifier:

A unique identifier (name) for the lockset.

identifier:

The unique identifier (name) for a tuple field or expression that is a component of the lock.

type:
    int
  | double
  | bool
  | timestamp
  | string(length)

The data type of a tuple field or expression that is a component of the lock.

Discussion

The LOCK and UNLOCK statements can control the flow of tuples in an application by buffering tuples based on some condition in the LOCK statement, which can then be released by the UNLOCK statement. A LOCKSET manages the locks and their state.

A LOCKSET may be defined with a one field or multi-field key. Paired LOCK and UNLOCK statements must use the same key to manage a lock within the LOCKSET. A single LOCKSET can manage multiple locks (as long as they use the same combination of field types for the key) and therefore can be used by multiple LOCK/UNLOCK statement pairs.