Skip to content

Commit d1e1469

Browse files
committed
prerelease 1.1
1 parent c4cd977 commit d1e1469

26 files changed

+3341
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ps1 linguist-language=Visual Basic

Connection.vb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Imports System.Data.Common
2+
Imports Npgsql
3+
4+
Public Class Connection
5+
Inherits Databasic.Connection
6+
7+
Public Overrides ReadOnly Property Provider As DbConnection
8+
Get
9+
Return Me._provider
10+
End Get
11+
End Property
12+
Private _provider As NpgsqlConnection
13+
14+
Public Overrides ReadOnly Property ProviderResource As System.Type = GetType(ProviderResource)
15+
16+
Public Overrides ReadOnly Property ClientName As String = "Npgsql"
17+
18+
Public Overrides ReadOnly Property Statement As System.Type = GetType(Statement)
19+
20+
Public Overrides Sub Open(dsn As String)
21+
Me._provider = New NpgsqlConnection(dsn)
22+
Me._provider.Open()
23+
' TODO
24+
'AddHandler Me._provider.InfoMessage, AddressOf Connection.errorHandler
25+
End Sub
26+
27+
Public Overrides Function CreateAndBeginTransaction(Optional transactionName As String = "", Optional isolationLevel As IsolationLevel = IsolationLevel.Unspecified) As Databasic.Transaction
28+
Return New Transaction() With {
29+
.ConnectionWrapper = Me,
30+
.Instance = Me._provider.BeginTransaction(isolationLevel)
31+
}
32+
End Function
33+
34+
End Class

Databasic.PostgreSql.nuspec

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata minClientVersion="2.6">
4+
<id>Databasic.PostgreSql</id>
5+
<version>1.1.0.0</version>
6+
<title>Databasic - PostgreSQL Package</title>
7+
<authors>Tom Flidr</authors>
8+
<owners>Tom Flidr</owners>
9+
<licenseUrl>https://opensource.org/licenses/BSD-3-Clause</licenseUrl>
10+
<projectUrl>https://github.com/databasic-net</projectUrl>
11+
<iconUrl>https://raw.githubusercontent.com/databasic-net/databasic/master/gfx/databasic-icon.ico</iconUrl>
12+
<language>en-US</language>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<description>
15+
C#/VB.NET database utility to write pure Postgre SQL queries and load data into environment variables and instances.
16+
</description>
17+
<copyright>Copyright © 2017</copyright>
18+
<tags>pg postgre sql postgresql database query command select insert update delete dml tool utility</tags>
19+
<dependencies>
20+
<!--dependency id="System" version="4.0.0.0" />
21+
<dependency id="System.Core" version="4.0.0.0" />
22+
<dependency id="System.Threading.Tasks.Extensions" version="4.1.0.0" />
23+
<dependency id="System.Data" version="4.0.0.0" /-->
24+
<dependency id="Npgsql" version="3.2.4.0" />
25+
<dependency id="Databasic.Core" version="1.1.0.0" />
26+
</dependencies>
27+
<releaseNotes>https://github.com/databasic-net/databasic/releases</releaseNotes>
28+
</metadata>
29+
<files>
30+
<file src="content/App.config.install.xdt" target="content/App.config.install.xdt" />
31+
<file src="content/Web.config.install.xdt" target="content/Web.config.install.xdt" />
32+
<file src="content/App.config.uninstall.xdt" target="content/App.config.uninstall.xdt" />
33+
<file src="content/Web.config.uninstall.xdt" target="content/Web.config.uninstall.xdt" />
34+
</files>
35+
</package>

Databasic.PostgreSql.vbproj

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{947DA57A-6291-4038-9E95-53A36191209C}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>Databasic.PostgreSql</RootNamespace>
10+
<AssemblyName>Databasic.PostgreSql</AssemblyName>
11+
<FileAlignment>512</FileAlignment>
12+
<MyType>Windows</MyType>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<TargetFrameworkProfile />
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<DefineDebug>true</DefineDebug>
20+
<DefineTrace>true</DefineTrace>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DocumentationFile>Databasic.PostgreSql.xml</DocumentationFile>
23+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
24+
<Prefer32Bit>false</Prefer32Bit>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<DefineDebug>false</DefineDebug>
29+
<DefineTrace>true</DefineTrace>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DocumentationFile>Databasic.PostgreSql.xml</DocumentationFile>
33+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
34+
<Prefer32Bit>false</Prefer32Bit>
35+
</PropertyGroup>
36+
<PropertyGroup>
37+
<OptionExplicit>On</OptionExplicit>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<OptionCompare>Binary</OptionCompare>
41+
</PropertyGroup>
42+
<PropertyGroup>
43+
<OptionStrict>Off</OptionStrict>
44+
</PropertyGroup>
45+
<PropertyGroup>
46+
<OptionInfer>On</OptionInfer>
47+
</PropertyGroup>
48+
<ItemGroup>
49+
<Reference Include="Microsoft.CSharp" />
50+
<Reference Include="Npgsql, Version=3.2.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Npgsql.3.2.4\lib\net45\Npgsql.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="System" />
55+
<Reference Include="System.Data" />
56+
<Reference Include="System.Core" />
57+
<Reference Include="System.DirectoryServices" />
58+
<Reference Include="System.Numerics" />
59+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
60+
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
61+
<Private>True</Private>
62+
</Reference>
63+
<Reference Include="System.Transactions" />
64+
</ItemGroup>
65+
<ItemGroup>
66+
<Import Include="Microsoft.VisualBasic" />
67+
<Import Include="System" />
68+
<Import Include="System.Collections" />
69+
<Import Include="System.Collections.Generic" />
70+
<Import Include="System.Data" />
71+
<Import Include="System.Diagnostics" />
72+
<Import Include="System.Linq" />
73+
<Import Include="System.Xml.Linq" />
74+
</ItemGroup>
75+
<ItemGroup>
76+
<Compile Include="Connection.vb" />
77+
<Compile Include="My Project\AssemblyInfo.vb" />
78+
<Compile Include="My Project\Application.Designer.vb">
79+
<AutoGen>True</AutoGen>
80+
<DependentUpon>Application.myapp</DependentUpon>
81+
</Compile>
82+
<Compile Include="My Project\Resources.Designer.vb">
83+
<AutoGen>True</AutoGen>
84+
<DesignTime>True</DesignTime>
85+
<DependentUpon>Resources.resx</DependentUpon>
86+
</Compile>
87+
<Compile Include="My Project\Settings.Designer.vb">
88+
<AutoGen>True</AutoGen>
89+
<DependentUpon>Settings.settings</DependentUpon>
90+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
91+
</Compile>
92+
<Compile Include="ProviderResource.vb" />
93+
<Compile Include="Statement.vb" />
94+
<Compile Include="Transaction.vb" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<EmbeddedResource Include="My Project\Resources.resx">
98+
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
99+
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
100+
<CustomToolNamespace>My.Resources</CustomToolNamespace>
101+
<SubType>Designer</SubType>
102+
</EmbeddedResource>
103+
</ItemGroup>
104+
<ItemGroup>
105+
<None Include="content\App.config.install.xdt" />
106+
<None Include="content\App.config.uninstall.xdt" />
107+
<None Include="content\Web.config.install.xdt" />
108+
<None Include="content\Web.config.uninstall.xdt" />
109+
<None Include="Databasic.PostgreSql.nuspec" />
110+
<None Include="My Project\Application.myapp">
111+
<Generator>MyApplicationCodeGenerator</Generator>
112+
<LastGenOutput>Application.Designer.vb</LastGenOutput>
113+
</None>
114+
<None Include="My Project\Settings.settings">
115+
<Generator>SettingsSingleFileGenerator</Generator>
116+
<CustomToolNamespace>My</CustomToolNamespace>
117+
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
118+
</None>
119+
<None Include="packages.config" />
120+
<None Include="_CreateNewNuGetPackage\Config.ps1" />
121+
<None Include="_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1" />
122+
<None Include="_CreateNewNuGetPackage\DoNotModify\New-NuGetPackage.ps1" />
123+
<None Include="_CreateNewNuGetPackage\DoNotModify\UploadNuGetPackage.ps1" />
124+
<None Include="_CreateNewNuGetPackage\RunMeToUploadNuGetPackage.cmd" />
125+
</ItemGroup>
126+
<ItemGroup>
127+
<ProjectReference Include="..\Databasic\Databasic.vbproj">
128+
<Project>{063224ab-bc4c-49eb-838f-7fb115bd496c}</Project>
129+
<Name>Databasic</Name>
130+
</ProjectReference>
131+
</ItemGroup>
132+
<ItemGroup>
133+
<None Include="_CreateNewNuGetPackage\DoNotModify\NuGet.exe" />
134+
</ItemGroup>
135+
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
136+
<PropertyGroup>
137+
<PostBuildEvent>REM Create a NuGet package for this project and place the .nupkg file in the project's output directory.
138+
REM If you see this in Visual Studio's Error List window, check the Output window's Build tab for the actual error.
139+
ECHO Creating NuGet package in Post-Build event...
140+
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "&amp; '$(ProjectDir)_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath '$(ProjectPath)' -OutputDirectory '$(TargetDir)' -BuildConfiguration '$(ConfigurationName)' -BuildPlatform '$(PlatformName)'"</PostBuildEvent>
141+
</PropertyGroup>
142+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
143+
Other similar extension points exist, see Microsoft.Common.targets.
144+
<Target Name="BeforeBuild">
145+
</Target>
146+
<Target Name="AfterBuild">
147+
</Target>
148+
-->
149+
</Project>

0 commit comments

Comments
 (0)