Issue Details (XML | Word | Printable)

Key: NUCRDBMS-432
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Yang ZHONG
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Compile user-defined literals as JDBC parameters for queries

Created: 14/Jul/10 05:38 PM   Updated: 04/Oct/10 02:52 PM
Component/s: Queries
Affects Version/s: 2.1.1
Fix Version/s: None

Environment: Java 5, Linux

Datastore: IBM DB2


 Description  « Hide
Literals in queries could have been compiled/generated as "?"(Prepared Parameter). Here's the demo.

Modify $JAVA_HOME/jre/lib/logging.properties:
2-1. add "DataNucleus.Datastore.Native.level=FINE"
2-2. Assure "java.util.logging.ConsoleHandler.level" at least "FINE"

Run the attached Test Case from
HTTP://WWW.DataNucleus.org/servlet/jira/browse/NUCRDBMS-430

See
SELECT 'org.datanucleus.test.Bool' AS NUCLEUS_TYPE,A0.BOOL,A0.BOOL_ID FROM BOOL A0 WHERE 'Y' = A0.BOOL
which could have been
SELECT 'org.datanucleus.test.Bool' AS NUCLEUS_TYPE,A0.BOOL,A0.BOOL_ID FROM BOOL A0 WHERE ? = A0.BOOL

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 15/Jul/10 07:34 AM
As already pointed out, users should make their literals as parameters if they want it to be a parameter. Far more important things to be doing

Andy Jefferson added a comment - 04/Oct/10 02:52 PM
Change title to something meaningful