Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ElSql was built as part of OpenGamma, the open source platform for financial analytics. As such, there is lots of available open source code to learn from.
This example looks at the insertion of a document into two tables in the database.
The named blocks being used are "Insert" and "InsertDate". The basic SQL in those blocks should be simple enough to understand as there are no special embedded tags.
The source code sets up the SqlParameterSource and then calls
getElSqlBundle().getSql("Insert", docArgs); to obtain the named block of SQL. This is then simply used as SQL to pass to Spring's NamedParameterJdbcTemplate.