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

LHS argument to queries on fields. More...

#include <oofquery.h>

Inheritance diagram for dbQueryField:
Inheritance graph
[legend]
Collaboration diagram for dbQueryField:
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 embedded query requires replacement. More...
 
 dbQueryField (const dbField *fld)
 
virtual void describe (std::ostream &) const
 
const dbFieldfield () const
 
virtual void getSearchTables (const dbTable *inSchTable, dbTable *&outDiffFieldTable, dbTable *&outRelatedTable) const
 Find tables on which we are searching, if not simply the field's table. More...
 
bool isSimpleIndexedSearch () 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
 
virtual ~dbQueryField ()
 

Static Public Member Functions

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

Public Attributes

const dbFieldmField
 

Static Public Attributes

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

Detailed Description

LHS argument to queries on fields.

Definition at line 572 of file oofquery.h.

Constructor & Destructor Documentation

dbQueryField::dbQueryField ( const dbField fld)
inline

Definition at line 575 of file oofquery.h.

Referenced by clone(), and cloneReplacingTable().

dbQueryField::~dbQueryField ( )
virtual

Definition at line 800 of file oofquery.cpp.

References mField.

Member Function Documentation

dbQueryClause * dbQueryField::clone ( ) const
virtual

Implements dbQueryClause.

Definition at line 806 of file oofquery.cpp.

References dbQueryField().

Referenced by dbQueryBinary::dbQueryBinary(), and dbQueryTrinary::dbQueryTrinary().

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

conditionally clone if embedded query requires replacement.

Reimplemented from dbQueryClause.

Definition at line 871 of file oofquery.cpp.

References dbQueryField(), dbTable::field(), dbField::fieldNumber(), dbField::fieldTable(), mField, and dbTable::tableNumber().

Referenced by dbQueryBinary::cloneReplacingTable(), and dbQueryTrinary::cloneReplacingTable().

void dbQueryField::describe ( std::ostream &  ) const
virtual
const dbField* dbQueryField::field ( ) const
inline
void dbQueryField::getSearchTables ( const dbTable inSchTable,
dbTable *&  outDiffFieldTable,
dbTable *&  outRelatedTable 
) const
virtual

Find tables on which we are searching, if not simply the field's table.

Copes with two situations: 1) a search is being performed given a clause written on a different table, and we just need to map tables across

2) searches on related tables

Reimplemented from dbQueryClause.

Definition at line 835 of file oofquery.cpp.

References dbTable::baseTableOfRelationChain(), dbField::fieldName(), dbField::fieldTable(), dbTable::lhsTableInRelationshipSpec(), mField, dbConnect::raise(), dbTable::tableName(), and dbTable::tableNumber().

Referenced by dbQueryBinary::getSearchTables(), and dbQueryTrinary::getSearchTables().

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().

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 dbQueryField::queryClauseType ( ) const
virtual
bool dbQueryClause::wildcardsInString ( const char *  schStr)
staticinherited

Member Data Documentation

const dbField* dbQueryField::mField

Definition at line 591 of file oofquery.h.

Referenced by cloneReplacingTable(), describe(), getSearchTables(), and ~dbQueryField().

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

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