Skip to content

Commit

Permalink
Improve doc of custom codec
Browse files Browse the repository at this point in the history
- Correct parameter interface from `Parameter` to `MySqlParameter`
- Override `toString()` in the implementation of `MySqlParameter`
  • Loading branch information
mirromutth committed Jan 19, 2024
1 parent 285c8fa commit 95cb678
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public final class JacksonCodec implements Codec<Object> {
return encoding;
}

private static final class JacksonParameter implements Parameter {
private static final class JacksonParameter implements MySqlParameter {

private final ByteBufAllocator allocator;

Expand Down Expand Up @@ -524,6 +524,14 @@ public final class JacksonCodec implements Codec<Object> {
public short getType() {
return DataTypes.VARCHAR;
}

/**
* Optional, for statements/parameters logging.
*/
@Override
public String toString() {
return value.toString();
}
}
}
```
Expand Down

0 comments on commit 95cb678

Please sign in to comment.