我想使用普通的sql来获取查询,例如:
SELECT * FROM users WHERE fname = ... AND lName = ...
现在我知道我可以做到
this.dsl.fetch(query, "myFirstName", "myLastName");
但是我想使用绑定,所以我可以做
final String query = "SELECT * FROM users WHERE fName = :fname AND lName = :lname";
this.dsl
.fetch(query)
.bind("fname", "MyFirstName")
.bind("lname", "MyLastName");
这可能吗?