db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl <thomas.vand...@tewisoft.de>
Subject Re: Patch TQRS219
Date Mon, 25 Oct 2004 06:33:06 GMT
Hi Thomas,

> Thanks very much for your offer. I'm not sure whether it makes sense if the
> code adjustment task is distributed between different people, but I would
> definitely welcome some help in the documentation.
(Almost) anytime. I didn't think of code adjustment. For some magic 
reason, my changes to Criteria.addJoin() use the same signature and 
constants :-) I offer another test platform.

>>One last thing. I found the handling of inserts a little bit poor. From
>>what I know the "insert into ... select ... from" statement is SQL
>>standard. I thought of something like
>>doInsert(Criteria whichcolumns, Criteria select);
>>Anyone cares to comment?
> I am at a complete loss what above code would do, but I guess this is
> because my limited knowledge in SQL.

Easy. My idea goes like this. ANSI-SQL allows statements like

SELECT address.id, person.id from address, person
   WHERE person.lname='Sherman' and person.fname='P.'
     AND address.street='42 Wallaby Way' and address.city='Sydney'

The select part is delivered by the Criteria object "select" as usual. 
The second Criteria object "whichcolumns" would the table and columns 
where to insert the selected data. This would be very handy for m:n 
relation tables like in the example above, especially if the select 
statement delivers a big number of results.

Bye, Thomas.

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

View raw message