Skip to content

Commit 522160c

Browse files
authored
Add GetBytes method with name. (#1197)
1 parent 15a941e commit 522160c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/MySqlConnector/MySqlDataReader.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ public override bool HasRows
227227
public override long GetBytes(int ordinal, long dataOffset, byte[]? buffer, int bufferOffset, int length)
228228
=> GetResultSet().GetCurrentRow().GetBytes(ordinal, dataOffset, buffer, bufferOffset, length);
229229

230+
public long GetBytes(string name, long dataOffset, byte[]? buffer, int bufferOffset, int length)
231+
=> GetResultSet().GetCurrentRow().GetBytes(GetOrdinal(name), dataOffset, buffer, bufferOffset, length);
232+
230233
public override char GetChar(int ordinal) => GetResultSet().GetCurrentRow().GetChar(ordinal);
231234
public char GetChar(string name) => GetChar(GetOrdinal(name));
232235

0 commit comments

Comments
 (0)