You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Greg Monroe <Gr...@DukeCE.com> on 2006/12/01 17:39:45 UTC

Non-record type queries/ statements ( Was: Torque 4.0 plan)

> -----Original Message-----
> Thomas Fischer said:
> 
> On Thu, 30 Nov 2006, Greg Monroe wrote:
> >
> > Better support for non-record type queries.  I.e., the
> > stuff people do with executeQuery / Village Records.  Queries
> > of this type that come to mind are:
> >
> > - Optimized Join queries that return data from multiple
> >  tables (for creating master lists).
> 
> you mean something like the DoSelectJoinXXX() queries ?
> >

I was probably getting to specific here for a general concept.
By better non-record query support, I meant better general 
support for that the whole set of queries or statements 
that are not single table related.  The example I had in
mind here was to make sure you could represent and run a query
like:

  Select topics.subject as t_title, topics.date as t_date, 
	   users.name as t_poster, posts.subject as last_post, ... 
    from topics, users, posts 
    where (join stuff, etc.) ..

and getting this dynamic record info could be as easy as:

  BaseObject rec = (BaseObject) rs.next();
  String topicTitle = (String) rec.getByName("t_title");

Plus there's a whole categories of INSERT, UPDATE, and DELETE
statements that use subselects or WHERE clauses that have to 
be created with String concats to work now.  Especially with
tables that don't have primary keys.

Now that I've expanded this, I guess the general concept here
is to expand or ensure that the Criteria design can represent
such queries and that there is a clear process for running
them.  Instead of the current "Go figure out the Village layer"
answer that is common today.


Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed.  If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you  please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Non-record type queries/ statements ( Was: Torque 4.0 plan)

Posted by Thomas Vandahl <tv...@apache.org>.
Greg Monroe wrote:
>   BaseObject rec = (BaseObject) rs.next();
>   String topicTitle = (String) rec.getByName("t_title");

This is as "easy" as plain JDBC. This is not what Torque is about. It is
easy enough to work with the populateObject methods. I do this all the
time. The doSelectJoin methods have simplified a lot in my code. So what
if I select columns I don't really need. It is easier to write and
easier to read.

Bye, Thomas.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org