dbExtractArray.h

Functions

void dbExtractArray(const void *pfrom, void *pto, short field_size, long nRequest, long no_elements, long offset, long increment)

Make a copy of parts of an array.

The source array may or may not be a record field.

The increment parameter is used to support array filters; it means: copy only every increment’th element, starting at offset.

The offset and no_elements parameters are used to support the circular buffer feature of record fields: elements before offset are treated as if they came right after no_elements.

This function does not do any conversion on the array elements.

Preconditions: nRequest >= 0, no_elements >= 0, increment > 0 0 <= offset < no_elements pto points to a buffer with at least field_size*nRequest bytes pfrom points to a buffer with exactly field_size*no_elements bytes

Parameters:
  • pfrom – Pointer to source array.

  • pto – Pointer to target array.

  • field_size – Size of an array element.

  • nRequest – Number of elements to copy.

  • no_elements – Number of elements in source array.

  • offset – Wrap-around point in source array.

  • increment – Copy only every increment’th element.