mattyb149 commented on code in PR #8534:
URL: https://github.com/apache/nifi/pull/8534#discussion_r1531143203
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractQueryDatabaseTable.java:
##########
@@ -90,16 +90,35 @@ public abstract class AbstractQueryDatabaseTable extends
AbstractDatabaseFetchPr
"TRANSACTION_SERIALIZABLE"
);
+ private static final String FETCH_SIZE_NAME = "Fetch Size";
+ private static final String AUTO_COMMIT_NAME = "Set Auto Commit";
+
public static final PropertyDescriptor FETCH_SIZE = new
PropertyDescriptor.Builder()
- .name("Fetch Size")
+ .name(FETCH_SIZE_NAME)
.description("The number of result rows to be fetched from the
result set at a time. This is a hint to the database driver and may not be "
- + "honored and/or exact. If the value specified is zero,
then the hint is ignored.")
+ + "honored and/or exact. If the value specified is zero,
then the hint is ignored. "
+ + "If using PostgreSQL, then '" + AUTO_COMMIT_NAME + "'
must be equal to 'false' to cause '" + FETCH_SIZE_NAME + "' to take effect.")
.defaultValue("0")
.required(true)
.addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
+ public static final PropertyDescriptor AUTO_COMMIT = new
PropertyDescriptor.Builder()
+ .name(AUTO_COMMIT_NAME)
+ .description("Allows enabling or disabling the auto commit
functionality of the DB connection. Default value is 'No value set'. " +
+ "'No value set' will leave the db connection's auto commit
mode unchanged. " +
+ "For some JDBC drivers such as PostgreSQL driver, it is
required to disable the auto commit functionality " +
Review Comment:
Let's build this into the DatabaseAdapter implementations as well, that way
we can ensure it's set properly when required (like with PostgreSQL).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]