db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: svn commit: r985704 - in /db/torque/village/trunk: pom.xml src/java/com/workingdogs/village/Column.java src/java/com/workingdogs/village/QueryDataSet.java src/java/com/workingdogs/village/Schema.java src/test/com/workingdogs/village/TestMySQL.java
Date Tue, 17 Aug 2010 19:02:16 GMT
On 17.08.10 09:42, Thomas Fischer wrote:
> -The prepared statement opened in the Schema.schema() method should be
> closed after usage. Preferably using a finally clause.

See lines 154-164 of Schema.java

> - The Schema.schema method is public. One can call it with different values
> of the attributes parameters, so different columns can be cached. This
> problem was probably there before, but in inserts and updates, Torque
> usually uses the same column combinations, so it did not come to the
> surface. I am not sure what will happen if this happens: Is ist just a
> cache miss for the missing columns or will it lead to an error ?

Good point. It will cause a cache miss, then. I could add those columns
to the cache if I detect them.

> - I have no clue what happens when more than one table appears in the
> select clause. I should look at it in more detail.

The populate() method itself will not try to create entries in the
schemaCache. It will just use what is there and otherwise fall back to
the previous behavior. If you want to be sure, it would be the best to
iterate over the databases and their tables and create
TableDataSet(connection, tableName) objects to "warm up" the schema
cache before issuing selects.

> I will be very happy when village will be gone, because I do not understand
> it.

I feel with you. However we *will* need something to replace it or
reinvent it eventually.

Could you do me a favor: If you have a working Torque runtime
environment, could you try to run the test project against Oracle and
the patched village version and give me the results?

Bye, Thomas.

---------------------------------------------------------------------
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