java - Oracle Store Procedures Automation -
i working on process of automating creation of store procedure , functions in oracle db using java automate process of creating store procedures such when give table name java code produce procedures :
- select
- insert
- update
- delete
and place them in text files
for example
select * emp emp_id=i_emp_id , emp_nm=i_emp_nm , emp_dpt=i_emp_dpt if 3 inputs not null should function like
select * emp emp_id=i_emp_id , emp_nm=i_emp_nm , emp_dpt=i_emp_dpt if pass i_emp_id null query should function like
select * emp emp_nm=i_emp_nm , emp_dpt=i_emp_dpt if pass i_emp_id null , i_emp_dpt null query should function
select * emp emp_nm=i_emp_nm similarily update etc
i had already posted question on this
can please give me generalised queries select insert update , delete
my input store procedures may vary null or actual values
the issue of table apis problematic. on 1 hand can prevent sql statements being embedded throughout application. on other hand can lead culture of poor practice because cocoon developers acquiring real understanding of database.
either way huge chunk of work biting off. requires lot of understanding of oracle , sql , pl/sql right. , incomplete solution useless. perhaps worse useless.
so, don't write yourself. leading pl/sql expert steven feuerstein has written sophisticated utility generate table apis: quest code generation utility (formerly qnxo). free quest site. find here. true not written in java, what?
Comments
Post a Comment