-
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.
General - compatibility with newest kuzu version (Kuzu v.0.3.2) Examples - updated example code, added C# example for newest kuzu version - updated generated files in examples for newest kuzu version Readme - unified readme - added more detail and instruction to regarding the build process gitignore - excluded build files in wrapperlib since they are version specific - excluded kuzu files and generated files everywhere except for examples since they depend on the version you want to generate
- Loading branch information
1 parent
8ab502f
commit 69ba7ce
Showing
316 changed files
with
11,833 additions
and
6,979 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Kuzu lib files (have to be inserted manually) | ||
# | ||
|
||
KuzuFiles/*.h | ||
KuzuFiles/*.hpp | ||
KuzuFiles/*.dll | ||
KuzuFiles/*.lib | ||
|
||
# | ||
# SWIG generated classes (have to be generated) | ||
# | ||
|
||
KuzuFiles/generated_classes/** | ||
wrapperlib/kuzu_wrap.cpp | ||
|
||
# | ||
# Cmake and build files | ||
# | ||
|
||
wrapperlib/build/** | ||
|
||
# | ||
# Visual studio files | ||
# | ||
|
||
**/.vs/* | ||
|
||
# | ||
# VS build files | ||
# | ||
|
||
**/bin/* | ||
**/obj/* |
8 changes: 4 additions & 4 deletions
8
...n/Debug/KuzuDB-TestAndExplorer.exe.config → KuzuDB-net/ConsoleAppExample/App.config
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
</startup> | ||
</configuration> | ||
</configuration> |
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,72 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{079FC394-EAC1-4C84-9AFD-487EFB121741}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>ConsoleAppExample</RootNamespace> | ||
<AssemblyName>ConsoleAppExample</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="csv\cities.csv"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="csv\follows.csv"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="csv\lives-in.csv"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="csv\users.csv"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\KuzuDB-Net\KuzuDB-Net.csproj"> | ||
<Project>{fffc5493-3af3-403c-81ae-a4b7c0285dc8}</Project> | ||
<Name>KuzuDB-Net</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// this simple console app demonstrates the usage of Kuzu v.0.3.2 | ||
|
||
using System; | ||
using static kuzunet; | ||
|
||
namespace ConsoleAppExample | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
kuzu_database db = kuzu_database_init("test", kuzu_default_system_config()); | ||
kuzu_connection conn = kuzu_connection_init(db); | ||
|
||
kuzu_query_result result; | ||
|
||
result = kuzu_connection_query(conn, "CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))"); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "CREATE NODE TABLE City(name STRING, population INT64, PRIMARY KEY (name))"); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "CREATE REL TABLE Follows(FROM User TO User, since INT64)"); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "CREATE REL TABLE LivesIn(FROM User TO City)"); | ||
kuzu_query_result_destroy(result); | ||
|
||
result = kuzu_connection_query(conn, "COPY User FROM \"csv/users.csv\""); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "COPY City FROM \"csv/cities.csv\""); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "COPY Follows FROM \"csv/follows.csv\""); | ||
kuzu_query_result_destroy(result); | ||
result = kuzu_connection_query(conn, "COPY LivesIn FROM \"csv/lives.csv\""); | ||
kuzu_query_result_destroy(result); | ||
|
||
result = kuzu_connection_query(conn, "MATCH (a:User)-[f:Follows]->(b:User) RETURN a.name, f.since, b.name;"); | ||
|
||
while (kuzu_query_result_has_next(result)) | ||
{ | ||
|
||
kuzu_flat_tuple tuple = kuzu_query_result_get_next(result); | ||
kuzu_value value; | ||
|
||
value = kuzu_flat_tuple_get_value(tuple, 0); | ||
String name = kuzu_value_get_string(value); | ||
kuzu_value_destroy(value); | ||
|
||
value = kuzu_flat_tuple_get_value(tuple, 1); | ||
String since = kuzu_value_get_string(value); | ||
kuzu_value_destroy(value); | ||
|
||
value = kuzu_flat_tuple_get_value(tuple, 2); | ||
String name2 = kuzu_value_get_string(value); | ||
kuzu_value_destroy(value); | ||
|
||
Console.WriteLine(String.Format("{0} follows {1} since {2}", name, name2, since)); | ||
kuzu_flat_tuple_destroy(tuple); | ||
} | ||
kuzu_query_result_destroy(result); | ||
kuzu_connection_destroy(conn); | ||
kuzu_database_destroy(db); | ||
|
||
Console.WriteLine("Press enter to close..."); | ||
Console.ReadLine(); | ||
} | ||
} | ||
} |
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 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("ConsoleAppExample")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("ConsoleAppExample")] | ||
[assembly: AssemblyCopyright("Copyright © 2024")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("079fc394-eac1-4c84-9afd-487efb121741")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.