SQLEP 2.0.0 Tutorial - hudec/sql-processor GitHub Wiki
###The tutorial is updated for SQLP 2.5.0+ and SQLEP 2.0.0+
###Introduction SQLEP grammar syntax have been completely rewritten. The POJO and DAO modeling syntax is not compatible with the previous versions. The primary goal of this change is to model APP layer. This grammar redefinition is one of more steps toward this goal.
To move grammar closer to Java syntax, we have a new set of Meta Control Directives instead of special syntax used in previous SQLEP versions. The Meta Control Directive start with a character #, similar to Java annotations approach (@). Every Meta Control Directive is used in context of some modeling element. So, based on target context, we have
###Package directives
#ImplementationTODO
###Annotation directives
#ConflictTODO#StaticTODO#ConstructorTODO#StandardTODO#SetterTODO#GetterTODO#AttributeTODO
###Implements directives
#GenericsTODO
###POJO and Enum directives TODO
#ToStringTODO#IndexTODO#OperatorsTODO#SerializableTODO#InheritanceChildTODO#EqualsTODO#HashCodeTODO
###POJO attributes directives
#RequiredTODO#PrimaryKeyTODO#InheritanceDiscriminatorTODO#IndexTODO#VersionTODO#UpdateColTODO#CreateColTODO#ToInitTODO#EnumInitTODO#IsDefTODO#EnumDefTODO
###Enum attributes directives
#ValuesTODO
###DAO directives
#SerializableTODO#InheritanceHandlerTODO#CRUDTODO#QueryTODO#FunctionCallQueryTODO#ProcedureCallQueryTODO#FunctionCallTODO#ProcedureUpdateTODO#FunctionQueryTODO
The sample code can be seen at
- https://github.com/hudec/sql-processor/blob/master/simple-samples/simple-hsqldb/src/main/resources/pojo.qry
- https://github.com/hudec/sql-processor/blob/master/simple-samples/simple-hsqldb/src/main/resources/dao.qry
All the SQLP samples in version 2.4.2 have been rewritten using the new SQLEP grammar.