EldorADO.NET Class Library

Eldorado.Object.Query Namespace

[This is preliminary documentation and subject to change.]

Queries can be composed and checked against the domain model. Precisely how a query is to be executed is out of the scope of this aspect (though the semantics of the operators ARE in this scope).

Examples of queries include:

  • select p from Project p
    This query denotes the set of all projets. The result set contains one column named "p" which represents the oid of the project.
    This query can serve several purposes:
  • select p, p.Name, p.Budget from Project p
    This query denotes the set of all projets. The result set contains three columns named "p", "Name" and "Budget" which represent the oid of the project, its name and its budget.
    Contrary to the preceeding query, this query cannot be used with the Collect methods: the columns denoted by this query do not exactly match a particular entity (some columns may be missing to match the "Project" entity). On the other hand, the Fill, GetDataReader and GetCount can perfectly accept such a query.
  • select p from Project p order by p.Budget desc
    This query denotes the set of all projets by decreasing order of budget.
  • select p, p.Name, p.Budget, m.Name as Manager from Project p, p.Manager m
    This query denotes the set of all projets with their manager's name. This query specifies a join "p.Manager m" where "Manager" is a reference declared on type "Project". This is an inner join: only those project that have a manager will be returned.
    The result set contains four columns named "p", "Name", "Budget" and "Manager".
  • select p, p.Name, p.Budget, m.Name as Manager from Project p, p.Manager m where m.Name like ?
    This query denotes the set of all projets with whose manager's name matches a particular parameter.
  • select p, p.Name, p.Budget, m.Name as Manager from Project p, p.Manager? m
    This query denotes the set of all projets with their manager's name. This query specifies an outer join "p.Manager m?" (note the "?" sign): all projects will be returned. Those that do not have a manager will have their column "Manager" set to null.
  • select p, p.Name, p.Budget, m.Name as Manager from Project p, p.Manager? m where m.Name like ? order by p.Budget desc
    This query shows a combination of the different operators seen above.
  • Namespace hierarchy

    Classes

    ClassDescription
    Correlation A variable defined in the from clause of an ObjectPath
    CrossPath Cartesian product in an ObjectPath.
    FilterPath Where clause in an ObjectPath.
    IntersectPath "Where in" or "where not in" clause in an ObjectPath.
    JoinPath Join clause in an ObjectPath.
    ObjectPath The from and where clauses of an ObjectQuery
    ObjectQuery A select query over an ObjectDomain.
    ParseException The type of exception thrown by the query parser.
    ScanPath The from clause of an ObjectQuery.

    Interfaces

    InterfaceDescription
    IObjectPathEvaluator Object that knows how to evaluate an ObjectPath.