IConditionGenerator Interface

Exposes methods for handling named entities and generating special conditions.

IConditionGenerator Members

DefaultPhrase Given a semantic type and a value, this method attempts to produce a phrase that, when recognized by this instance of IConditionGenerator, would represent the type and value pair for an entity, relationship, or named entity.
GenerateForLeaf Generates a special query expression for what would otherwise become a leaf query expression.
Initialize Resets any state, and retrieves any necessary information from the schema.
RecognizeNamedEntities Identifies and creates a collection of named entities from an input string.

Remarks

When an object supporting IConditionGenerator has been registered for a semantic type T with a query parser (using the IQueryParser::SetMultiOption method with the SQMO_GENERATOR_FOR_TYPE constant), and that query parser is about to generate a leaf condition node with semantic type T, it will first call the IConditionGenerator::GenerateForLeaf method of the condition generator. If that method returns S_OK, the returned condition tree (which need not be a leaf node) will be used. If it returns S_FALSE, normal processing will be resumed and generate a leaf node.

A query parser has condition generators pre-registered for the known semantic types representing numbers, Booleans, date/time and file paths.

Interface Information

Inherits from IUnknown
Header and IDL files structuredquery.h, structuredquery.idl
Minimum operating systems Windows XP sp2, Windows Server 2003 sp1, Windows Vista