Arguments
Hint
This article is generated by AI translation.
dbVisitor provides multiple ways to pass arguments. This section explains how to use them.
Guide
- Positional Arguments: use
?placeholders in SQL and bind values to the corresponding zero-based index. - Named Arguments: use
:name,&name, or#{...}to name arguments in SQL. - SQL Injection: use
${...}to fetch named arguments and inject the result into SQL text. - Rule-Based Arguments: use
@{...}with the Rule mechanism to elegantly handle common dynamic command cases. - Interface-based Arguments: customize argument setting via interfaces for special scenarios.
Additional Notes
- Argument Options: when using
#{...}orSqlArgfor arguments, you can specify extra options.