NdbScanFilter Class Reference

#include <NdbScanFilter.hpp>

List of all members.


Detailed Description

A simple way to specify filters for scan operations.

Note:
This filter interface is under development and may change in the future!

Public Types

Public Member Functions

Grouping
Integer Comparators

Member Enumeration Documentation

Group operators

Enumerator:
AND  (x1 AND x2 AND x3)
OR  (x1 OR x2 OR X3)
NAND  NOT (x1 AND x2 AND x3).
NOR  NOT (x1 OR x2 OR x3).

Enumerator:
COND_LE  lower bound
COND_LT  lower bound, strict
COND_GE  upper bound
COND_GT  upper bound, strict
COND_EQ  equality
COND_NE  not equal
COND_LIKE  like
COND_NOT_LIKE  not like


Constructor & Destructor Documentation

NdbScanFilter::NdbScanFilter ( class NdbOperation op,
bool  abort_on_too_large = true,
Uint32  max_size = NDB_MAX_SCANFILTER_SIZE_IN_WORDS 
)

Constructor

Parameters:
op The NdbOperation that the filter belongs to (is applied to).
abort_on_too_large abort transaction on filter too large default: true
max_size Maximum size of generated filter in words


Member Function Documentation

int NdbScanFilter::begin ( Group  group = AND  ) 

Begin of compound. ®return 0 if successful, -1 otherwize

int NdbScanFilter::end (  ) 

End of compound. ®return 0 if successful, -1 otherwize

int NdbScanFilter::istrue (  ) 

Explanation missing

int NdbScanFilter::isfalse (  ) 

Explanation missing

int NdbScanFilter::cmp ( BinaryCondition  cond,
int  ColId,
const void *  val,
Uint32  len = 0 
)

Compare column ColId with val

int NdbScanFilter::eq ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for equal ®return 0 if successful, -1 otherwize

int NdbScanFilter::ne ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for not equal. ®return 0 if successful, -1 otherwize

int NdbScanFilter::lt ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for less than. ®return 0 if successful, -1 otherwize

int NdbScanFilter::le ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for less than or equal. ®return 0 if successful, -1 otherwize

int NdbScanFilter::gt ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for greater than. ®return 0 if successful, -1 otherwize

int NdbScanFilter::ge ( int  ColId,
Uint32  value 
) [inline]

Compare column value with integer for greater than or equal. ®return 0 if successful, -1 otherwize

int NdbScanFilter::eq ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for equal. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::ne ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for not equal. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::lt ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for less than. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::le ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for less than or equal. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::gt ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for greater than. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::ge ( int  ColId,
Uint64  value 
) [inline]

Compare column value with integer for greater than or equal. 64-bit. ®return 0 if successful, -1 otherwize

int NdbScanFilter::isnull ( int  ColId  ) 

Check if column value is NULL

int NdbScanFilter::isnotnull ( int  ColId  ) 

Check if column value is non-NULL

class NdbError& NdbScanFilter::getNdbError (  )  const

Get filter level error.

Most errors are set only on operation level, and they abort the transaction. The error FilterTooLarge is set on filter level and by default it propagates to operation level and also aborts the transaction.

If option abort_on_too_large is set to false, then FilterTooLarge does not propagate. One can then either ignore this error (in which case no filtering is done) or try to define a new filter immediately.


Documentation generated Mon Sep 29 08:17:50 2008 from mysql source files.
© 2003-2004 MySQL AB