Summary
Adds a constraint to this node.
- Assembly
- Db4objects
.Db4o-2010 .dll - Namespace
- Db4objects
.Db4o .Query - Containing Type
- IQuery
Syntax
IConstraint Constrain(Object constraint)
Remarks
Adds a constraint to this node.
If the constraint contains attributes that are not yet present in the query graph, the query graph is extended accordingly.
Special behaviour for:
If the constraint contains attributes that are not yet present in the query graph, the query graph is extended accordingly.
Special behaviour for:
- class
System.Type<T> : confine the result to objects of one class or to objects implementing an interface. -
IEvaluation -instance: run evaluation callbacks against all candidates.
Parameters
Name | Type | Description |
---|---|---|
constraint | Object | the constraint to be added to this Query. |
Return Value
Type | Description |
---|---|
IConstraint |
a new
Db4objects.Db4o.Query.IConstraint
for this
query node or null for objects implementing the
Db4objects.Db4o.Query.IEvaluation
interface.
|