DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCRDBMS-432
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
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: 09/Apr/15 08:17 AM   Resolved: 08/Apr/15 07:09 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

Andy Jefferson added a comment - 08/Apr/15 07:09 PM
I still don't see the point in this when a user has the ability to put literals in as query parameters (a better way of doing things also, so their query is then more cacheable). Consequently "won't fix"