On 21/06/10 11:55, Stephen Russell wrote:
> 2010/6/21 Ricardo Aráoz<[email protected]>:
>
>> On 19/06/10 18:51, Publius Maximus wrote:
>>
>>> This is the magic behind sending a LINQ expression from a client to a
>>> SQL server, and the code actually being executed on the server side. I
>>> don't mean like a typical SQL query, where it sends text that needs to
>>> be parsed, in this case, it's the fully "ready to execute"
>>> representation that gets immediately executed.
>>>
>>>
>>>
>> You mean the difference is the sql query gets parsed in the client? Or
>> the coder has to parse it? What's the big advantage of that? Never had
>> problems with an sql query being parsed in the server.
>> And what is a "ready to execute representation"? Do you mean the server
>> does not get to decide the strategy of the query based on resources and
>> such?
>>
> ------------------
>
> Here are a pair of queries that run in linq:
>
> var lambda = people.Join(pets, // outer sequence
> person => person, // inner sequence key
> pet => pet.Owner, // outer sequence key
> (person, pet) =>
> new { OwnerName = person.Name, Pet =
> pet.Name });
>
> // using query expression
> var query = from person in people
> join pet in pets on person equals pet.Owner
> select new { OwnerName = person.Name, Pet = pet.Name };
>
> Currently both are data objects in ram but both can be switched to
> hitting a db by stating the Entity(schema object for the actual disk
> data) before the objectName.
By data objects in ram I assume you mean data sets. If that is so then I
don't see anything new here. From what I see I find sql easier and more
flexible than this approach. And as for querying data sets in ram
there's nothing new about it.
> That Entity below is ET.
>
> var query = from person in ET.people
> join pet in ET.pets on person equals pet.Owner
> select new { OwnerName = person.Name, Pet = pet.Name };
>
> Linq syntax follows more to the actual engine's working of a query statement.
>
And why would we want that? I find it better that my syntax complies to
the logic of my query than to the actual engine's working of a query.
> Process the Where clause, Joins, Where, Order by, Having and then the
> "output" or field list
>
> Where you write the Output first and then package all the other parts
> afterwords.
>
>
Still fail to see any real advantage to all this. If it's just another
ORM, might just as well say it and get done with it.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.