Skip to content

Commit d77debd

Browse files
committed
Documentation
1 parent 8ad1ca6 commit d77debd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/org/mybatis/dynamic/sql/render/RenderingStrategy.java

+15
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,20 @@ public String getRecordBasedInsertBinding(BindableColumn<?> column, String prefi
101101
return getFormattedJdbcPlaceholder(column, prefix, parameterName);
102102
}
103103

104+
/**
105+
* This method generates a binding for a parameter to a placeholder in a record based insert statement.
106+
*
107+
* <p>This binding is specifically for use with insert, batch insert, and multirow insert statements and the
108+
* MapToRow mapping. These statements bind parameters to the row class directly.
109+
*
110+
* <p>For MyBatis, a binding looks like this: "#{parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
111+
*
112+
* <p>For Spring, a binding looks like this: ":parameterName"
113+
*
114+
* @param column column definition used for generating type details in a MyBatis binding. Ignored for Spring.
115+
* @param parameterName name of the parameter. Typically, will be
116+
* either "row" or "records[x]" to match the properties of the generated statement object class.
117+
* @return the generated binding
118+
*/
104119
public abstract String getRecordBasedInsertBinding(BindableColumn<?> column, String parameterName);
105120
}

0 commit comments

Comments
 (0)