// Read type metadata from database connection
Connection connection = this.dataSource.getConnection();
DatabaseMetaData dbMetadata = connection.getMetaData();
// Determine table name from insert query
TableMetaDataContext context = new TableMetaDataContext();
String tableName = getTableNameFromInsertQuery(insertQuery);
int i = tableName.lastIndexOf('.');
if (i >= 0) {
context.setSchemaName(tableName.substring(0, i));
context.setTableName(tableName.substring(i+1));
} else {
context.setTableName(tableName);
}
context.setAccessTableColumnMetaData(true);
// Try to parse column placeholders
Map<String,String> placeholderMap = null;
try {
placeholderMap = getPlaceholderMap(insertQuery);