Skip to content

Commit

Permalink
Revise code style for MySQLNotFunction (#32963)
Browse files Browse the repository at this point in the history
  • Loading branch information
strongduanmu authored Sep 23, 2024
1 parent 8491a00 commit 70e13e0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ public SqlSyntax getSyntax() {
* @param value value
* @return not operator result
*/
@SuppressWarnings("unused")
public static Long not(final Object value) {
if (null == value) {
return null;
}
if (value instanceof Number) {
return ((Number) value).longValue() == 0 ? 1L : 0L;
return 0 == ((Number) value).longValue() ? 1L : 0L;
}
if (value instanceof Boolean) {
return ((Boolean) value) ? 0L : 1L;
Expand Down

0 comments on commit 70e13e0

Please sign in to comment.