|
Visual Basic Query Comprehensions
|
| SQL-Style VB Operator |
LINQ Expression Syntax |
| Project |
Select expr1 From expr2 |
| Alias |
aliasName In objectOrTableName |
| Filter or Restrict |
Where expr1 |
| Test or Quantify |
Any expr1, All expr2 |
| Join |
expr1 [{Left | Right | Outer}] Join expr2 On expr3 = expr4 |
| Group |
Group By expr1 |
| Aggregate |
Count(expr1), Sum(expr1), Avg(expr1), Min(expr1), Max(expr1) |
| Partition |
Top(expr1) |
| Set |
Distinct, Union, Intersect, Except |
| Order |
Order By expr1 [Asc | Desc] |
Table 1 Validate Queries at Compile Time With Comprehensions.
Language Integrated Query (LINQ) for .NET uses query comprehensions to generate lists or scalar values that result from applying methods or functions to a source list. Query comprehensions are a special case of list comprehensions, which are "... a way of describing a list by taking a previously constructed list (the source list), selecting only members that satisfy some given property, and then applying some function to the selected members" (from www.cs.ecu.edu/~karl/astarte/glossary.html). This table's SQL-style operators list predates the initial technology preview for VB 9.0. Some operators, such as Join, aren't included in that release but might appear in later updates.
|