Release notes for re-motion version 1.13.50

List of Issues

New Features

Details

[COMMONS-2313] New Sql Backend

Component/s: Data.Linq
Issue Type: New Feature
Resolution: Unresolved
Status: Open
FixVersion: re-linq vNext


The new SQL backend should both be a good example of how to approach SQL generation using the new re-linq front-end (QueryModel, usw.) and provide a sound, extensible architecture backing re-store's LINQ provider.

It will sport SQL generation in three phases:

  • The first phase will take a query model and translate it into a SqlStatement model. SqlStatement is modeled to express the syntactical possibilities and constraints of actual SQL statements.
  • The second phase will allow an O/R mapper to resolve all elements of the SqlStatement into SQL-specific items such as tables or columns with names and aliases.
  • The third phase will then take the resolved SqlStatement and produce actual SQL text (and parameters).

LINQ providers will be able to hook into each of the three steps for customization, optimization, and advanced query transformations.

[COMMONS-2426] Support for boolean expressions

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support queries of the forms: select c.IsStarredCook, select c.FirstName == "John", where c.IsStarredCook, where c.IsStarredCook == (c.FirstName == "John"), select true, where false || (c.FirstName == "John"), and similar

The SQL generated for such queries depends on the context of the boolean expression. "True" and "False" constants are represented as 1 and 0 values; when a boolean expression should be used as a value, a CASE WHEN expression is emitted; when a boolean column should be used as a predicate, it is compared to 1.

[COMMONS-2402] Support for additional from clauses

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support for queries of the form: from s in Students from s2 in Students select ...
This query results in a SQL query with multiple from table sources separated by CROSS JOIN.

Support for queries of the form: from s in Students from s2 in s.Friends select ...
This query results in a SQL query with multiple from table sources separated by INNER JOIN.

[COMMONS-2368] Support for where clauses

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support for queries of the form: from s in ... where s.ID == 0 where s.FirstName == "hugo" select s

This generates a single SQL WHERE clause; the conditions are combined via AND.

[COMMONS-2366] Support for Count, Distinct, First, Take, Single

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support for expressions of the form: (from s in ... select s).Count(), etc.
Such result operators insert COUNT, DISTINCT, and TOP clauses in the generated SQL statement.

[COMMONS-2356] Support for unary not expression, negate expression, unary plus expression

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support for expressions of the form: select !(s.FirstName == "Hugo"), -s.Age, +s.Age.
The SQL generated for these expressions contains a SQL NOT expression, -, and +.

[COMMONS-2354] Support for binary expressions

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Support for expressions of the following form: select s.FirstName + " " + s.LastName.

The SQL generated for this expression is a SQL concatenation. Only binary operators also provided by SQL are supported, other operators yield an exception.

If the select expression of a query yields a boolean value, a CASE SQL expression is generated, returning 1 for true expressions and 0 for untrue expressions.

If the expression compares a column or value with the constant value NULL, an IS NULL or IS NOT NULL SQL expression is generated.