Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Creates a leaf condition node for any value. The returned object supports ICondition and ICondition2.
Syntax
HRESULT CreateLeaf(
[in] REFPROPERTYKEY propkey,
[in] CONDITION_OPERATION cop,
[in] REFPROPVARIANT propvar,
[in, optional] LPCWSTR pszSemanticType,
[in, optional] LPCWSTR pszLocaleName,
[in, optional] IRichChunk *pPropertyNameTerm,
[in, optional] IRichChunk *pOperationTerm,
[in, optional] IRichChunk *pValueTerm,
[in] CONDITION_CREATION_OPTIONS cco,
[in] REFIID riid,
[out] void **ppv
);
Parameters
[in] propkey
Type: REFPROPERTYKEY
The name of the property of the leaf condition as a REFPROPERTYKEY. If the leaf has no particular property, use PKEY_Null.
[in] cop
Type: CONDITION_OPERATION
A CONDITION_OPERATION enumeration. If the leaf has no particular operation, then use COP_IMPLICIT.
[in] propvar
Type: REFPROPERTYKEY
The property value of the leaf condition as a REFPROPERTYKEY.
[in, optional] pszSemanticType
Type: LPCWSTR
The name of a semantic type of the value, or NULL for a plain string. If the newly created leaf is an unresolved named entity, pszSemanticType should be the name of a semantic type, otherwise NULL.
[in, optional] pszLocaleName
Type: LPCWSTR
The name of the locale to be compared, or NULL for an unspecified locale. If propvar does not contain a string value, then pszLocaleName should be LOCALE_NAME_USER_DEFAULT; otherwise, pszLocaleName should reflect the language the string. Alternatively, pszLocaleName could be LOCALE_NAME_INVARIANT.
[in, optional] pPropertyNameTerm
Type: IRichChunk*
A pointer to an IRichChunk that identifies the range of the input string that represents the property. It can be NULL.
[in, optional] pOperationTerm
Type: IRichChunk*
A pointer to an IRichChunk that identifies the range of the input string that represents the operation. It can be NULL.
[in, optional] pValueTerm
Type: IRichChunk*
A pointer to an IRichChunk that identifies the range of the input string that represents the value. It can be NULL.
[in] cco
Type: CONDITION_CREATION_OPTIONS
The condition creation operation of the leaf condition as the CONDITION_CREATION_OPTIONS enumeration.
[in] riid
Type: REFIID
The desired IID of the enumerating interface: either IEnumUnknown, IEnumVARIANT, or (for a negation condition) IID_ICondition.
[out] ppv
Type: void**
Receives a pointer to zero or more ICondition and ICondition2 objects.
Return value
This method does not return a value.
Remarks
For default options, use the CONDITION_CREATION_DEFAULT flag.
If the leaf condition was obtained by parsing a string, one or more of the parameters pPropertyNameTerm, pOperationTerm and pValueTerm may be represented by an IRichChunk interface (obtained through the ICondition::GetInputTerms method). Otherwise all three parameters can be NULL.
For more information about leaf node terms (property, value, and operation), see ICondition::GetInputTerms.
A virtual property has one or more metadata items in which the key is "MapsToRelation" and the value is a property name (which is one expansion of the property). For more information about metadata, see MetaData.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] |
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
| Target Platform | Windows |
| Header | structuredquery.h |
See also
Reference