IQuery.

OrderAscending() Method

Summary

Adds an ascending ordering criteria to this node of the query graph.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o.Query
Containing Type
IQuery

Syntax

IQuery OrderAscending()

Remarks

Adds an ascending ordering criteria to this node of the query graph.

If multiple ordering criteria are applied, the chronological order of method calls is relevant: criteria created by 'earlier' calls are considered more significant, i.e. 'later' criteria only have an effect for elements that are considered equal by all 'earlier' criteria.

Ordering by non primitive fields works only for classes that implement the Db4objects.Db4o.TA.IActivatable interface and Db4objects.Db4o.TA.TransparentActivationSupport is enabled.

As an example, consider a type with two int fields, and an instance set {(a:1,b:3),(a:2,b:2),(a:1,b:2),(a:2,b:3)}. The call sequence [orderAscending(a), orderDescending(b)] will result in [(a:1,b:3),(a:1,b:2),(a:2,b:3),(a:2,b:2)].

Return Value

Type Description
IQuery this Db4objects.Db4o.Query.IQuery object to allow the chaining of method calls.