mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
wbemprox: Add support for negated expressions in WHERE clauses.
This commit is contained in:
parent
14bc54d536
commit
d0d9b9dcd7
@ -250,6 +250,15 @@ static HRESULT eval_unary( const struct table *table, UINT row, const struct com
|
||||
UINT column;
|
||||
LONGLONG lval;
|
||||
|
||||
if (expr->op == OP_NOT)
|
||||
{
|
||||
hr = eval_cond( table, row, expr->left, &lval, type );
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
*val = !lval;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
hr = get_column_index( table, expr->left->u.propval->name, &column );
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
|
@ -53,7 +53,8 @@ enum operator
|
||||
OP_NE = 8,
|
||||
OP_ISNULL = 9,
|
||||
OP_NOTNULL = 10,
|
||||
OP_LIKE = 11
|
||||
OP_LIKE = 11,
|
||||
OP_NOT = 12
|
||||
};
|
||||
|
||||
struct expr;
|
||||
|
@ -318,6 +318,12 @@ expr:
|
||||
if (!$$)
|
||||
YYABORT;
|
||||
}
|
||||
| TK_NOT expr
|
||||
{
|
||||
$$ = expr_unary( ctx, $2, OP_NOT );
|
||||
if (!$$)
|
||||
YYABORT;
|
||||
}
|
||||
| prop_val TK_EQ const_val
|
||||
{
|
||||
$$ = expr_complex( ctx, $1, OP_EQ, $3 );
|
||||
|
Loading…
Reference in New Issue
Block a user