Skip to content

Commit

Permalink
Simplify type check in SQL statement conversion
Browse files Browse the repository at this point in the history
Replaced explicit type checks for numeric types with a single check for Number. This reduces code complexity and improves maintainability. Boolean type check remains unchanged.
  • Loading branch information
smyrgeorge committed Sep 23, 2024
1 parent 5febb21 commit 3894d76
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interface Statement {
"'${replace("'", "''")}'"
}

is Byte, is Boolean, is Int, is Long, is Short, is Double, is Float -> toString()
is Boolean, is Number -> toString()
else -> {
val error = DbError(
code = DbError.Code.NamedParameterTypeNotSupported,
Expand Down

0 comments on commit 3894d76

Please sign in to comment.