Skip to content

Commit

Permalink
Merge pull request #50 from DIPSAS/feature/new-release
Browse files Browse the repository at this point in the history
Feature/new release
  • Loading branch information
epaulsen authored Feb 10, 2021
2 parents 5553ed3 + 8e5c996 commit d85da13
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 16 deletions.
12 changes: 12 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Releasenotes

## 2.0.2
- Bugfix of typeconversion for arrays

## 2.0.1
- Minor bugfix of issue #46 , which was a regression of how `OracleValueConverter` behaves. Many thanks to @opejanovic for fixing this.

## 2.0.0
- Dependency switched to Dapper 2.0.35
- Value conversion improvements (Thanks to @Havagan in PR #44 )
- Parameters collection is now available before execution (Thanks to @opejanovic in PR #37)
- Minimum full framework version bumped to .net 4.6.2, given that .net 4.5 is EOL.

## 1.2.1
- Fixed bug in type converter
- Added doc for Type handlers
Expand Down
5 changes: 4 additions & 1 deletion scripts/LocalOracleDockerDb.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# 3. Username / password from Oracle account must be set in environment variables DA_OR_UID / DA_OR_PWD


$uid = $env:DA_OR_UID
$pwd = $env:DA_OR_PWD

$imageName = "OracleDapperTest"


Expand All @@ -18,7 +21,7 @@ if ((docker ps -a | where-object {$_ -match $imageName }) -eq $null)
{
Write-Host "Downloading image from oracle docker registry..."
#Login to Oracle account and download image
docker login -u $env:DA_OR_UID -p $env:DA_OR_PWD container-registry.oracle.com
docker login -u $uid -p $pwd container-registry.oracle.com

docker run -d --env-file db_env.dat -p 1521:1521 -p 5500:5500 -it --name $imageName container-registry.oracle.com/database/enterprise:12.2.0.1-slim | out-null
} else
Expand Down
7 changes: 7 additions & 0 deletions src/Dapper.Oracle/SqlMapperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ public static void AddTypeHandler<T>(SqlMapper.ITypeHandler handler)
SqlMapper.AddTypeHandler(typeof(T), handler);
}

public static void AddTypeHandler<TType, THandler>() where THandler : SqlMapper.TypeHandler<TType>, new()
{
THandler handler = new THandler();
Handlers[typeof(TType)] = handler;
SqlMapper.AddTypeHandler(handler);
}

public static bool HasTypeHandler(Type type, out SqlMapper.ITypeHandler handler)
{
if (Handlers.ContainsKey(type))
Expand Down
11 changes: 7 additions & 4 deletions src/Tests.Dapper.Oracle/Expressions/ObjectWrapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
using FluentAssertions;
using Xunit;

using Managed = Oracle.ManagedDataAccess.Client;
#if NETFRAMEWORK
using UnManaged = Oracle.DataAccess.Client;
#else
using Managed = Oracle.ManagedDataAccess.Client;
#endif

namespace Tests.Dapper.Oracle.Expressions
Expand All @@ -19,11 +20,13 @@ public static IEnumerable<object[]> OracleDataFixture
{
get
{
#if NETCOREAPP2_0
yield return new object[] {new Managed.OracleCommand()};
#else
#if NETFRAMEWORK

yield return new object[] { new Managed.OracleCommand() };
yield return new object[] { new UnManaged.OracleCommand() };
#else
yield return new object[] {new Managed.OracleCommand()};

#endif
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/Tests.Dapper.Oracle/OracleParameterRetretreivers.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Data;
#if NETCOREAPP2_0
using Managed = Oracle.ManagedDataAccess.Client;
#else
using UnManaged = Oracle.DataAccess.Client;
using Managed = Oracle.ManagedDataAccess.Client;
#endif

namespace Tests.Dapper.Oracle
{
Expand Down
5 changes: 0 additions & 5 deletions src/Tests.Dapper.Oracle/OracleValueConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
using System.Text;
using Dapper.Oracle;
using FluentAssertions;
using Oracle.ManagedDataAccess.Client;
#if NETCOREAPP2_0
using Oracle.ManagedDataAccess.Types;
#else
using Oracle.DataAccess.Types;
#endif

using Xunit;

Expand Down
3 changes: 2 additions & 1 deletion src/Tests.Dapper.Oracle/Tests.Dapper.Oracle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<Import Project="..\common.targets" />
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.3" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
<PackageReference Include="xunit" Version="2.3.1" />
Expand Down
9 changes: 9 additions & 0 deletions src/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<Title>Dapper support for Oracle providers</Title>
<Authors>DIPSAS;epaulsen</Authors>
<PackageIconUrl>https://raw.githubusercontent.com/DIPSAS/Dapper.Oracle/master/doc/images/DIPS.png</PackageIconUrl>
<PackageIcon>dips.png</PackageIcon>
<Copyright>Copyright 2019 DIPS AS</Copyright>
<PackageTags>Dapper;ORM;MicroORM;Oracle</PackageTags>
<Description>Dapper is a great tool if you want to write database-agnostic code.
Expand All @@ -50,6 +51,7 @@ Using this package, you can now run stored procedures that returns RefCursor, or
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)..\doc\images\dips.png" Pack="true" PackagePath="\"/>
</ItemGroup>

<!-- Import targets file with version information -->
Expand Down Expand Up @@ -96,13 +98,20 @@ Using this package, you can now run stored procedures that returns RefCursor, or
<!-- add pdb to nuget package -->
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludePDBsInPackage</TargetsForTfmSpecificContentInPackage>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols Condition=" $(IsNetCore) ">true</IncludeSymbols>
<SymbolPackageFormat Condition=" $(IsNetCore) ">snupkg</SymbolPackageFormat>
</PropertyGroup>
<Target Name="IncludePDBsInPackage" Condition="'$(IncludeBuildOutput)' != 'false'">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)\$(AssemblyName).pdb" PackagePath="lib/$(TargetFramework)" />
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>



<!--
Expand Down

0 comments on commit d85da13

Please sign in to comment.