Skip to content

Commit

Permalink
Merge pull request #73 from LinqToDB4iSeries/release/v5.1.0
Browse files Browse the repository at this point in the history
Release/v5.1.0
  • Loading branch information
nsarris authored Mar 22, 2023
2 parents e8d1545 + f998c0f commit 68dc75e
Show file tree
Hide file tree
Showing 54 changed files with 1,017 additions and 263 deletions.
6 changes: 1 addition & 5 deletions 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>5.0.0</Version>
<Version>5.1.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 Expand Up @@ -34,10 +34,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' != 'net45' AND '$(TargetFramework)' != 'net46'">
<DefineConstants>NATIVE_ASYNC;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)/BannedSymbols.txt" />
Expand Down
2 changes: 1 addition & 1 deletion Build/linq2db.Source.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net45;net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net45;net472;netstandard2.0;net6.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Build/linq2db.Tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="linq2db.Default.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFrameworks>net6.0;net472</TargetFrameworks>
<Configurations>Debug;Release;</Configurations>
<DefineConstants>$(DefineConstants)</DefineConstants>
<DefineConstants Condition="$(X86) != ''">$(DefineConstants);X86</DefineConstants>
Expand Down
91 changes: 47 additions & 44 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,35 @@
-->
<ItemGroup>
<!--as stated in issue 1 - packages in this item group shouldn't be duplicated in other groups-->
<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-->
<PackageVersion Include="linq2db" Version="5.1.0" />
<PackageVersion Include="linq2db.Tools" Version="5.1.0" />
<PackageVersion Include="linq2db.AspNet" Version="5.1.0" />
<PackageVersion Include="linq2db.Remote.Grpc" Version="5.1.0" />
<PackageVersion Include="linq2db.Remote.Wcf" Version="5.1.0" />
<!--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" />
<!--Source of NullabilityInfoContext for runtimes before .net 6-->
<PackageVersion Include="Nullability.Source" Version="2.1.0" />
<!--build support-->
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.5-beta1.23080.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<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" />-->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<!--data providers-->
<PackageVersion Include="MySql.Data" Version="8.0.32" />
<PackageVersion Include="MySql.Data" Version="8.0.32.1" />
<PackageVersion Include="AdoNetCore.AseClient" Version="0.19.2" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.5" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.0" />
<!--don't use 5.0.1 version due to critical bug in it-->
<PackageVersion Include="Oracle.ManagedDataAccess" Version="21.9.0" />
<!--3.21 provider currently contains bug which leads to test failures with oracle 12-->
<!--3.21 provider currently contains bug which leads to test failures with oracle 12+-->
<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="Oracle.ManagedDataAccess.Core" Version="3.21.90" />-->
<PackageVersion Include="Devart.Data.Oracle" Version="10.1.134" />
<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" />
Expand All @@ -47,43 +48,40 @@
<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="6.3.0" />
<PackageVersion Include="Octonica.ClickHouseClient" Version="2.2.9" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.2" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
<PackageVersion Include="Npgsql" Version="7.0.2" />
<PackageVersion Include="ClickHouse.Client" Version="6.5.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.3" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
<!--tests support-->
<PackageVersion Include="NUnit" Version="3.13.3" />
<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="NUnit3TestAdapter" Version="4.4.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageVersion Include="FluentAssertions" Version="6.10.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.5" />
<PackageVersion Include="JetBrains.Profiler.Api" Version="1.1.8" />
<PackageVersion Include="FSharp.Core" Version="7.0.0" />
<PackageVersion Include="FSharp.Core" Version="7.0.200" />
<!--packages for test projects-->
<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.6.3" />
<PackageVersion Include="Microsoft.AspNet.OData" Version="7.6.4" />
<!--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.6" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.2.24" />
<PackageVersion Include="dotMorten.Microsoft.SqlServer.Types" Version="1.5.0" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.3.1" />
<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.179" />
<PackageVersion Include="Grpc.Net.Client" Version="2.51.0" />
<!--examples-->
<PackageVersion Include="linq2db.t4models" Version="4.3.0" />
<PackageVersion Include="linq2db.t4models" Version="4.3.0" />
<!--tests-->
<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" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<!--linq2db source-->
Expand All @@ -94,35 +92,35 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<!--main version-->
<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" />
<PackageVersion Include="protobuf-net.Grpc" Version="1.0.179" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.0.179" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net45' AND '$(TargetFramework)' != 'net46' ">
<!--main version-->
<!--
pin abstractions packages to lowest supported runtime (.net 6 currently)
https://github.com/linq2db/linq2db/issues/3953
-->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
</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" />
<PackageVersion Include="System.Text.Json" Version="7.0.2" />
</ItemGroup>

<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" />
Expand All @@ -132,4 +130,9 @@
<PackageVersion Include="MySqlConnector" Version="2.2.5" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp3.1' ">
<PackageVersion Include="protobuf-net.Grpc" Version="1.1.1" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.1.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LinqToDB.DataProvider.DB2iSeries
using LinqToDB.Expressions;
using LinqToDB.Mapping;

public class DB2iSeriesAccessClientProviderAdapter : IDynamicProviderAdapter
internal class DB2iSeriesAccessClientProviderAdapter : IDynamicProviderAdapter
{
public const string AssemblyName = "IBM.Data.DB2.iSeries";
public const string ProviderFactoryName = "IBM.Data.DB2.iSeries";
Expand Down
2 changes: 1 addition & 1 deletion Source/ISeriesProvider/DB2iSeriesBulkCopy.AccessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LinqToDB.DataProvider.DB2iSeries
using System.Diagnostics;
using System.Data.Common;

partial class DB2iSeriesBulkCopy : BasicBulkCopy
internal partial class DB2iSeriesBulkCopy : BasicBulkCopy
{
private const int MAX_ACCESS_CLIENT_BATCH_SIZE = 10000;

Expand Down
4 changes: 2 additions & 2 deletions Source/ISeriesProvider/DB2iSeriesBulkCopy.DB2Connect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace LinqToDB.DataProvider.DB2iSeries
using LinqToDB;
using LinqToDB.Common;
using DB2BulkCopyOptions = DB2.DB2ProviderAdapter.DB2BulkCopyOptions;
partial class DB2iSeriesBulkCopy : BasicBulkCopy

internal partial class DB2iSeriesBulkCopy : BasicBulkCopy
{
//Copied from DB2BulkCopy
private static BulkCopyRowsCopied ProviderSpecificCopyImpl_DB2<T>(
Expand Down
6 changes: 3 additions & 3 deletions Source/ISeriesProvider/DB2iSeriesBulkCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LinqToDB.DataProvider.DB2iSeries
{
using Data;

partial class DB2iSeriesBulkCopy : BasicBulkCopy
internal partial class DB2iSeriesBulkCopy : BasicBulkCopy
{
const int MAX_ALLOWABLE_MULTIPLE_ROWS_BATCH_SIZE = 100;

Expand Down Expand Up @@ -110,7 +110,7 @@ protected override Task<BulkCopyRowsCopied> ProviderSpecificCopyAsync<T>(ITable<
return MultipleRowsCopyAsync(table, options, source, cancellationToken);
}

#if NATIVE_ASYNC
#if NET472_OR_GREATER
protected override async Task<BulkCopyRowsCopied> ProviderSpecificCopyAsync<T>(ITable<T> table, DataOptions options, IAsyncEnumerable<T> source, CancellationToken cancellationToken)
{
if (table.DataContext is DataConnection dataConnection)
Expand Down Expand Up @@ -165,7 +165,7 @@ protected override Task<BulkCopyRowsCopied> MultipleRowsCopyAsync<T>(ITable<T> t
return MultipleRowsCopy2Async(new DB2iSeriesMultipleRowsHelper<T>(table, options, dB2ISeriesSqlProviderFlags) { BatchSize = GetMultipleRowsMaxBatchSize(options) }, source, " FROM " + Constants.SQL.DummyTableName(), cancellationToken);
}

#if NATIVE_ASYNC
#if NET472_OR_GREATER
protected override Task<BulkCopyRowsCopied> MultipleRowsCopyAsync<T>(ITable<T> table, DataOptions options, IAsyncEnumerable<T> source, CancellationToken cancellationToken)
{
return MultipleRowsCopy2Async(new DB2iSeriesMultipleRowsHelper<T>(table, options, dB2ISeriesSqlProviderFlags) { BatchSize = GetMultipleRowsMaxBatchSize(options) }, source, " FROM " + Constants.SQL.DummyTableName(), cancellationToken);
Expand Down
Loading

0 comments on commit 68dc75e

Please sign in to comment.