DBselectSegmentObjectsByKeylist

Top  Previous  Next

Objects in a segment after object key select.

With this procedure objects are treated after object keys as a selection criterion. Besides, only the given segment is searched according to the criterion of a key list.

A total of four selection constants are available. With OR become the objects, object keys in the key list lie to the existing selection amount added. With AND will leave only such objects in the selection amount which also fulfil the new criterion or lie in another segment. With NEED only the objects will leave in the selection amount which do not fulfil the new criterion. With NEW the old selection amount is emptied and the objects which fulfil the new criterion are added to the selection list.

The criterion for fulfilling the new selection condition is present that the object owns an object key which appears in the given list of the keys. The list can be long arbitrarily and may contain double entries.

Parametre

segment (PSEGMENT) [IN]

The objects from this segment are tested under the given condition. However, with some conditions, possibly with NEW, other objects are also concerned, while they are removed from the selection list.

fkt (SELECT_FUNKTION) [IN]

Four different constants are available:

SELECT_NOT An object is removed from the selection list if it owns a key from the key list.

SELECT_OR An object is taken up in the selection list if it owns a key from the key list.

SELECT_NEW The selection list is emptied and then the objects are taken up in the list which own a key from the key list.

SELECT_AND An object is removed from the selection list if it lies in this segment and owns no key from the key list.

keylist (KEY *) [IN]

Pointer on a list with all keys which should be looked. The list may contain double ones.

keycnt (int) [IN]

The length of the key list. The size from keycnt may not be bigger than the number of the keys in keylist. The value from keycnt may not be negative.

Result

(T_ERROR) [OUT]

If the procedure was explained perfectly, is the result ERROR_OK, but one of the error messages from error.h.

Declaration

#include "database.h"

 

T_ERROR DLLENTRY DBselectSegmentObjectsByKeylist (

PSEGMENT segment,

SELECT_FUNKTION fkt,

KEY * keylist,

int keycnt

);

Related function

DBselectSegmentObjectsByKeygroup