db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: feature request
Date Mon, 18 Apr 2005 15:50:04 GMT




Hi Mickey,

I am not quite sure this time, but your query should work out of the box if
you use the CVS version, prepend database names to the Table name in
schema.xml. Henning has done a lot for schema support there. Generate thge
docs by invokin "maven xdoc" in the root of the cvs version and see the
menu item "DB Schema support"

I have no idea how to create such a query on the fly. Maybe something in
the archives of the user list can be found. The main problem seems to me to
create q query where one column value is compared to another column value,
but I am not sure.

Again, in my opinion the code to compose the right query for the join from
a string would be quite difficult. My guess is that a "select * " will not
do and will return the wrong order of columns, leading to disastrous
results.

You might want to create a scarab issue in order that this is not
forgotten, but personally I do not see this code appear in the near future
;-(

    Thomas


"Mickey Mokotov" <mickey@fetchbook.info> schrieb am 18.04.2005 17:28:16:

> Hi there,
>
> It's good to know that we support left joins.
> I still have a problem though - I need to query two different databases
on
> the same query:
> SELECT * FROM db1.tablex, db2.tabley WHERE tablex.a=tabley.b;
>
> I really think we should find a way to allow queries to
> not-yet-supported-selects, it's the second time I'm facing the problem,
and
> it's not a nice one to tackle...
>
> --
> www.FetchBook.Info
> Find the lowest price - Compare more then a hundred book stores in a
click.
>
>
> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Monday, April 18, 2005 2:56 PM
> To: Apache Torque Developers List
> Subject: RE: feature request
>
>
>
>
>
>
> Hi Mickey,
>
> left joins are available in the CVS version, in the Branches HEAD and
> TORQUE_3_1_BRANCH.
>
> I am not sure whether Criteria(String generalSqlString) makes sense, for
the
> following reason : Torque relies on the selected columns being in a
special
> order to create the object, so I would not let the user create the
columns
> to select from as part of the SQL query. To do that, Torque also needs to
> know the table to include in the FROM clause. The columns to select from
and
> the table in the from clause can be obtained from the Peer with which the
> select is done. But if the "Select XXX from YYY" part is autogenerated,
then
> one cannot handle complicated cases like joins.
>
> I can currently not see an acceptable way of how this could be
implemented,
> but I am certainly open to suggestions.  Are there any ?
>
>     Thomas
>
> "Mickey Mokotov" <mickey@fetchbook.info> schrieb am 18.04.2005 15:01:11:
>
> > Hi fellows,
> >
> > Any chance to support Criteria(String generalSqlString), for all the
> > unsupported queries? I need a LEFT JOIN which is unsupported and so I
> > need to construct the objects by hands, instead of letting torque do
> > it.
> >
> > --
> >  <http://www.fetchbook.info/> www.FetchBook.Info
> > Find the lowest price - Compare more then a hundred book stores in a
> click.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>


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


Mime
View raw message