SQLEP 1.7.7 Tutorial - hudec/sql-processor GitHub Wiki
##The tutorial is updated for SQLEP 1.7.7+
###Introduction The new features of the SQL Processor Eclipse Plugin (SQLEP) version 1.7.5 are the next control directives
- database-lowercase-names
- database-uppercase-names
- pojogen-active-filter
- metagen-active-filter
- daogen--active-filter
###Database based artifacts's name conversion
Using the control directive database-lowercase-names we can force all POJO names to be lowercase regardless the database based artifacts' names case. Using the control directive database-uppercase-names we can force all POJO names to be uppercase regardless the database based artifacts' names case.
###Restrict the set of generated artifacts We can restrict the set of generated artifacts in a couple of ways. For example to generate only the INSERT META SQL statements, we can use
metagen-active-filter "only-insert"
The valid keywords for this control directives are
- only-delete
- only-update
- only-insert
- only-get
- only-select
- only-call
At the same time add the filter value to generated META SQL statements, we can use
metagen-active-filter "only-insert add-filter HSQLDB"
In this case the INSERT statements are accompanied with the filter value HSQLDB, as it can be seen in the next code snippet
INSERT_ROLE(CRUD,final=,inx=Role,outx=Role,tab=role,HSQLDB)=
...
;
Another possibility is to restrict the generated POJOs and/or DAOs to only one or more tables, for example
pojogen-active-filter "only-tables ROLE PERSON"
daogen-active-filter "only-table ROLE"
The common usage scenario is we know, that only one database table was changed - so we want to regenerate only POJO, META SQL and DAO for this table.