Skip to content

Commit

Permalink
Changed decode to align with mysql connector/j
Browse files Browse the repository at this point in the history
  • Loading branch information
svats0001 committed Nov 18, 2024
1 parent a0a0820 commit 0e96856
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public Boolean decode(ByteBuf value, MySqlReadableMetadata metadata, Class<?> ta

String s = value.toString(metadata.getCharCollation(context).getCharset());

if (s.equalsIgnoreCase("Y") || s.equalsIgnoreCase("yes") ||
if (s.equalsIgnoreCase("Y") || s.equalsIgnoreCase("yes") ||
s.equalsIgnoreCase("T") || s.equalsIgnoreCase("true")) {
return createFromLong(1);
} else if (s.equalsIgnoreCase("N") || s.equalsIgnoreCase("no") ||
} else if (s.equalsIgnoreCase("N") || s.equalsIgnoreCase("no") ||
s.equalsIgnoreCase("F") || s.equalsIgnoreCase("false")) {
return createFromLong(0);
} else if (s.contains("e") || s.contains("E") || s.matches("-?\\d*\\.\\d*")) {
Expand Down

0 comments on commit 0e96856

Please sign in to comment.