Skip to content

Commit

Permalink
Merge pull request #62 from linq2db/master
Browse files Browse the repository at this point in the history
Release 3.6.0
  • Loading branch information
MaceWindu authored Nov 21, 2021
2 parents 86bc420 + 854266b commit f82b58f
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 121 deletions.
29 changes: 29 additions & 0 deletions Build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## LINQ to DB LINQPad 6 and 7 Driver

This nuget package is a driver for [LINQPad 6 and 7](http://www.linqpad.net).

Following databases supported:

- **DB2** (LUW, z/OS) (only 64-bit version)
- **Firebird**
- **Informix** (only 64-bit version)
- **Microsoft Access** *(supports both OleDb and ODBC)*
- **Microsoft Sql Server** 2005+ *(including **Microsoft Sql Azure**)*
- **Microsoft Sql Server Compact (SqlCe)**
- **MySql/MariaDB**
- **Oracle**
- **PostgreSQL**
- **SQLite**
- **SAP HANA** *(client software must be installed, supports both Native and ODBC providers)*
- **SAP/Sybase ASE**

### Installation

- Click "Add connection" in LINQPad.
- In the "Choose Data Context" dialog, press the "View more drivers..." button.
- In the "LINQPad NuGet Manager" dialog, find LINQ To DB driver in list of drivers and click the "Install" button.
- Close "LINQPad NuGet Manager" dialog
- In the "Choose Data Context" dialog, select the "LINQ to DB" driver and click the "Next" button.
- In the "LINQ to DB connection" dialog, supply your connection information.
- You're done.

10 changes: 5 additions & 5 deletions Build/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
variables:
solution: 'linq2db.LINQPad.sln'
build_configuration: 'Release'
assemblyVersion: 3.3.3.0
nugetVersion: 3.3.3
nugetDevVersion: 3.3.3
nugetPRVersion: 3.3.3
assemblyVersion: 3.6.0.0
nugetVersion: 3.6.0
nugetDevVersion: 3.6.1
nugetPRVersion: 3.6.1
artifact_lpx: 'lpx'
artifact_lpx6: 'lpx6'
artifact_nuget: 'nuget'
Expand All @@ -24,7 +24,7 @@ stages:
jobs:
- job: build_job
pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'
displayName: 'Build'
variables:
- template: nuget-vars.yml
Expand Down
46 changes: 25 additions & 21 deletions Build/linq2db.LINQPad.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,35 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>linq2db.LINQPad</id>
<title>LINQ to DB driver for LINQPad 6</title>
<title>LINQ to DB driver for LINQPad 6+</title>
<description>Supported databases: IBM DB2 LUW/zOS, Firebird, IBM Informix, Microsoft Access, Microsoft Sql Server (+Azure), Microsoft Sql Server Compact, MySql, MariaDB, Oracle, PostgreSQL, SQLite, SAP HANA, SAP/Sybase ASE.</description>
<summary />
<tags>
linqpaddriver linqpad linq2db linqtodb access msaccess db2 odbc oledb azure firebird informix mysql mariadb oracle postgres postgresql saphana sqlce sqlserverce sqlserver sybase ase sap sqlite database
</tags>
<readme>README.md</readme>
<dependencies>
<group targetFramework=".NETCoreApp3.1">
<dependency id="LINQPad.Reference" version="1.1.0" />
<dependency id="linq2db" version="3.3.0" />
<dependency id="Humanizer.Core" version="2.8.26" />
<dependency id="CodeJam" version="3.3.1" />
<dependency id="FirebirdSql.Data.FirebirdClient" version="8.0.1" />
<dependency id="MySqlConnector" version="1.3.5" />
<dependency id="AdoNetCore.AseClient" version="0.19.2" />
<dependency id="System.Data.SQLite.Core" version="1.0.113.7" />
<dependency id="System.Data.SqlClient" version="4.8.2" />
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" />
<dependency id="Microsoft.CodeAnalysis.CSharp" version="3.9.0" />
<dependency id="System.Data.Odbc" version="5.0.0" />
<dependency id="System.Data.OleDb" version="5.0.0" />
<dependency id="Npgsql" version="5.0.4" />
<dependency id="Oracle.ManagedDataAccess.Core" version="3.21.1" />
<dependency id="IBM.Data.DB2.Core" version="3.1.0.400" />
<dependency id="dotMorten.Microsoft.SqlServer.Types" version="1.3.0" />
<dependency id="System.Text.Json" version="5.0.2" />
<dependency id="LINQPad.Reference" version="1.1.0" />
<dependency id="linq2db" version="3.6.0" />

<dependency id="Humanizer.Core" version="2.13.14" />
<dependency id="CodeJam" version="4.0.1" />
<dependency id="System.Configuration.ConfigurationManager" version="6.0.0" />
<dependency id="Microsoft.CodeAnalysis.CSharp" version="4.0.1" />
<dependency id="System.Text.Json" version="5.0.2" />
<dependency id="dotMorten.Microsoft.SqlServer.Types" version="1.3.0" />

<dependency id="FirebirdSql.Data.FirebirdClient" version="8.5.4" />
<dependency id="MySqlConnector" version="2.0.0" />
<dependency id="AdoNetCore.AseClient" version="0.19.2" />
<dependency id="System.Data.SQLite.Core" version="1.0.115.5" />
<dependency id="System.Data.SqlClient" version="4.8.3" />
<dependency id="System.Data.Odbc" version="5.0.0" />
<dependency id="System.Data.OleDb" version="5.0.0" />
<dependency id="Npgsql" version="6.0.0" />
<dependency id="Oracle.ManagedDataAccess.Core" version="3.21.4" />
<dependency id="IBM.Data.DB2.Core" version="3.1.0.500" />
</group>
</dependencies>
<frameworkReferences>
Expand All @@ -38,8 +41,9 @@
</metadata>

<files>
<file src="..\Source\bin\Release\netcoreapp3.1\linq2db.LINQPad.dll" target="lib\netcoreapp3.1\" />
<file src="..\Source\bin\Release\netcoreapp3.1\Connection.png" target="lib\netcoreapp3.1\" />
<file src="..\Source\bin\Release\netcoreapp3.1\linq2db.LINQPad.dll" target="lib\netcoreapp3.1\" />
<file src="..\Source\bin\Release\netcoreapp3.1\Connection.png" target="lib\netcoreapp3.1\" />
<file src="..\Source\bin\Release\netcoreapp3.1\FailedConnection.png" target="lib\netcoreapp3.1\" />
<file src="README.md" />
</files>
</package>
66 changes: 32 additions & 34 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
<Project>
<ItemGroup>
<PackageVersion Include="linq2db" Version="3.3.0" />

<PackageVersion Include="LINQPad.Reference" Version="1.1.0" />
<PackageVersion Include="linq2db" Version="3.6.0" />

<PackageVersion Include="Humanizer.Core" Version="2.8.26" />
<PackageVersion Include="CodeJam" Version="3.3.1" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="System.Buffers" Version="4.5.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageVersion Include="LINQPad.Reference" Version="1.1.0" />

<PackageVersion Include="MySqlConnector" Version="1.3.5" />
<PackageVersion Include="AdoNetCore.AseClient" Version="0.19.2" />
<PackageVersion Include="IBM.Data.DB.Provider" Version="11.5.4000.4861" GeneratePathProperty="true" />
<PackageVersion Include="System.Data.SQLite.Core" Version="1.0.113.7" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.2" />
<PackageVersion Include="Oracle.ManagedDataAccess" Version="19.11.0" />
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.1" />
<PackageVersion Include="System.Data.Odbc" Version="5.0.0" />
<PackageVersion Include="System.Data.OleDb" Version="5.0.0" />
<PackageVersion Include="IBM.Data.DB2.Core" Version="3.1.0.400" />
<PackageVersion Include="dotMorten.Microsoft.SqlServer.Types" Version="1.3.0" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="14.0.1016.290" />

<!--<PackageVersion Include="linq2db4iSeries" Version="2.9.0" />-->
<PackageVersion Include="Humanizer.Core" Version="2.13.14" />
<PackageVersion Include="CodeJam" Version="4.0.1" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="System.Buffers" Version="4.5.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageVersion Include="MySqlConnector" Version="2.0.0" />
<PackageVersion Include="AdoNetCore.AseClient" Version="0.19.2" />
<PackageVersion Include="IBM.Data.DB.Provider" Version="11.5.5010.4" GeneratePathProperty="true" />
<PackageVersion Include="System.Data.SQLite.Core" Version="1.0.115.5" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.3" />
<PackageVersion Include="Oracle.ManagedDataAccess" Version="19.13.0" />
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.4" />
<PackageVersion Include="System.Data.Odbc" Version="6.0.0" />
<PackageVersion Include="System.Data.OleDb" Version="6.0.0" />
<PackageVersion Include="IBM.Data.DB2.Core" Version="3.1.0.500" />
<PackageVersion Include="dotMorten.Microsoft.SqlServer.Types" Version="1.3.0" />
<PackageVersion Include="Microsoft.SqlServer.Types" Version="14.0.1016.290" />
<!--<PackageVersion Include="linq2db4iSeries" Version="2.9.0" />-->
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461'">
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
<PackageVersion Include="Npgsql" Version="4.1.8" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
<PackageVersion Include="Npgsql" Version="4.1.10" />
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="7.10.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" />
<PackageVersion Include="Npgsql" Version="5.0.4" />
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="5.0.2" />
<ItemGroup Condition=" '$(TargetFramework)' != 'net461' ">
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageVersion Include="Npgsql" Version="6.0.0" />
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="8.5.4" />
<PackageVersion Include="System.Text.Json" Version="6.0.0" />
</ItemGroup>
</Project>
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
## LINQ to DB LINQPad Driver

<a href="https://dotnetfoundation.org/projects/linq2db">
<img align="right" alt=".NET Foundation Logo" src="https://raw.githubusercontent.com/dotnet-foundation/swag/master/logo/dotnetfoundation_v4_horizontal.png" width="250px" ></a>

[![NuGet Version and Downloads count](https://buildstats.info/nuget/linq2db.LINQPad?includePreReleases=true)](https://www.nuget.org/packages/linq2db.LINQPad) [![License](https://img.shields.io/github/license/linq2db/linq2db.LINQPad)](MIT-LICENSE.txt)

[![Master branch build](https://img.shields.io/azure-devops/build/linq2db/linq2db/8/master?label=build%20(master))](https://dev.azure.com/linq2db/linq2db/_build?definitionId=8&_a=summary) [![Latest build](https://img.shields.io/azure-devops/build/linq2db/linq2db/8?label=build%20(latest))](https://dev.azure.com/linq2db/linq2db/_build?definitionId=8&_a=summary)

linq2db.LINQPad is a driver for [LINQPad 5](http://www.linqpad.net) and [LINQPad 6](http://www.linqpad.net).
linq2db.LINQPad is a driver for [LINQPad 5 (.NET Framework)](http://www.linqpad.net) and [LINQPad 6-7 (.NET Core)](http://www.linqpad.net).

Following databases supported (by both LINQPad 5 and LINQPad 6 if not noted):
Following databases supported (by all LINQPad versions if other not noted):

- **DB2** (LUW, z/OS)
- **DB2** (LUW, z/OS) (LINQPad 6+ supports only 64-bit version)
- **DB2 iSeries** (using [3rd-party provider](https://github.com/LinqToDB4iSeries/Linq2DB4iSeries)) *(iAccess 7.1+ software must be installed)*. **IMPORTANT:** currently available only for LINQPad 5 using linq2db.LINQPad version 2.9.3 or earlier
- **Firebird**
- **Informix**
- **Informix** (LINQPad 6+ supports only 64-bit version)
- **Microsoft Access** *(supports both OleDb and ODBC)*
- **Microsoft Sql Server** 2000+ *(including **Microsoft Sql Azure**. LINQPad 6 [doesn't support](https://stackoverflow.com/a/45418196) **Sql Server 2000**)*
- **Microsoft Sql Server** 2000+ *(including **Microsoft Sql Azure**. LINQPad 6+ [doesn't support](https://stackoverflow.com/a/45418196) **Sql Server 2000**)*
- **Microsoft Sql Server Compact (SqlCe)**
- **MySql/MariaDB**
- **Oracle**
Expand All @@ -27,14 +24,14 @@ Following databases supported (by both LINQPad 5 and LINQPad 6 if not noted):

### Download

Releases are hosted on [Github](https://github.com/linq2db/linq2db.LINQPad/releases) and on [Nuget](https://www.nuget.org/packages/linq2db.LINQPad) for LINQPad 6 driver.
Releases are hosted on [Github](https://github.com/linq2db/linq2db.LINQPad/releases) and on [Nuget](https://www.nuget.org/packages/linq2db.LINQPad) for LINQPad 6+ driver.

Latest build is hosted on [Azure Artifacts](https://dev.azure.com/linq2db/linq2db/_packaging?_a=package&feed=linq2db%40Local&package=linq2db.LINQPad&protocolType=NuGet). Feed [URL](https://pkgs.dev.azure.com/linq2db/linq2db/_packaging/linq2db/nuget/v3/index.json) ([how to use](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#package-sources)).


### Installation

#### LINQPad 6 (NuGet)
#### LINQPad 6+ (NuGet)

- Click "Add connection" in LINQPad.
- In the "Choose Data Context" dialog, press the "View more drivers..." button.
Expand All @@ -44,7 +41,7 @@ Latest build is hosted on [Azure Artifacts](https://dev.azure.com/linq2db/linq2d
- In the "LINQ to DB connection" dialog, supply your connection information.
- You're done.

#### LINQPad 6 (Manual)
#### LINQPad 6+ (Manual)

- Download latest **.lpx6** file from the link provided above.
- Click "Add connection" in LINQPad.
Expand Down
2 changes: 1 addition & 1 deletion Source/ConnectionDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<Label Padding="0,3,0,3" DockPanel.Dock="Right">
<Hyperlink Click="ChooseType">Choose...</Hyperlink>
</Label>
<Label Padding="1,3,1,3">Full name of custome type</Label>
<Label Padding="1,3,1,3">Full name of custom type</Label>
</DockPanel>
<TextBox Grid.Row="3" Text="{Binding CustomTypeName}" />

Expand Down
22 changes: 0 additions & 22 deletions Source/DevDeploy.bat

This file was deleted.

4 changes: 2 additions & 2 deletions Source/LINQPadDataConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public LINQPadDataConnection()
InitMappingSchema();
}

public LINQPadDataConnection(string providerName, string? providerPath, string connectionString)
public LINQPadDataConnection(string? providerName, string? providerPath, string connectionString)
: base(ProviderHelper.GetProvider(providerName, providerPath).GetDataProvider(connectionString), connectionString)
{
Init();
Expand All @@ -22,7 +22,7 @@ public LINQPadDataConnection(string providerName, string? providerPath, string c

public LINQPadDataConnection(IConnectionInfo cxInfo)
: this(
(string)cxInfo.DriverData.Element(CX.ProviderName),
(string?)cxInfo.DriverData.Element(CX.ProviderName),
(string?)cxInfo.DriverData.Element(CX.ProviderPath),
cxInfo.DatabaseInfo.CustomCxString)
{
Expand Down
12 changes: 10 additions & 2 deletions Source/Pluralization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ public static string ToPlural(string str)
var word = GetLastWord(str);
var newWord = word.Pluralize();

if (string.Compare(word, newWord, StringComparison.OrdinalIgnoreCase) != 0)
if (string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase))
{
if (char.IsUpper(word[0]))
newWord = char.ToUpper(newWord[0]) + newWord.Substring(1, newWord.Length - 1);

#if NETCORE
return word == str ? newWord : string.Concat(str.AsSpan(0, str.Length - word.Length), newWord);
#else
return word == str ? newWord : str.Substring(0, str.Length - word.Length) + newWord;
#endif
}

return str;
Expand All @@ -42,12 +46,16 @@ public static string ToSingular(string str)
var word = GetLastWord(str);
var newWord = word.Singularize();

if (string.Compare(word, newWord, StringComparison.OrdinalIgnoreCase) != 0)
if (string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase))
{
if (char.IsUpper(word[0]))
newWord = char.ToUpper(newWord[0]) + newWord.Substring(1, newWord.Length - 1);

#if NETCORE
return word == str ? newWord : string.Concat(str.AsSpan(0, str.Length - word.Length), newWord);
#else
return word == str ? newWord : str.Substring(0, str.Length - word.Length) + newWord;
#endif
}

return str;
Expand Down
Loading

0 comments on commit f82b58f

Please sign in to comment.