Skip to content

Commit

Permalink
#343 Fixed the failing Integration Tests for SqLite and MySQL.
Browse files Browse the repository at this point in the history
mikependon committed Oct 3, 2020
1 parent 8ee47c4 commit 9d974e0
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions RepoDb.MySql/RepoDb.MySql/DbHelpers/MySqlDbHelper.cs
Original file line number Diff line number Diff line change
@@ -135,16 +135,16 @@ private async Task<DbField> ReaderToDbFieldAsync(DbDataReader reader,
else
{
size = await reader.IsDBNullAsync(5, cancellationToken) ? (int?)null :
await reader.GetFieldValueAsync<int>(5, cancellationToken);
Convert.ToInt32(await reader.GetFieldValueAsync<long>(5, cancellationToken));
}
return new DbField(await reader.GetFieldValueAsync<string>(0, cancellationToken),
await reader.GetFieldValueAsync<bool>(1, cancellationToken),
await reader.GetFieldValueAsync<bool>(2, cancellationToken),
await reader.GetFieldValueAsync<bool>(1, cancellationToken),
Convert.ToBoolean(await reader.GetFieldValueAsync<int>(1, cancellationToken)),
Convert.ToBoolean(await reader.GetFieldValueAsync<int>(2, cancellationToken)),
Convert.ToBoolean(await reader.GetFieldValueAsync<int>(1, cancellationToken)),
DbTypeResolver.Resolve(columnType),
size,
await reader.IsDBNullAsync(6, cancellationToken) ? (byte?)null : byte.Parse((await reader.GetFieldValueAsync<int>(6, cancellationToken)).ToString()),
await reader.IsDBNullAsync(7, cancellationToken) ? (byte?)null : byte.Parse((await reader.GetFieldValueAsync<int>(7, cancellationToken)).ToString()),
await reader.IsDBNullAsync(6, cancellationToken) ? (byte?)null : byte.Parse((await reader.GetFieldValueAsync<ulong>(6, cancellationToken)).ToString()),
await reader.IsDBNullAsync(7, cancellationToken) ? (byte?)null : byte.Parse((await reader.GetFieldValueAsync<ulong>(7, cancellationToken)).ToString()),
await reader.GetFieldValueAsync<string>(8, cancellationToken));
}

4 changes: 2 additions & 2 deletions RepoDb.SqLite/RepoDb.SqLite/DbHelpers/SqLiteDbHelper.cs
Original file line number Diff line number Diff line change
@@ -85,9 +85,9 @@ private async Task<DbField> ReaderToDbFieldAsync(DbDataReader reader,
CancellationToken cancellationToken = default)
{
return new DbField(await reader.GetFieldValueAsync<string>(1, cancellationToken),
await reader.IsDBNullAsync(5, cancellationToken) ? false : reader.GetBoolean(5),
await reader.IsDBNullAsync(5, cancellationToken) ? false : Convert.ToBoolean(await reader.GetFieldValueAsync<long>(5, cancellationToken)),
string.Equals(await reader.GetFieldValueAsync<string>(1, cancellationToken), identityFieldName, StringComparison.OrdinalIgnoreCase),
await reader.IsDBNullAsync(3, cancellationToken) ? true : await reader.GetFieldValueAsync<bool>(3, cancellationToken) == false,
await reader.IsDBNullAsync(3, cancellationToken) ? true : Convert.ToBoolean(await reader.GetFieldValueAsync<long>(3, cancellationToken)) == false,
await reader.IsDBNullAsync(2, cancellationToken) ? DbTypeResolver.Resolve("text") : DbTypeResolver.Resolve(await reader.GetFieldValueAsync<string>(2, cancellationToken)),
null,
null,

0 comments on commit 9d974e0

Please sign in to comment.