Feature #1653
Feature #1651: add support for dynamic database features
add conversion and runtime support for dynamically prepared queries
100%
Subtasks
History
#1 Updated by Eric Faulhaber over 11 years ago
This feature will require dynamic (runtime) conversion of the CREATE QUERY statement.
#2 Updated by Greg Shah over 11 years ago
- Target version set to Milestone 7
#3 Updated by Ovidiu Maxiniuc over 11 years ago
- File om_upd20130121a.zip added
- Status changed from New to WIP
I have wrote more than needed code. As the creation of the query is dynamic, one cannot do much with the created queries, I also added the dynamic manipulation routines (method attributes) for these queries. I did a search on redmine and I did not find any issue created about ADD-BUFFER
, SET-BUFFERS
, QUERY_PREPARE
, QUERY-OPEN
and QUERY_CLOSE
methods, so I added the conversion implementation and stubs for runtime. I believe they will be eventually needed and implemented. I currently added these features to com.goldencode.p2j.persist.AbstractQuery
. I am not sure if this is the right place for runtime implementation. Please advise.
Also, I added a stub-implementation for DELETE OBJECT
that I needed to get my testcase converted and then compiled into java. Probably this is not the place and not the right way to implement it. Please let me know, I will more / remove the respective code.
#4 Updated by Ovidiu Maxiniuc over 11 years ago
- File om_upd20130122a.zip added
Oops, I forgot to add the new query_definitions.rules file.
#5 Updated by Ovidiu Maxiniuc about 11 years ago
- File om_upd20130129c.zip added
Changed code to take advantage of new handle implementation.
In fact some support was already there, written by Constantin. I only merged the code and fix eventually issues.
#6 Updated by Eric Faulhaber about 11 years ago
Code review 20130129c:
I too am concerned that P2JQuery and AbstractQuery may not be the correct targets for all of the dynamic query methods you have added. The class hierarchy that implements the P2JQuery interface is really about the operation of a query once it has been defined, either statically (in which case the classes in this hierarchy are instantiated directly in the converted code), or dynamically (in which case we will instantiate the appropriate class from this hierarchy behind the scenes, based on the runtime conversion of the string we get in PREPARE-QUERY).
For now, let's leave it as is, because Vadim also is adding query-related methods and attributes to this hierarchy and I don't want these methods to be scattered across multiple classes/interfaces at this time. Ultimately, however, we may want to introduce a new DynamicQuery interface for these and move the static createQuery
methods and the implementation of the new instance methods from AbstractQuery into a new class (QueryFactory?). Once we have a chance to integrate and review all the new code, it should be easier to determine where things belong.
BTW, the version of handle.java here is identical with the latest version in bzr. Did you mean to include a different one?
#7 Updated by Eric Faulhaber about 11 years ago
Also regarding 20130129c: you mentioned a DELETE OBJECT conversion above, but I did not see this in the code. Did I just miss it, or are there files missing?
#8 Updated by Constantin Asofiei about 11 years ago
Also regarding 20130129c: you mentioned a DELETE OBJECT conversion above, but I did not see this in the code. Did I just miss it, or are there files missing?
The conversion of the DELETE OBJECT
statement is implemented part of the #1920/#1921 work, so there is nothing else to do. This statement can receive as paramater only a handle instance, and gets converted to HandleOps.delete
. Here, depending on the resource referenced by the handle, actual resource deletion is performed. Currently, DELETE OBJECT is implemented only for persistent procedures.
#9 Updated by Eric Faulhaber about 11 years ago
- Subject changed from add conversion and runtime support for CREATE QUERY statement to add conversion and runtime support for dynamically prepared queries
#10 Updated by Eric Faulhaber over 10 years ago
- Status changed from WIP to Closed
#11 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 7 to Runtime Support for Server Features