|
|
|
@ -89,20 +89,22 @@ namespace Common.Library.SQL.MySQL
|
|
|
|
|
|
|
|
|
|
if (!DBReader.IsDBNull(columnID))
|
|
|
|
|
{
|
|
|
|
|
const int CHUNK_SIZE = 2 * 1024;
|
|
|
|
|
byte[] buffer = new byte[CHUNK_SIZE];
|
|
|
|
|
long bytesRead;
|
|
|
|
|
long fieldOffset = 0;
|
|
|
|
|
|
|
|
|
|
using (var stream = new MemoryStream())
|
|
|
|
|
{
|
|
|
|
|
while ((bytesRead = DBReader.GetBytes(columnID, fieldOffset, buffer, 0, buffer.Length)) == buffer.Length)
|
|
|
|
|
{
|
|
|
|
|
stream.Write(buffer, 0, (int)bytesRead);
|
|
|
|
|
fieldOffset += bytesRead;
|
|
|
|
|
}
|
|
|
|
|
rv = stream.ToArray();
|
|
|
|
|
}
|
|
|
|
|
// const int CHUNK_SIZE = 2 * 1024;
|
|
|
|
|
// byte[] buffer = new byte[CHUNK_SIZE];
|
|
|
|
|
// long bytesRead;
|
|
|
|
|
// long fieldOffset = 0;
|
|
|
|
|
|
|
|
|
|
// using (var stream = new MemoryStream())
|
|
|
|
|
// {
|
|
|
|
|
// while ((bytesRead = DBReader.GetBytes(columnID, fieldOffset, buffer, 0, buffer.Length)) == buffer.Length)
|
|
|
|
|
// {
|
|
|
|
|
// stream.Write(buffer, 0, (int)bytesRead);
|
|
|
|
|
// fieldOffset += bytesRead;
|
|
|
|
|
// }
|
|
|
|
|
// rv = stream.ToArray();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
rv = (byte[])DBReader[columnID];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
@ -214,5 +216,17 @@ namespace Common.Library.SQL.MySQL
|
|
|
|
|
{
|
|
|
|
|
return GetDateTime(GetOrdinal(columnName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//new MySqlParameter("GUID", MySqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, string.Empty, DataRowVersion.Proposed, guid)
|
|
|
|
|
protected MySqlParameter GetParameter(string columnName, MySqlDbType dataType, ParameterDirection direction, object data)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected MySqlParameter GetParameter(string columnName, MySqlDbType dataType, int size, ParameterDirection direction, object data)
|
|
|
|
|
{
|
|
|
|
|
return new MySqlParameter(columnName, dataType, size, direction, false, 0, 0, string.Empty, DataRowVersion.Proposed, data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|