A&O Pablo Iñigo 2008-08-11: Integration: System.Data.Linq & DbLinq

0 views
Skip to first unread message

Pablo Iñigo Blasco

unread,
Aug 11, 2008, 2:31:42 PM8/11/08
to mono-s...@googlegroups.com
ACHIEVEMENTS
* To implement some string functions not yet supported (in where clauses): IndexOf, Insert, Remove, Replace, StartsWith, EndsWith (everyone of them supported by the linq2sql engine), taking special attention to SqlServer vendor. [DONE]

* To implement some DateTime and TimeSpam functions not yet supported: [Total]/Day/Month/Year/Second/Minute/Hour, Parse, New, Add, Sub (everyone of them supported by the linq2sql engine), taking special attention to SqlServer vendor.
[PARTIALLY DONE, all of them done except Add and Diff since such implementation they forces to me to implement also few TimeSpan members TotalDays,Days,TotalHours...]

* Continue with the third last week objective: To fix existing tests: making them more coherent regards CLR/System.Data.Linq.dll (this assembly should pass all test, currently it doesn't do it)
[IN PROGRESS,  currently 374 run tests/19 errors/15 failures, so there are still some wrong tests which don't follow "the standard linq2ql behaviour"]

* To build a little report about the state of System.Data.Linq classes exclusive of mono (not existing in DbLinq, ie: DbLinq uses CLR/System.Data.Linq.Mapping namespace) trying to detect potential problems and different behaviours between DbLinq project and Mono/System.Data.Linq.
[CANCELLED: I have invested about it, the only problem found is that f System.Data.Linq.Binary isn't implemented and it causes a few of errors in our tests, with the exception of it both behaviours are identical, so I think that no report is required]

* Try to tackle the following working sample: (Entities comparisons)
from od in db.OrderDetails
where od.Order== X
select ...
[NOT DONE]

BONUS:
* Parse function support for primitive types implemented, we now translate them like a convert expression.
* (primitiveTypeExpression).ToString support implemented, we now translate them to sql   (like in linq2sql)
* Better support for Convert function in Postgre implemented.
* EntitySet bug with Nullables during the building of its query solved.


NEXT WEEK OBJECTIVES:

* To implement Math functions support (abs, exp, floor, ln, log, pow, round, sign, sqrt)  (special attention to sqlserver vendor)

* To implement string.Ltrim, string.Rtrim functions support

* To continue with the third last week objective: To fix existing tests: making them more coherent regards CLR/System.Data.Linq.dll (this assembly should pass all test, currently it doesn't do it)

* To implement TimeSpan.Days/TotalDays/Hour/TotalHour/Minutes/TotalMinutes/Seconds/TotalSeconds/Milliseconds/TotalMilliseconds support
(special attention to sqlserver vendor)

* To implement DateTime Add and Diff functions support
(special attention to sqlserver vendor)

* To check differences between sqlserver and sqlserver express, create a new provider if it is necessary and implement each method.

* To design and implement improvements in expressions executed by the runtime (optimization stage). (Nonetheless I have to propose it in the DbLinq list):

ie: object a=new StrangeObject();
var q in db.Customers where q.CustomerID= a.ToString();

this query doesn't have a sql-translation, but it should work since a.ToString() could be evaluated by the runtime. (this is the behaviour of linq2sql)

In dbLinq this sample doesn't work fine (but it should) since we have to check the coherence of the query in the analysis stage (ie: ToString invoker should be a primitive type) and the optimization stage happens after. We need to send some information from analysis stage to optimization stage, mi proposal is with a ExpressionWrapper:

new MustBeExecutedInClr(baseExpression,delegate(Expression e){e.Type.IsPrimitiveType},new NotSupportedException("ToString can be translated to sql only with primitive types"))

 NOTES:
The most weak points in the current DbLinq implementation are IMHO :
- Grouping expressions (IHMO it should be implemented by Pascal since maybe some architectural changes will be needed)
- Sotred Procedures
- Write/Update/Delete/Object Tracking, they seem work more or less but IMHO there are a lot of work to do yet.
- Transactions Support
- A lot of micro-errors/not supported features, nonetheless they are easier to solve (here is where I am currently working)

Anyway I would like to talk more about the current status in DbLinq mailing list.
Reply all
Reply to author
Forward
0 new messages