spring-data-r2dbc
spring-data-r2dbc copied to clipboard
Supporting SQL Function around inserting value in Criteria
We can use annotation to insert value in function:
data class Doc(
@Id id: Long,
english: String,
@Fun("translate('french', english)") french: String
)
in annotation Fun("translate('french', ?)") we can select character "?" and get value from any primitive type of "french" field
then repository.save(doc)
generate:
insert into doc(id,english,french) values(123, 'good day', translate('french', english))
this will greatly simplify the logic and source code.
Thanks for your suggestion. Spring Data R2DBC depends on Spring Data Relational that is hosted together with Spring Data JDBC. Can you file a ticket at https://jira.spring.io/ for DATAJDBC
? We need to have such functionality in Spring Data Relational first.
Ok, is being discussed on https://jira.spring.io/browse/DATAJDBC-468