Skip to content

Conversation

@GeorgCantor
Copy link

Description

Summary of the change: These changes improve both performance and readability while maintaining the original functionality of the code.

Detailed description:

Single Check for Iterator: We store the result of iterator.hasNext() in hasElements to avoid multiple calls.

Streamlined Column Type Handling: We use columnTypes.size instead of singleOrNull() for clarity and efficiency.

Helper Function for Operator Appending: The appendOperator function reduces redundancy in appending SQL operators based on whether it's an IN or NOT IN operation.

Concise Empty List Handling: The handling of an empty list is more straightforward, directly returning after appending the appropriate boolean value.


Type of Change

Please mark the relevant options with an "X":

  • Bug fix
  • New feature
  • Documentation update

Updates/remove existing public API methods:

  • Is breaking change

Affected databases:

  • MariaDB
  • Mysql5
  • Mysql8
  • Oracle
  • Postgres
  • SqlServer
  • H2
  • SQLite

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant