Open brandonwardell20 opened 2 months ago
Is there a use case where we would use this over a named template? Or should I take this issue to utilize the named parameter as it seems this has evolved?
I'm not sure what you mean. The namedTemplate is the mechanism that executes the query. The named parameter, or parameter map is an argument passed as a parameter to the named template..
Sorry, there are two different classes, JdbcTemplate and NamedParameterJdbcTemplate. It seems you can accomplish the same things with both classes, but you can be more exact and explicit with how parameters are handled when you use NamedTemplate. Since the title of the issue only said JdbcTemplate and that is the class you had originally imported, I was uncertain as you used NamedParameterJdbcTemplate elsewhere in newer examples and it seems like it is better.
Ah, yes. In most cases we are going to be using the namedJDBCTemplate.
Here is an example: https://spring.io/guides/gs/relational-data-access
The goal is to force us to write SQL queries to retrieve the data for the API. :)
So all the methods will need to be written with SQL, and use parameters.