| toc |
| <mm:constraint>
Applies a constraint to the query of the surrounding nodelist container.
(since: MMBase-1.7)
|
| see also | listnodescontainer | listcontainer | querycontainer | ageconstraint | composite |
| attributes |
-
field
The field to which the constraint must be applied.
-
field2
Another field the field is to be compared with.
-
value
The value the field is to be compared with.
-
referid
The value the field is to be compared.
-
value2
Needed for BETWEEN operator.
-
referid2
Needed for BETWEEN operator.
-
inverse
Inverses the constraint. So adds a NOT.
-
casesensitive
Changes the given constraint's `case sensitivity' (if applicable). Default it is false.
-
part
(since: MMBase-1.8)
Designates a part of a date field to compare.
| CENTURY | |
| YEAR | |
| MONTH | |
| QUARTER | |
| WEEK | |
| DAY | |
| DAYOFYEAR | |
| DAYOFMONTH | |
| DAYOFWEEK | |
| HOUR | |
| MINUTE | |
| SECOND | |
-
operator
The operator to be used in the comparison. Defaults to `='
| EQUAL | |
| = | |
| LESS | |
| < | |
| LESS_EQUAL | |
| <= | |
| GREATER | |
| > | |
| GREATER_EQUAL | |
| >= | |
| LIKE | |
| BETWEEN | Should also use value2 or referid2 |
| IN | The value can be a comma separated String of values. You can also refer to some list with `referid' (e.g. to a nodelist tag) |
| NULL | Tests whether the value of the field is NULL (or NOT NULL if inverse="true"). The `value' attributes are ignored. |
|
| querycontainerreferrer attributes | |
| containerreferrer attributes |
|
|
example 1 |
<mm:listnodescontainer type="people">
<mm:composite operator="OR">
<mm:constraint field="username" value="admin" operator="LIKE" />
<mm:constraint field="username" value="test" operator="LIKE" />
</mm:composite>
<mm:listnodes>
<mm:field name="username" /> <br />
</mm:listnodes>
</mm:listnodescontainer>
|