Release notes for re-motion version 1.13.55

List of Issues

Bugfixes

New Features

Details

[COMMONS-2484] Invalid left outer joins generated for additional from queries with member expressions

Component/s: Data.Linq
Issue Type: Bug
Resolution: Fixed
Status: Closed


The following query should return no results for kitchens without cooks. This requires an inner join to be created, but re-linq currently creates left outer joins.

from k in Kitchens
from c in k.Cooks
select new { k, c }

[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-2540] Support for subqueries that produce non-entity types in from expressions

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


Queries of the form: from c in Cooks from assistantFirstName in (from a in c.Assistants select a.FirstName) select assistantFirstName

Should produce the following SQL:
SELECT [q0].[value] FROM [CookTable] [t0] CROSS JOIN (SELECT [t1].[FirstName] AS [value] FROM [AssistantTable] [t1] WHERE [t1].[AssistedID] = [t0].ID) q0

[COMMONS-2532] Support for the Cast result operator

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


Support for queries of the form: (from c in Cooks select c).Cast<object>() and (from c in Cooks where c.IsStarred select c).Cast<StarredCook>().

[COMMONS-2462] Support for the Contains result operator

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


Support for queries of the following forms: where (from c in restaurant.Cooks select s.FirstName).Contains ("John"), where restaurant.Cooks.Contains (c), where new[] { cook1, cook2, cook3 }.Contains (c)

The SQL generated for the first two queries contains an IN expression with a subquery, the last query results in an IN expression with three constant IDs or entity IDs (depending on whether cook1-3 are constants of references to query sources).

[COMMONS-2427] Support for method calls, with a facility to register own method call translations

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


(no description)

[COMMONS-2358] Support for well-known method calls

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


Support for expressions of the forms:

  • s.FirstName.StartsWith ("x"), s.FirstName.EndsWith ("y"), s.FirstName.Contains ("z"), s.FirstName.Like ("%hugo%")
    This generates SQL LIKE expressions. If StartsWith, EndsWith, and Contains calls hold "_" or "%" characters, those are escaped using SQL ESCAPE. Like is an extension method defined by re-linq's SQL backend; it also allows a way to escape characters.
  • s.FirstName.ContainsFulltext ("x"), s.FirstName.ContainsFreetext ("x")
    This generates SQL CONTAINS and FREETEXT expressions.
  • s.Lower(), s.Upper(), s.Remove (...), s.Substring (...)
    This generates the respective SQL string manipulation expressions.
  • Convert.ToString (s.Age)
    This generates a SQL CONVERT expression.