technophobia/substeps-database — pull request #3 by alanraison (2013-06-05 08:30:17+00:00)
Title: Named queries

Hi

I've added the concept of "Named Queries": statements that can be pre-defined in a specified properties file and looked up by name; these can be executed directly as queries or updated using `ExecuteNamedQuery ""` or `ExecuteNamedUpdate ""` if they do not contain parameters.

If you have JDBC parameters in the query (? markers) then you should use `FetchNamedQuery` to lookup the query and create a prepared statement, then use a series of `AddParameter value=""` steps, followed by `ExecuteQuery` or `ExecuteUpdate` depending on the type of statement.

I have implemented as many `AddParameter` steps as there are type converters in the substeps-api project (but these don't appear to handle `null`s well, so I have also created `AddParameter value=null` steps (note the lack of quotation marks))

There is basic testing around the substeps, but this should be improved, as should the handling of escaped quotes within values.

I hope that's all OK.

Alan