Skip to content

Commit

Permalink
Refactor requiresInListPadding to shouldRequireInListPadding
Browse files Browse the repository at this point in the history
Renamed method for better consistency and readability across the codebase. Updated references and documentation to reflect the new method name, improving clarity in its purpose and usage.
  • Loading branch information
nakamura-to committed Jan 6, 2025
1 parent 0b878e8 commit 87f7bc0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ protected void handleIterableValueNode(
}

private <E> Iterable<E> applyInListPadding(ValueNode node, Iterable<E> values) {
if (node.getInNode() == null || !config.getSqlBuilderSettings().requiresInListPadding()) {
if (node.getInNode() == null || !config.getSqlBuilderSettings().shouldRequireInListPadding()) {
return values;
}
Collection<E> valueCollection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ default boolean shouldRemoveBlankLines() {
}

/**
* Indicates whether padding is required for the "IN" list clauses in SQL generation.
* Determines whether padding is required for elements in an "IN" list in SQL queries.
*
* @return {@code true} if padding is required; {@code false} otherwise
* @return true if padding is required for elements in an "IN" list, false otherwise
*/
default boolean requiresInListPadding() {
default boolean shouldRequireInListPadding() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ private void inTripleSubQuery(
}

private <E> Iterable<E> applyInListPadding(List<E> list) {
if (list.isEmpty() || !config.getSqlBuilderSettings().requiresInListPadding()) {
if (list.isEmpty() || !config.getSqlBuilderSettings().shouldRequireInListPadding()) {
return list;
}
int size = list.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down Expand Up @@ -510,7 +510,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down Expand Up @@ -549,7 +549,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public SqlBuilderSettings getSqlBuilderSettings() {
return new SqlBuilderSettings() {

@Override
public boolean requiresInListPadding() {
public boolean shouldRequireInListPadding() {
return true;
}
};
Expand Down

0 comments on commit 87f7bc0

Please sign in to comment.