Btrieve 2
Loading...
Searching...
No Matches
BtrieveBulkRetrieveAttributes Class Reference

The Btrieve bulk retrieve attributes class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveBulkRetrieveAttributes ()
 
 ~BtrieveBulkRetrieveAttributes ()
 
Btrieve::StatusCode AddAbsoluteValueField (Btrieve::DataType dataType, int offset, int length)
 Add an absolute value field.
 
Btrieve::StatusCode AddCeilingField (Btrieve::DataType dataType, int offset, int length)
 Add a ceiling field.
 
Btrieve::StatusCode AddField (int offset, int length)
 Add a field.
 
Btrieve::StatusCode AddFilter (BtrieveFilter *btrieveFilter)
 Add a filter.
 
Btrieve::StatusCode AddFloorField (Btrieve::DataType dataType, int offset, int length)
 Add a floor field.
 
Btrieve::StatusCode AddMaximumAggregate (Btrieve::DataType dataType, int offset, int length)
 Add a maximum aggregate.
 
Btrieve::StatusCode AddMinimumAggregate (Btrieve::DataType dataType, int offset, int length)
 Add a minimum aggregate.
 
Btrieve::StatusCode AddRoundField (Btrieve::DataType dataType, int offset, int length, int precision=0)
 Add a round field.
 
Btrieve::StatusCode AddSystemField (Btrieve::SystemField systemField)
 Add a system field.
 
Btrieve::StatusCode AddTruncateField (Btrieve::DataType dataType, int offset, int length, int precision=0)
 Add a truncate field.
 
Btrieve::StatusCode SetMaximumRecordCount (int maximumRecordCount)
 Set the maximum record count.
 
Btrieve::StatusCode SetMaximumRejectCount (int maximumRejectCount)
 Set the maximum reject count.
 
Btrieve::StatusCode SetSkipCurrentRecord (bool skipCurrentRecord)
 Set skip current record.
 

Detailed Description

The Btrieve bulk retrieve attributes class.

Examples
bfilter.cpp, and btestbulk.cpp.

Constructor & Destructor Documentation

◆ BtrieveBulkRetrieveAttributes()

BtrieveBulkRetrieveAttributes::BtrieveBulkRetrieveAttributes ( )
Snippet
C++ btestbulk.cpp
BtrieveBulkRetrieveAttributes btrieveBulkRetrieveAttributes;
Python btestbulk.py
btrieveBulkRetrieveAttributes = btrievePython.BtrieveBulkRetrieveAttributes()
assert(btrieveBulkRetrieveAttributes != None)

◆ ~BtrieveBulkRetrieveAttributes()

BtrieveBulkRetrieveAttributes::~BtrieveBulkRetrieveAttributes ( )

Member Function Documentation

◆ AddAbsoluteValueField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddAbsoluteValueField ( Btrieve::DataType dataType,
int offset,
int length )

Add an absolute value field.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddCeilingField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddCeilingField ( Btrieve::DataType dataType,
int offset,
int length )

Add a ceiling field.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddField ( int offset,
int length )

Add a field.

Parameters
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. Aggregates may not be added to a bulk retrieve attributes containing a field.
Snippet
C++ btestbulk.cpp
// If AddField() fails.
if ((status = btrieveBulkRetrieveAttributes.AddField(0, sizeof(record))) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::AddField():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkRetrieveAttributes.AddField(0, recordLength)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: btrieveBulkRetrieveAttributes::AddField():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
bfilter.cpp, and btestbulk.cpp.

◆ AddFilter()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddFilter ( BtrieveFilter * btrieveFilter)

Add a filter.

Parameters
[in]btrieveFilterThe filter.
Description
Bulk retrieve attributes have no filters initially.
Snippet
C++ btestbulk.cpp
// If AddFilter() fails.
if ((status = btrieveBulkRetrieveAttributes.AddFilter(&btrieveFilter)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::AddFilter():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkRetrieveAttributes.AddFilter(btrieveFilter)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveBulkRetrieveAttributes::AddFilter():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
bfilter.cpp, and btestbulk.cpp.

◆ AddFloorField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddFloorField ( Btrieve::DataType dataType,
int offset,
int length )

Add a floor field.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddMaximumAggregate()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddMaximumAggregate ( Btrieve::DataType dataType,
int offset,
int length )

Add a maximum aggregate.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no aggregates initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Fields may not be added to a bulk retrieve attributes containing an aggregate.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddMinimumAggregate()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddMinimumAggregate ( Btrieve::DataType dataType,
int offset,
int length )

Add a minimum aggregate.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Bulk retrieve attributes have no aggregates initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Fields may not be added to a bulk retrieve attributes containing an aggregate.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddRoundField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddRoundField ( Btrieve::DataType dataType,
int offset,
int length,
int precision = 0 )

Add a round field.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
[in]precisionThe precision. Precision must be in the range INT16_MIN to INT16_MAX, inclusive.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddSystemField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddSystemField ( Btrieve::SystemField systemField)

Add a system field.

Parameters
[in]systemFieldThe system field.
Description
Bulk retrieve attributes have no system fields initially. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ AddTruncateField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddTruncateField ( Btrieve::DataType dataType,
int offset,
int length,
int precision = 0 )

Add a truncate field.

Parameters
[in]dataTypeThe data type. Only Btrieve::DATA_TYPE_INTEGER and Btrieve::DATA_TYPE_FLOAT are supported.
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
[in]precisionThe precision. Precision must be in the range INT16_MIN to INT16_MAX, inclusive.
Description
Bulk retrieve attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The sum of the lengths of all added fields is limited to Btrieve::MAXIMUM_RECORD_LENGTH. The field specified by offset and length must be in little endian format. Aggregates may not be added to a bulk retrieve attributes containing a field.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetMaximumRecordCount()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetMaximumRecordCount ( int maximumRecordCount)

Set the maximum record count.

Parameters
[in]maximumRecordCountThe maximum record count. The maximum record count must be greater than 0 and less than or equal to Btrieve::MAXIMUM_BULK_RECORD_COUNT.
Description
Maximum record count defaults to Btrieve::MAXIMUM_BULK_RECORD_COUNT. Aggregates do not honor the maximum record count.
Note
The maximum record count default changed from zero to Btrieve::MAXIMUM_BULK_RECORD_COUNT in Zen v16 R1.
Snippet
C++ btestbulk.cpp
// If SetMaximumRecordCount() fails.
if ((status = btrieveBulkRetrieveAttributes.SetMaximumRecordCount(1)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetMaximumRecordCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkRetrieveAttributes.SetMaximumRecordCount(1)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveBulkRetrieveAttributes::SetMaximumRecordCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
bfilter.cpp, and btestbulk.cpp.

◆ SetMaximumRejectCount()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetMaximumRejectCount ( int maximumRejectCount)

Set the maximum reject count.

Parameters
[in]maximumRejectCountThe maximum reject count. The maximum reject count must be greater than or equal to 0 and less than 65536. A value of zero sets the maximum reject count to the Zen defined value.
Description
Maximum reject count defaults to the Zen defined value. Aggregates do not honor the maximum reject count.
Snippet
C++ btestbulk.cpp
// If SetMaximumRejectCount() fails.
if ((status = btrieveBulkRetrieveAttributes.SetMaximumRejectCount(MAX_X - MIN_X + 1)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetMaximumRejectCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkRetrieveAttributes.SetMaximumRejectCount(max_x - min_x + 1)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveBulkRetrieveAttributes::SetMaximumRejectCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
bfilter.cpp, and btestbulk.cpp.

◆ SetSkipCurrentRecord()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetSkipCurrentRecord ( bool skipCurrentRecord)

Set skip current record.

Parameters
[in]skipCurrentRecordSkip current record?
Description
Skip current record is disabled by default.
Snippet
C++ btestbulk.cpp
// If SetSkipCurrentRecord() fails.
if ((status = btrieveBulkRetrieveAttributes.SetSkipCurrentRecord(false)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetSkipCurrentRecord():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkRetrieveAttributes.SetSkipCurrentRecord(False)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveBulkRetrieveAttributes::SetSkipCurrentRecord():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
bfilter.cpp, and btestbulk.cpp.