Skip to content

Commit

Permalink
fix(queries): remove exception when fetchType is NONE
Browse files Browse the repository at this point in the history
remove exception for NONE

make STORE default for fetchType
  • Loading branch information
mgabelle committed Nov 28, 2024
1 parent 0b11d2a commit e9ac855
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public abstract class AbstractJdbcBaseQuery extends Task implements JdbcQueryInt

@NotNull
@Builder.Default
protected FetchType fetchType = FetchType.NONE;
protected FetchType fetchType = FetchType.STORE;

@Builder.Default
protected Integer fetchSize = 10000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ private long extractResultsFromResultSet(RunContext runContext, AbstractCellConv
.rows(maps)
.size(size);
}
case NONE -> runContext.logger().info("fetchType is set to NONE, no output will be returned");
default -> throw new IllegalArgumentException("fetchType must be either FETCH, FETCH_ONE, STORE, or NONE");
}
totalSize += size;
Expand Down

0 comments on commit e9ac855

Please sign in to comment.