Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-981350 Structured types for json format - work in progress #966

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ jobs:
- name: Build Driver
run: |
cd Snowflake.Data.Tests
dotnet restore
dotnet restore --force
dotnet build -f ${{ matrix.dotnet }}
- name: Run Tests
run: |
cd Snowflake.Data.Tests
echo "printing exiting dlls"
ls "bin\Debug\*"
ls "bin\Debug\${{ matrix.dotnet }}\*"
dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config
env:
snowflake_cloud_env: ${{ matrix.cloud_env }}
Expand Down
98 changes: 98 additions & 0 deletions Snowflake.Data.Tests/Client/Address.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
using System.Collections.Generic;

namespace Snowflake.Data.Tests.IntegrationTests
{
public class Address
{
public string city { get; set; }
public string state { get; set; }
public Zip zip { get; set; }

public Address()
{
}

public Address(string city, string state, Zip zip)
{
this.city = city;
this.state = state;
this.zip = zip;
}
}

public class Zip
{
public string prefix { get; set; }
public string postfix { get; set; }

public Zip()
{
}

public Zip(string prefix, string postfix)
{
this.prefix = prefix;
this.postfix = postfix;
}
}

public class Identity
{
public string Name { get; set; }

public Identity()
{
}

public Identity(string name)
{
Name = name;
}

protected bool Equals(Identity other)
{
return Name == other.Name;
}

public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((Identity)obj);
}

public override int GetHashCode()
{
return (Name != null ? Name.GetHashCode() : 0);
}
}

public class Grades
{
public string[] Names { get; set; }

public Grades()
{
}

public Grades(string[] names)
{
Names = names;
}
}

public class GradesWithList
{
public List<string> Names { get; set; }

public GradesWithList()
{
}

public GradesWithList(List<string> names)
{
Names = names;
}
}
}
Loading
Loading