forked from apache/arrow-adbc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get smoke tests working; re-oranize directories
- Loading branch information
David Coe
committed
Nov 30, 2023
1 parent
aa36b19
commit 45d8ab5
Showing
32 changed files
with
423 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ x64 | |
|
||
artifacts/ | ||
TestResults/ | ||
nugets/ | ||
packages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<Project> | ||
|
||
<!-- The following works around https://github.com/dotnet/sourcelink/issues/572 --> | ||
<PropertyGroup> | ||
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/> | ||
<EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | ||
<PackageReadmeFile>readme.md</PackageReadmeFile> | ||
</PropertyGroup> | ||
<!--<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> | ||
<Exec Command="powershell -ExecutionPolicy Unrestricted -File $(ProjectDir)build-SnowflakeDriver.ps1 -netversion $(TargetFramework)" /> | ||
</Target>--> | ||
|
||
<!-- use Build-SnowflakeDriver.ps1 to build the dll --> | ||
|
||
<!-- libadbc_driver_snowflake.dll is listed for each framework because Condition doesn't work here --> | ||
|
||
<ItemGroup> | ||
<Content Include="libadbc_driver_snowflake.dll"> | ||
<Pack>true</Pack> | ||
<PackagePath>lib\netstandard2.0</PackagePath> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="libadbc_driver_snowflake.dll"> | ||
<Pack>true</Pack> | ||
<PackagePath>lib\net6.0</PackagePath> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="readme.md"> | ||
<Pack>true</Pack> | ||
<PackagePath>\</PackagePath> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\Apache.Arrow.Adbc\Apache.Arrow.Adbc.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
csharp/src/Drivers/Interop/Snowflake/SnowflakeDriverLoader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
using System.IO; | ||
using Apache.Arrow.Adbc.C; | ||
|
||
namespace Apache.Arrow.Adbc.Drivers.Interop.Snowflake | ||
{ | ||
/// <summary> | ||
/// Lightweight class for loading the Snowflake Go driver to .NET. | ||
/// </summary> | ||
public class SnowflakeDriverLoader | ||
{ | ||
/// <summary> | ||
/// Loads the Snowflake Go driver from the current directory using the default name and entry point. | ||
/// </summary> | ||
/// <returns>An <see cref="AdbcDriver"/> based on the Snowflake Go driver.</returns> | ||
/// <exception cref="FileNotFoundException"></exception> | ||
public static AdbcDriver LoadDriver() | ||
{ | ||
string file = "libadbc_driver_snowflake.dll"; | ||
|
||
if(File.Exists(file)) | ||
{ | ||
// get the full path because some .NET versions need it | ||
file = Path.GetFullPath(file); | ||
} | ||
else | ||
{ | ||
throw new FileNotFoundException($"Cound not find {file}"); | ||
} | ||
|
||
return LoadDriver(file, "SnowflakeDriverInit"); | ||
} | ||
|
||
/// <summary> | ||
/// Loads the Snowflake Go driver from the current directory using the default name and entry point. | ||
/// </summary> | ||
/// <param name="file">The file to load.</param> | ||
/// <param name="entryPoint">The entry point of the file.</param> | ||
/// <returns>An <see cref="AdbcDriver"/> based on the Snowflake Go driver.</returns> | ||
public static AdbcDriver LoadDriver(string file, string entryPoint) | ||
{ | ||
AdbcDriver snowflakeDriver = CAdbcDriverImporter.Load(file, entryPoint); | ||
|
||
return snowflakeDriver; | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.