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 AddField (int offset, int length)
 Add a field.
 
Btrieve::StatusCode AddFilter (BtrieveFilter *btrieveFilter)
 Add a filter.
 
Btrieve::StatusCode AddSystemField (Btrieve::SystemField systemField)
 Add a system 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

◆ 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.
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.

◆ 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.
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 zero.
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.
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.