This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When I run this query
QueryExpression query = Entity.Attribute("HireDate") >= new DateTime(1994, 1, 1);
does it bring back all the entries and then filter them with linq or does it actually execute this query in the simpledb?
because I didnt think you can have datatypes (in this case datetime)
Vert curious as it will determine whether I use it or not
|
|
|
You can check the generated queries by setting the LightSpeedContext.Logger = new TraceLogger(). This will dump the generated SimpleDB queries to the Output window so you can review them and see exactly what LightSpeed is doing. In the case you have described, we execute the query in SimpleDB -- we do NOT bring back all the entries. In fact, I am pretty sure we do not have any scenarios where we would bring back all the entries and filter them on the client -- because of the potential efficiency (and cost) implications, we would prefer to fail the query rather than silently bring back millions of items and throw most of them away! You are correct that SimpleDB does not support data types. LightSpeed handles this by formatting any data it stores so that it can be lexically compared -- i.e. so that the string comparison that SimpleDB always uses will have the same effect as a typed comparison. E.g. in your example the query sent to SimpleDB would include "HireDate > 1994-01-01T12:00:00.000" and DateTimes are always stored in ISO8601 sortable format. For more info see Help Topics > Databases > Amazon SimpleDB > Data Storage in the help file. |
|
|
haha.. Genius I was just thinking of some crazy method to start logically ordering strings by date parts and multiple dynamic where statements.. Very clever design.. you just sold yourself a licence! 10 out 10 badgers
|
|