[weld-dev] SQL framework proof of concept
Arbi Sookazian
asookazian at gmail.com
Thu Nov 26 19:13:03 EST 2009
query.where( and( eq( fromUsers.get(users.username), usernameParameter ),
eq( fromUsers.get(users.password),
passwordParameter ) ) );
what about left/right outer joins?
On Thu, Nov 26, 2009 at 4:05 PM, Arbi Sookazian <asookazian at gmail.com>wrote:
> Not too bad, but that makes sense if I have a tool that shows me the native
> sql generated by the query. or better yet, I write a native sql statement
> (say a query) and it reverse engineers it into the typesafe syntax you have
> in your API.
>
> honestly, this:
>
>
> From<users> u = query.from(users.table);
> Join<permissions> p = fromUser.join(permissions.
>>
>> table)
>> p.on( eq( u.get(users.id), p.get(permissions.userId) ) );
>
>
> seems a little busy and difficult to "swallow"...
>
>
> On Thu, Nov 26, 2009 at 12:36 PM, Gavin King <gavin.king at gmail.com> wrote:
>
>> On Thu, Nov 26, 2009 at 3:16 PM, Marcus Smedman <marcus at smedman.org>
>> wrote:
>>
>> > Regarding the seam-sql I added a Drop (to speed up my small tests),
>> Alter
>> > (to add foreign keys) and a Join (a bit messy when/if using aliases) to
>> try
>> > to understand how Gavin had did the other stuff. There’s a lot of stuff
>> I
>> > don’t fully understand… (is a join an Expression for example?).
>>
>> Join is probably a subclass of From:
>>
>> From<users> u = query.from(users.table);
>> Join<permissions> p = fromUser.join(permissions.table)
>> p.on( eq( u.get(users.id), p.get(permissions.userId) ) );
>>
>> Does that make sense?
>>
>>
>>
>> --
>> Gavin King
>> gavin.king at gmail.com
>> http://in.relation.to/Bloggers/Gavin
>> http://hibernate.org
>> http://seamframework.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20091126/70e90353/attachment.html
More information about the weld-dev
mailing list