Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Ashcraft committed Nov 5, 2024
1 parent c5807c2 commit 664eb51
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,11 @@ public ReadRows withOutputParallelization(boolean outputParallelization) {
return toBuilder().setOutputParallelization(outputParallelization).build();
}

/** Whether to disable auto commit on read. Defaults to true if not provided. */
/**
* Whether to disable auto commit on read. Defaults to true if not provided.
* The need for this config varies depending on the database platform.
* Informix requires this to be set to false while Postgres requires this to be set to true.
*/
public ReadRows withDisableAutoCommit(boolean disableAutoCommit) {
return toBuilder().setDisableAutoCommit(disableAutoCommit).build();
}
Expand Down Expand Up @@ -980,7 +984,11 @@ public Read<T> withOutputParallelization(boolean outputParallelization) {
return toBuilder().setOutputParallelization(outputParallelization).build();
}

/** Whether to disable auto commit on read. Defaults to true if not provided. */
/**
* Whether to disable auto commit on read. Defaults to true if not provided.
* The need for this config varies depending on the database platform.
* Informix requires this to be set to false while Postgres requires this to be set to true.
*/
public Read<T> withDisableAutoCommit(boolean disableAutoCommit) {
return toBuilder().setDisableAutoCommit(disableAutoCommit).build();
}
Expand Down Expand Up @@ -1159,7 +1167,11 @@ public ReadAll<ParameterT, OutputT> withOutputParallelization(boolean outputPara
return toBuilder().setOutputParallelization(outputParallelization).build();
}

/** Whether to disable auto commit on read. Defaults to true if not provided. */
/**
* Whether to disable auto commit on read. Defaults to true if not provided.
* The need for this config varies depending on the database platform.
* Informix requires this to be set to false while Postgres requires this to be set to true.
*/
public ReadAll<ParameterT, OutputT> withDisableAutoCommit(boolean disableAutoCommit) {
return toBuilder().setDisableAutoCommit(disableAutoCommit).build();
}
Expand Down Expand Up @@ -1380,6 +1392,16 @@ public ReadWithPartitions<T, PartitionColumnT> withFetchSize(int fetchSize) {
return toBuilder().setFetchSize(fetchSize).build();
}

/**
* Whether to disable auto commit on read. Defaults to true if not provided.
* The need for this config varies depending on the database platform.
* Informix requires this to be set to false while Postgres requires this to be set to true.
*/
public ReadWithPartitions<T, PartitionColumnT> withDisableAutoCommit(
boolean disableAutoCommit) {
return toBuilder().setDisableAutoCommit(disableAutoCommit).build();
}

/** Data output type is {@link Row}, and schema is auto-inferred from the database. */
public ReadWithPartitions<T, PartitionColumnT> withRowOutput() {
return toBuilder().setUseBeamSchema(true).build();
Expand Down Expand Up @@ -1623,7 +1645,6 @@ private Connection getConnection() throws SQLException {
public void processElement(ProcessContext context) throws Exception {
// Only acquire the connection if we need to perform a read.
Connection connection = getConnection();

// PostgreSQL requires autocommit to be disabled to enable cursor streaming
// see https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor
// This option is configurable as Informix will error
Expand Down

0 comments on commit 664eb51

Please sign in to comment.