Skip to content

Commit 2eeb666

Browse files
committed
prerelease 1.1
1 parent f55cf2c commit 2eeb666

25 files changed

+2666
-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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Imports System.Data.Common
2+
Imports System.Data.SQLite
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 SQLiteConnection
13+
14+
Public Overrides ReadOnly Property ProviderResource As System.Type = GetType(ProviderResource)
15+
16+
Public Overrides ReadOnly Property ClientName As String = "System.Data.SQLite"
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 SQLiteConnection(dsn)
22+
Me._provider.Open()
23+
'AddHandler Me._provider.InfoMessage, AddressOf Connection.errorHandler
24+
End Sub
25+
26+
Public Overrides Function CreateAndBeginTransaction(Optional transactionName As String = "", Optional isolationLevel As IsolationLevel = IsolationLevel.Unspecified) As Databasic.Transaction
27+
Return New Transaction() With {
28+
.ConnectionWrapper = Me,
29+
.Instance = Me._provider.BeginTransaction(DirectCast(isolationLevel, System.Data.IsolationLevel))
30+
}
31+
End Function
32+
33+
End Class

Databasic.SQLite.nuspec

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.SQLite</id>
5+
<version>1.1.0.0</version>
6+
<title>Databasic - SQLite 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 SQLite queries and load data into environment variables and instances.
16+
</description>
17+
<copyright>Copyright © 2017</copyright>
18+
<tags>sql sqlite 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.Data" version="4.0.0.0" /-->
23+
<dependency id="SQLite.Data" version="6.9.8.0" />
24+
<dependency id="Databasic.Core" version="1.1.0.0" />
25+
</dependencies>
26+
<releaseNotes>https://github.com/databasic-net/databasic/releases</releaseNotes>
27+
</metadata>
28+
<files>
29+
<file src="content/App.config.install.xdt" target="content/App.config.install.xdt" />
30+
<file src="content/Web.config.install.xdt" target="content/Web.config.install.xdt" />
31+
<file src="content/App.config.uninstall.xdt" target="content/App.config.uninstall.xdt" />
32+
<file src="content/Web.config.uninstall.xdt" target="content/Web.config.uninstall.xdt" />
33+
</files>
34+
</package>

Databasic.SQLite.vbproj

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
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>{454ED0D6-A5B9-449A-877F-99919F675C29}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>Databasic.SQLite</RootNamespace>
10+
<AssemblyName>Databasic.SQLite</AssemblyName>
11+
<FileAlignment>512</FileAlignment>
12+
<MyType>Windows</MyType>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<DefineDebug>true</DefineDebug>
21+
<DefineTrace>true</DefineTrace>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DocumentationFile>Databasic.SQLite.xml</DocumentationFile>
24+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
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.SQLite.xml</DocumentationFile>
33+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<OptionExplicit>On</OptionExplicit>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<OptionCompare>Binary</OptionCompare>
40+
</PropertyGroup>
41+
<PropertyGroup>
42+
<OptionStrict>Off</OptionStrict>
43+
</PropertyGroup>
44+
<PropertyGroup>
45+
<OptionInfer>On</OptionInfer>
46+
</PropertyGroup>
47+
<ItemGroup>
48+
<Reference Include="System" />
49+
<Reference Include="System.ComponentModel.DataAnnotations" />
50+
<Reference Include="System.Data" />
51+
<Reference Include="System.Core" />
52+
<Reference Include="System.Data.SQLite, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
53+
<HintPath>..\packages\System.Data.SQLite.Core.1.0.105.2\lib\net40\System.Data.SQLite.dll</HintPath>
54+
<Private>True</Private>
55+
</Reference>
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Import Include="Microsoft.VisualBasic" />
59+
<Import Include="System" />
60+
<Import Include="System.Collections" />
61+
<Import Include="System.Collections.Generic" />
62+
<Import Include="System.Data" />
63+
<Import Include="System.Diagnostics" />
64+
<Import Include="System.Linq" />
65+
<Import Include="System.Xml.Linq" />
66+
</ItemGroup>
67+
<ItemGroup>
68+
<Compile Include="Connection.vb" />
69+
<Compile Include="My Project\AssemblyInfo.vb" />
70+
<Compile Include="My Project\Application.Designer.vb">
71+
<AutoGen>True</AutoGen>
72+
<DependentUpon>Application.myapp</DependentUpon>
73+
</Compile>
74+
<Compile Include="My Project\Resources.Designer.vb">
75+
<AutoGen>True</AutoGen>
76+
<DesignTime>True</DesignTime>
77+
<DependentUpon>Resources.resx</DependentUpon>
78+
</Compile>
79+
<Compile Include="My Project\Settings.Designer.vb">
80+
<AutoGen>True</AutoGen>
81+
<DependentUpon>Settings.settings</DependentUpon>
82+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
83+
</Compile>
84+
<Compile Include="ProviderResource.vb" />
85+
<Compile Include="Statement.vb" />
86+
<Compile Include="Transaction.vb" />
87+
</ItemGroup>
88+
<ItemGroup>
89+
<EmbeddedResource Include="My Project\Resources.resx">
90+
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
91+
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
92+
<CustomToolNamespace>My.Resources</CustomToolNamespace>
93+
<SubType>Designer</SubType>
94+
</EmbeddedResource>
95+
</ItemGroup>
96+
<ItemGroup>
97+
<None Include="content\App.config.install.xdt" />
98+
<None Include="content\App.config.uninstall.xdt" />
99+
<None Include="content\Web.config.install.xdt" />
100+
<None Include="content\Web.config.uninstall.xdt" />
101+
<None Include="Databasic.SQLite.nuspec" />
102+
<None Include="My Project\Application.myapp">
103+
<Generator>MyApplicationCodeGenerator</Generator>
104+
<LastGenOutput>Application.Designer.vb</LastGenOutput>
105+
</None>
106+
<None Include="My Project\Settings.settings">
107+
<Generator>SettingsSingleFileGenerator</Generator>
108+
<CustomToolNamespace>My</CustomToolNamespace>
109+
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
110+
</None>
111+
<None Include="packages.config" />
112+
<None Include="_CreateNewNuGetPackage\Config.ps1" />
113+
<None Include="_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1" />
114+
<None Include="_CreateNewNuGetPackage\DoNotModify\New-NuGetPackage.ps1" />
115+
<None Include="_CreateNewNuGetPackage\DoNotModify\UploadNuGetPackage.ps1" />
116+
<None Include="_CreateNewNuGetPackage\RunMeToUploadNuGetPackage.cmd" />
117+
</ItemGroup>
118+
<ItemGroup>
119+
<None Include="_CreateNewNuGetPackage\DoNotModify\NuGet.exe" />
120+
</ItemGroup>
121+
<ItemGroup>
122+
<ProjectReference Include="..\Databasic\Databasic.vbproj">
123+
<Project>{063224ab-bc4c-49eb-838f-7fb115bd496c}</Project>
124+
<Name>Databasic</Name>
125+
</ProjectReference>
126+
</ItemGroup>
127+
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
128+
<PropertyGroup>
129+
<PostBuildEvent>REM Create a NuGet package for this project and place the .nupkg file in the project's output directory.
130+
REM If you see this in Visual Studio's Error List window, check the Output window's Build tab for the actual error.
131+
ECHO Creating NuGet package in Post-Build event...
132+
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "&amp; '$(ProjectDir)_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath '$(ProjectPath)' -OutputDirectory '$(TargetDir)' -BuildConfiguration '$(ConfigurationName)' -BuildPlatform '$(PlatformName)'"</PostBuildEvent>
133+
</PropertyGroup>
134+
<Import Project="..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" />
135+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
136+
<PropertyGroup>
137+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
138+
</PropertyGroup>
139+
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets'))" />
140+
</Target>
141+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
142+
Other similar extension points exist, see Microsoft.Common.targets.
143+
<Target Name="BeforeBuild">
144+
</Target>
145+
<Target Name="AfterBuild">
146+
</Target>
147+
-->
148+
</Project>

My Project/Application.Designer.vb

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

My Project/Application.myapp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<MySubMain>false</MySubMain>
4+
<SingleInstance>false</SingleInstance>
5+
<ShutdownMode>0</ShutdownMode>
6+
<EnableVisualStyles>true</EnableVisualStyles>
7+
<AuthenticationMode>0</AuthenticationMode>
8+
<ApplicationType>1</ApplicationType>
9+
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
10+
</MyApplicationData>

My Project/AssemblyInfo.vb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Imports System
2+
Imports System.Reflection
3+
Imports System.Runtime.InteropServices
4+
5+
' General Information about an assembly is controlled through the following
6+
' set of attributes. Change these attribute values to modify the information
7+
' associated with an assembly.
8+
9+
' Review the values of the assembly attributes
10+
11+
<Assembly: AssemblyTitle("Databasic.SQLite")>
12+
<Assembly: AssemblyDescription("")>
13+
<Assembly: AssemblyCompany("")>
14+
<Assembly: AssemblyProduct("Databasic.SQLite")>
15+
<Assembly: AssemblyCopyright("Copyright © 2017")>
16+
<Assembly: AssemblyTrademark("")>
17+
18+
<Assembly: ComVisible(False)>
19+
20+
'The following GUID is for the ID of the typelib if this project is exposed to COM
21+
<Assembly: Guid("b3b01e15-ba46-49c4-b344-e14ca1fab639")>
22+
23+
' Version information for an assembly consists of the following four values:
24+
'
25+
' Major Version
26+
' Minor Version
27+
' Build Number
28+
' Revision
29+
'
30+
' You can specify all the values or you can default the Build and Revision Numbers
31+
' by using the '*' as shown below:
32+
' <Assembly: AssemblyVersion("1.0.*")>
33+
34+
<Assembly: AssemblyVersion("1.1.0.0")>
35+
<Assembly: AssemblyFileVersion("1.1.0.0")>

My Project/Resources.Designer.vb

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)