We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please give an example how to use arrays as parameters in dynamic sqls.
Looking at "ParenBindVariableNode.java" seems to be possible to use arrays and lists as parameters.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
You can use the Array property as IN parameter as same as the List property.
For example, here is the Java code to invoke the SQL file which has an IN parameter:
public static class BookNamesParam { public String[] bookNames; } BookNamesParam param = new BookNamesParam(); param.bookNames = new String[]{"Mirage in Action", "Essential Mirage" }; List<Book> results = sqlManager.getResultList( Book.class, SQL_PREFIX + "SqlManagerImplTest_selectByBookNames.sql", param);
The SQL file is below:
SELECT BOOK_ID, BOOK_NAME, AUTHOR, PRICE FROM BOOK /*IF bookName != null*/ WHERE BOOK_NAME IN /*bookNames*/('Mirage in Action') /*END*/
Sorry, something went wrong.
Thank you very much for the very quick response :).
No branches or pull requests
Please give an example how to use arrays as parameters in dynamic sqls.
Looking at "ParenBindVariableNode.java" seems to be possible to use arrays and lists as parameters.
Thanks in advance.
The text was updated successfully, but these errors were encountered: