Skip to content

Commit

Permalink
Merge pull request #71 from LinqToDB4iSeries/v5.0.0
Browse files Browse the repository at this point in the history
V5.0.0
  • Loading branch information
nsarris authored Feb 24, 2023
2 parents 71147f3 + cc07cc5 commit 6d5eacc
Show file tree
Hide file tree
Showing 165 changed files with 5,117 additions and 1,705 deletions.
2 changes: 1 addition & 1 deletion Build/linq2db.Default.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>4.4.1</Version>
<Version>5.0.0</Version>

<Description>LINQ to DB is a data access technology that provides a run-time infrastructure for managing relational data as objects. This package is a provider for DB2 on the IBM iSeries.</Description>
<Authors>Roy Chase, Nikos Sarris</Authors>
Expand Down
8 changes: 4 additions & 4 deletions Build/linq2db.Providers.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
<ItemGroup>
<PackageReference Include="Npgsql" />
<PackageReference Include="System.Data.SQLite.Core" />
<PackageReference Include="MySql.Data" Aliases="MySqlData" />
<PackageReference Include="MySqlConnector" Aliases="MySqlConnector" />
<!--<PackageReference Include="MySql.Data" Aliases="MySqlData" />-->
<!--<PackageReference Include="MySqlConnector" Aliases="MySqlConnector" />-->
<PackageReference Include="FirebirdSql.Data.FirebirdClient" />
<PackageReference Include="AdoNetCore.AseClient" />
<!--<PackageReference Include="AdoNetCore.AseClient" />-->
<PackageReference Include="System.Data.SqlClient" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Data.SQLite" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<PackageReference Include="Oracle.ManagedDataAccess" />
<PackageReference Include="Microsoft.SqlServer.Types" />
<!--<PackageReference Include="Microsoft.SqlServer.Types" />-->

<!--<Reference Include="IBM.Data.Informix">
<HintPath>$(MSBuildThisFileDirectory)\..\Redist\IBM\IBM.Data.Informix.dll</HintPath>
Expand Down
3 changes: 1 addition & 2 deletions Build/linq2db.TestProjects.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
<PackageReference Include="System.Linq.Dynamic.Core" />
<!--don't remove, it is used for T4 nugets build-->
<PackageReference Include="Humanizer.Core" />
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
Expand Down
122 changes: 68 additions & 54 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,112 +10,126 @@
-->
<ItemGroup>
<!--as stated in issue 1 - packages in this item group shouldn't be duplicated in other groups-->
<PackageVersion Include="linq2db" Version="4.4.1" />
<PackageVersion Include="linq2db.Tools" Version="4.4.1" />
<PackageVersion Include="linq2db.AspNet" Version="4.4.1" />
<PackageVersion Include="linq2db.Remote.Grpc" Version="4.4.1" />
<PackageVersion Include="linq2db.Remote.Wcf" Version="4.4.1" />
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageVersion Include="linq2db" Version="5.0.0" />
<PackageVersion Include="linq2db.Tools" Version="5.0.0" />
<PackageVersion Include="linq2db.AspNet" Version="5.0.0" />
<PackageVersion Include="linq2db.Remote.Grpc" Version="5.0.0" />
<PackageVersion Include="linq2db.Remote.Wcf" Version="5.0.0" />
<!--generic packages for source projects-->
<!--generic packages for source projects-->
<PackageVersion Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<!--build support-->
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Mono.TextTemplating" Version="2.2.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageVersion Include="Mono.TextTemplating" Version="2.3.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<!--<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />-->
<!--data providers-->
<PackageVersion Include="MySql.Data" Version="8.0.30" />
<PackageVersion Include="MySql.Data" Version="8.0.32" />
<PackageVersion Include="AdoNetCore.AseClient" Version="0.19.2" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.3" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.0.0" />
<PackageVersion Include="System.Data.OleDb" Version="6.0.0" />
<PackageVersion Include="System.Data.Odbc" Version="6.0.0" />
<PackageVersion Include="Oracle.ManagedDataAccess" Version="21.7.0" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.5" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.0" />
<PackageVersion Include="Oracle.ManagedDataAccess" Version="21.9.0" />
<!--3.21 provider currently contains bug which leads to test failures with oracle 12-->
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="2.19.160" />
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="2.19.180" />
<!--<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.70" />-->
<PackageVersion Include="Devart.Data.Oracle" Version="10.0.0" />
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="9.0.2" />
<PackageVersion Include="System.Data.SQLite.Core" Version="1.0.116" />
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="9.1.1" />
<PackageVersion Include="System.Data.SQLite.Core" Version="1.0.117" />
<PackageVersion Include="IBM.Data.DB.Provider" Version="11.5.5010.4" />
<PackageVersion Include="IBM.Data.DB2.Core" Version="3.1.0.600" />
<PackageVersion Include="IBM.Data.DB2.Core-lnx" Version="3.1.0.500" />
<PackageVersion Include="IBM.Data.DB2.Core-osx" Version="3.1.0.500" />
<PackageVersion Include="Net.IBM.Data.Db2" Version="6.0.0.200" />
<PackageVersion Include="Net.IBM.Data.Db2-lnx" Version="6.0.0.200" />
<PackageVersion Include="Net.IBM.Data.Db2-osx" Version="6.0.0.200" />
<PackageVersion Include="Net.IBM.Data.Db2" Version="6.0.0.300" />
<PackageVersion Include="Net.IBM.Data.Db2-lnx" Version="6.0.0.300" />
<PackageVersion Include="Net.IBM.Data.Db2-osx" Version="6.0.0.300" />
<PackageVersion Include="Npgsql" Version="7.0.1" />
<PackageVersion Include="ClickHouse.Client" Version="5.0.4" />
<PackageVersion Include="ClickHouse.Client" Version="6.3.0" />
<PackageVersion Include="Octonica.ClickHouseClient" Version="2.2.9" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="6.0.8" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="160.900.6-rc0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.2" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
<!--tests support-->
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageVersion Include="FluentAssertions" Version="6.7.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="FluentAssertions" Version="6.9.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.4" />
<PackageVersion Include="JetBrains.Profiler.Api" Version="1.1.8" />
<PackageVersion Include="FSharp.Core" Version="6.0.5" />
<PackageVersion Include="FSharp.Core" Version="7.0.0" />
<!--packages for test projects-->
<PackageVersion Include="System.Collections.Immutable" Version="6.0.0" />
<PackageVersion Include="System.Text.Json" Version="6.0.5" />
<PackageVersion Include="System.Collections.Immutable" Version="7.0.0" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.2.22" />
<!--don't update due to https://github.com/OData/WebApi/issues/2653-->
<PackageVersion Include="Microsoft.AspNet.OData" Version="7.5.14" />
<PackageVersion Include="Microsoft.AspNet.OData" Version="7.6.3" />
<!--don't update due to https://github.com/OData/AspNetCoreOData/issues/420#issuecomment-1219208060-->
<PackageVersion Include="Microsoft.AspNetCore.OData" Version="8.0.4" />
<PackageVersion Include="NodaTime" Version="3.1.2" />
<PackageVersion Include="NodaTime" Version="3.1.6" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.2.19" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.2.24" />
<PackageVersion Include="dotMorten.Microsoft.SqlServer.Types" Version="1.5.0" />
<!--
<PackageVersion Include="dotMorten.Microsoft.SqlServer.Types" Version="2.5.0" />
-->
<!--remote targets + remote examples targets-->
<!--source-->
<PackageVersion Include="protobuf-net.Grpc" Version="1.0.171" />
<PackageVersion Include="Grpc.Net.Client" Version="2.48.0" />
<PackageVersion Include="protobuf-net.Grpc" Version="1.0.179" />
<PackageVersion Include="Grpc.Net.Client" Version="2.51.0" />
<!--examples-->
<PackageVersion Include="linq2db.t4models" Version="4.0.0-preview.10" />
<PackageVersion Include="linq2db.t4models" Version="4.3.0" />
<!--tests-->
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.0.152" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.0.179" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<!--linq2db source--><!--
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
--><!--downgrade--><!--

<!--linq2db source-->
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'net46' ">
<!--downgrade-->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.2" />
</ItemGroup>-->

<!--<ItemGroup Condition=" '$(TargetFramework)' != 'net472' ">-->
<ItemGroup>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<!--main version-->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<!--<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />-->
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />

<!--test v1.x compatibility, required for Pomelo EF.Core provider v5 -->
<PackageVersion Include="MySqlConnector" Version="1.3.14" />
<!--v7+ dropped support of netcoreapp3.1 and ns2.0 build is useless as it throws PNSE ¯\_(ツ)_/¯ -->
<PackageVersion Include="System.Data.Odbc" Version="6.0.1" />
<PackageVersion Include="System.Data.OleDb" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageVersion Include="System.Text.Json" Version="6.0.7" />
</ItemGroup>

<!--test dependencies-->
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<!--test v0.x compatibility, required for Pomelo EF.Core provider v3 -->
<PackageVersion Include="MySqlConnector" Version="0.69.10" />
<PackageVersion Include="System.Text.Json" Version="6.0.7" />

<!--<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />-->
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<!--test v1.x compatibility, required for Pomelo EF.Core provider v5 -->
<PackageVersion Include="MySqlConnector" Version="1.3.14" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0' ">
<!--main version-->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />

<PackageVersion Include="System.Data.Odbc" Version="7.0.0" />
<PackageVersion Include="System.Data.OleDb" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net472' AND '$(TargetFramework)' != 'netcoreapp3.1' ">
<PackageVersion Include="MySqlConnector" Version="2.1.13" />
<PackageVersion Include="MySqlConnector" Version="2.2.5" />
</ItemGroup>

</Project>
53 changes: 0 additions & 53 deletions Source/ISeriesProvider/DB2iSeriesAttributeReader.cs

This file was deleted.

9 changes: 5 additions & 4 deletions Source/ISeriesProvider/DB2iSeriesBulkCopy.AccessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ partial class DB2iSeriesBulkCopy : BasicBulkCopy

private BulkCopyRowsCopied ProviderSpecificCopyImpl_AccessClient<T>(
ITable<T> table,
BulkCopyOptions options,
DataOptions dataOptions,
IEnumerable<T> source,
DataConnection dataConnection,
DbConnection connection,
DB2iSeriesAccessClientProviderAdapter adapter,
Action<DataConnection, Func<string>, Func<int>> traceAction)
{
var options = dataOptions.BulkCopyOptions;
var descriptor = dataConnection.MappingSchema.GetEntityDescriptor(typeof(T));
var columns = descriptor.Columns.Where(c => !c.SkipOnInsert || options.KeepIdentity == true && c.IsIdentity).ToList();
var rd = new BulkCopyReader<T>(dataConnection, columns, source);
var rc = new BulkCopyRowsCopied();
var sqlBuilder = dataConnection.DataProvider.CreateSqlBuilder(dataConnection.MappingSchema);
var sqlBuilder = dataConnection.DataProvider.CreateSqlBuilder(dataConnection.MappingSchema, dataOptions);
var tableName = GetTableName(sqlBuilder, options, table);

var columnNames = columns.Select(x => x.ColumnName);
Expand All @@ -51,7 +52,7 @@ private BulkCopyRowsCopied ProviderSpecificCopyImpl_AccessClient<T>(

//*LOB and XML types not supported, fallback to multiple rows
if (columnDataTypes.Any(x => x.In(DataType.Blob, DataType.Text, DataType.NText, DataType.Xml)))
return MultipleRowsCopy(table, options, source);
return MultipleRowsCopy(table, dataOptions, source);

var columnDbDataTypes = columns
.Select((x,i) => x
Expand Down Expand Up @@ -83,7 +84,7 @@ private BulkCopyRowsCopied ProviderSpecificCopyImpl_AccessClient<T>(
//In case columns can't be mapped fall back to multiple rows
catch
{
return MultipleRowsCopy(table, options, source);
return MultipleRowsCopy(table, dataOptions, source);
}

count++;
Expand Down
Loading

0 comments on commit 6d5eacc

Please sign in to comment.