Skip to content

Uncommented out 'delete by index' test code #3156

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 2 additions & 3 deletions modules/module-test-cs/Lib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
[Type]
public partial record Baz
{
public string field;

Check warning on line 70 in modules/module-test-cs/Lib.cs

View workflow job for this annotation

GitHub Actions / Test Suite

Non-nullable field 'field' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
}

[Type]
Expand Down Expand Up @@ -96,7 +96,7 @@
[Type]
public partial record TestFBaz
{
public string value;

Check warning on line 99 in modules/module-test-cs/Lib.cs

View workflow job for this annotation

GitHub Actions / Test Suite

Non-nullable field 'value' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
}

[Type]
Expand Down Expand Up @@ -178,7 +178,7 @@
// We can derive `Deserialize` for lifetime generic types:
public partial class Foo
{
public string field { get; set; }

Check warning on line 181 in modules/module-test-cs/Lib.cs

View workflow job for this annotation

GitHub Actions / Test Suite

Non-nullable property 'field' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

// TODO: Bsatn seems not to be available in C# yet
//
Expand Down Expand Up @@ -294,12 +294,11 @@
var rowCountBeforeDelete = ctx.Db.test_a.Count;
Log.Info($"Row count before delete: {rowCountBeforeDelete}");

uint numDeleted = 0;
ulong numDeleted = 0;
// Delete rows using the "foo" index (from 5 up to, but not including, 10).
for (uint row = 5; row < 10; row++)
{
// FIXME: Apparently in Rust you can delete by index, but in C# you can't.
// numDeleted += ctx.Db.test_a.foo.Delete(row);
numDeleted += ctx.Db.test_a.foo.Delete(row);
}

var rowCountAfterDelete = ctx.Db.test_a.Count;
Expand Down
Loading