for (StatementExecutionVariable variable : variables) {
String value = temporary ? variable.getTemporaryValueProvider().getValue() : variable.getValue();
GenericDataType genericDataType = temporary ? variable.getTemporaryValueProvider().getDataType() : variable.getDataType();
if (!StringUtil.isEmpty(value)) {
RegionalSettings regionalSettings = RegionalSettings.getInstance(connectionHandler.getProject());
if (genericDataType == GenericDataType.LITERAL) {
value = StringUtil.replace(value, "'", "''");
value = "'" + value + "'" ;
} else if (genericDataType == GenericDataType.DATE_TIME){
DatabaseMetadataInterface metadataInterface = connectionHandler.getInterfaceProvider().getMetadataInterface();
try {
Date date = regionalSettings.getFormatter().parseDateTime(value);
value = metadataInterface.createDateString(date);
} catch (ParseException e) {
try {
Date date = regionalSettings.getFormatter().parseDate(value);
value = metadataInterface.createDateString(date);
} catch (ParseException e1) {
addError(variable, "Invalid date");
}
}
} else if (genericDataType == GenericDataType.NUMERIC){
try {
regionalSettings.getFormatter().parseNumber(value);
} catch (ParseException e) {
addError(variable, "Invalid number");
}
} else {