OOFILE  1.9
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
dbQueryTrinary Class Reference

Common trinary query for field, eg: People.Salary.between(50000, 90000); Very similar to dbQueryBinary but takes two RHS arguments, typically to specify a range. More...

#include <oofquery.h>

Inheritance diagram for dbQueryTrinary:
Inheritance graph
[legend]
Collaboration diagram for dbQueryTrinary:
Collaboration graph
[legend]

Public Types

enum  BinaryQueryOps {
  equals, notEquals, lessThan, lessThanOrEqual,
  greaterThan, greaterThanOrEqual, startsWith, hasWord,
  hasAnyWord, hasAllWords, hasWordStartsWith, hasAnyWordStartsWith,
  hasAllWordsStartsWith
}
 
enum  QueryClauseTypes {
  binaryfieldToLiteral, binaryfieldTofield, trinaryFieldToLiterals, entireTable,
  atomicfield, atomicLiteral, atomicLiteralStr, multiLiteralStr,
  binaryCombination, builtQuery
}
 
enum  QueryCombinatorialOps { oofAND, oofOR }
 
enum  TrinaryQueryOps { between, outside }
 

Public Member Functions

virtual dbQueryClauseclone () const
 
virtual dbQueryClausecloneReplacingTable (const dbTable *inTable, const dbTable *repTable) const
 conditionally clone if LHS clause requires replacement. More...
 
 dbQueryTrinary (dbQueryField *fld, TrinaryQueryOps op, dbQueryClause *litOrFldFrom, dbQueryClause *litOrFldTo)
 
 dbQueryTrinary (const dbQueryTrinary &)
 
virtual void describe (std::ostream &) const
 
virtual void getSearchTables (const dbTable *inSchTable, dbTable *&outDiffFieldTable, dbTable *&outRelatedTable) const
 
bool isSimpleIndexedSearch () const
 
const dbFieldlhsField () const
 
dbQueryLiteralliteralFromClause () const
 
dbQueryLiteralStrliteralStrFromClause () const
 
dbQueryLiteralStrliteralStrToClause () const
 
dbQueryLiteralliteralToClause () const
 
dbQueryBinaryCombo operator& (const dbQueryClause &) const
 
dbQueryBinaryComboOwneroperator& (dbQueryClause *adoptRHS)
 
dbQueryBinaryCombo operator&& (const dbQueryClause &) const
 
dbQueryBinaryComboOwneroperator&& (dbQueryClause *adoptRHS)
 
dbQueryBinaryCombo operator| (const dbQueryClause &) const
 
dbQueryBinaryComboOwneroperator| (dbQueryClause *adoptRHS)
 
dbQueryBinaryCombo operator|| (const dbQueryClause &) const
 
dbQueryBinaryComboOwneroperator|| (dbQueryClause *adoptRHS)
 
virtual dbQueryClause::QueryClauseTypes queryClauseType () const
 
dbQueryClause::TrinaryQueryOps trinaryOperator () const
 
virtual ~dbQueryTrinary ()
 

Static Public Member Functions

static bool isWordSearch (dbQueryClause::BinaryQueryOps)
 
static bool wildcardsInString (const char *)
 

Static Public Attributes

static char sWildcardMultiple = '*'
 
static char sWildcardSingle = '?'
 

Protected Attributes

dbQueryClausemFrom
 
dbQueryFieldmLhs
 
dbQueryClausemTo
 
TrinaryQueryOps mTrinOp
 

Detailed Description

Common trinary query for field, eg: People.Salary.between(50000, 90000); Very similar to dbQueryBinary but takes two RHS arguments, typically to specify a range.

Definition at line 263 of file oofquery.h.

Constructor & Destructor Documentation

dbQueryTrinary::dbQueryTrinary ( dbQueryField fld,
TrinaryQueryOps  op,
dbQueryClause litOrFldFrom,
dbQueryClause litOrFldTo 
)
inline

Definition at line 265 of file oofquery.h.

Referenced by clone(), and cloneReplacingTable().

dbQueryTrinary::dbQueryTrinary ( const dbQueryTrinary rhs)

Definition at line 680 of file oofquery.cpp.

References dbQueryClause::clone(), dbQueryField::clone(), mFrom, mLhs, and mTo.

dbQueryTrinary::~dbQueryTrinary ( )
virtual

Definition at line 689 of file oofquery.cpp.

References mFrom, mLhs, and mTo.

Member Function Documentation

dbQueryClause * dbQueryTrinary::clone ( ) const
virtual

Implements dbQueryClause.

Definition at line 698 of file oofquery.cpp.

References dbQueryTrinary().

dbQueryClause * dbQueryTrinary::cloneReplacingTable ( const dbTable inTable,
const dbTable repTable 
) const
virtual

conditionally clone if LHS clause requires replacement.

See also
dbQueryBinary::cloneReplacingTable

Reimplemented from dbQueryClause.

Definition at line 746 of file oofquery.cpp.

References dbQueryClause::atomicfield, dbQueryClause::clone(), dbQueryField::cloneReplacingTable(), dbQueryTrinary(), mFrom, mLhs, mTo, mTrinOp, and dbQueryField::queryClauseType().

void dbQueryTrinary::describe ( std::ostream &  ) const
virtual

Implements dbQueryClause.

Definition at line 713 of file oofquery.cpp.

References dbQueryClause::describe(), dbQueryField::describe(), mFrom, mLhs, mTo, and mTrinOp.

void dbQueryTrinary::getSearchTables ( const dbTable inSchTable,
dbTable *&  outDiffFieldTable,
dbTable *&  outRelatedTable 
) const
virtual

Reimplemented from dbQueryClause.

Definition at line 732 of file oofquery.cpp.

References dbQueryField::getSearchTables(), and mLhs.

bool dbQueryClause::isSimpleIndexedSearch ( ) const
inherited

Definition at line 65 of file oofquery.cpp.

bool dbQueryClause::isWordSearch ( dbQueryClause::BinaryQueryOps  inOp)
staticinherited

Definition at line 72 of file oofquery.cpp.

Referenced by OOF_ctreeBackend::CanUseIndex().

const dbField * dbQueryTrinary::lhsField ( ) const
inline
dbQueryLiteral * dbQueryTrinary::literalFromClause ( ) const
dbQueryLiteralStr * dbQueryTrinary::literalStrFromClause ( ) const
dbQueryLiteralStr * dbQueryTrinary::literalStrToClause ( ) const
dbQueryLiteral * dbQueryTrinary::literalToClause ( ) const
dbQueryBinaryCombo dbQueryClause::operator& ( const dbQueryClause rhs) const
inherited

Definition at line 80 of file oofquery.cpp.

References dbQueryClause::oofAND.

dbQueryBinaryComboOwner * dbQueryClause::operator& ( dbQueryClause adoptRHS)
inherited

Definition at line 122 of file oofquery.cpp.

References dbQueryClause::oofAND.

dbQueryBinaryCombo dbQueryClause::operator&& ( const dbQueryClause rhs) const
inherited

Definition at line 87 of file oofquery.cpp.

References dbQueryClause::oofAND.

dbQueryBinaryComboOwner * dbQueryClause::operator&& ( dbQueryClause adoptRHS)
inherited

Definition at line 129 of file oofquery.cpp.

References dbQueryClause::oofAND.

dbQueryBinaryCombo dbQueryClause::operator| ( const dbQueryClause rhs) const
inherited

Definition at line 94 of file oofquery.cpp.

References dbQueryClause::oofOR.

dbQueryBinaryComboOwner * dbQueryClause::operator| ( dbQueryClause adoptRHS)
inherited

Definition at line 108 of file oofquery.cpp.

References dbQueryClause::oofOR.

dbQueryBinaryCombo dbQueryClause::operator|| ( const dbQueryClause rhs) const
inherited

Definition at line 101 of file oofquery.cpp.

References dbQueryClause::oofOR.

dbQueryBinaryComboOwner * dbQueryClause::operator|| ( dbQueryClause adoptRHS)
inherited

Definition at line 115 of file oofquery.cpp.

References dbQueryClause::oofOR.

dbQueryClause::QueryClauseTypes dbQueryTrinary::queryClauseType ( ) const
virtual

Implements dbQueryClause.

Definition at line 725 of file oofquery.cpp.

References dbQueryClause::trinaryFieldToLiterals.

dbQueryClause::TrinaryQueryOps dbQueryTrinary::trinaryOperator ( ) const
inline
bool dbQueryClause::wildcardsInString ( const char *  schStr)
staticinherited

Member Data Documentation

dbQueryClause* dbQueryTrinary::mFrom
protected
dbQueryField* dbQueryTrinary::mLhs
protected
dbQueryClause * dbQueryTrinary::mTo
protected
TrinaryQueryOps dbQueryTrinary::mTrinOp
protected

Definition at line 299 of file oofquery.h.

Referenced by cloneReplacingTable(), describe(), and trinaryOperator().

char dbQueryClause::sWildcardMultiple = '*'
staticinherited
char dbQueryClause::sWildcardSingle = '?'
staticinherited

The documentation for this class was generated from the following files: