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

C#: *BTreeIndexBounds => *IndexScanRangeBounds #2270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,27 @@ internal sealed class LocationIndex()
{
public IEnumerable<global::BTreeMultiColumn> Filter(uint X) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public ulong Delete(uint X) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public IEnumerable<global::BTreeMultiColumn> Filter(Bound<uint> X) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public ulong Delete(Bound<uint> X) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public IEnumerable<global::BTreeMultiColumn> Filter((uint X, uint Y) f) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -130,7 +130,7 @@ public ulong Delete(Bound<uint> X) =>

public ulong Delete((uint X, uint Y) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -140,7 +140,7 @@ public ulong Delete((uint X, uint Y) f) =>

public IEnumerable<global::BTreeMultiColumn> Filter((uint X, Bound<uint> Y) f) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -150,7 +150,7 @@ public ulong Delete((uint X, uint Y) f) =>

public ulong Delete((uint X, Bound<uint> Y) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -160,7 +160,7 @@ public ulong Delete((uint X, Bound<uint> Y) f) =>

public IEnumerable<global::BTreeMultiColumn> Filter((uint X, uint Y, uint Z) f) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -172,7 +172,7 @@ public ulong Delete((uint X, Bound<uint> Y) f) =>

public ulong Delete((uint X, uint Y, uint Z) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -186,7 +186,7 @@ public ulong Delete((uint X, uint Y, uint Z) f) =>
(uint X, uint Y, Bound<uint> Z) f
) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -198,7 +198,7 @@ public ulong Delete((uint X, uint Y, uint Z) f) =>

public ulong Delete((uint X, uint Y, Bound<uint> Z) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand Down Expand Up @@ -302,27 +302,27 @@ internal sealed class LocationIndex()
{
public IEnumerable<global::BTreeViews> Filter(uint X) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public ulong Delete(uint X) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public IEnumerable<global::BTreeViews> Filter(Bound<uint> X) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public ulong Delete(Bound<uint> X) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<uint, SpacetimeDB.BSATN.U32>(X)
new SpacetimeDB.Internal.IndexScanRangeBounds<uint, SpacetimeDB.BSATN.U32>(X)
);

public IEnumerable<global::BTreeViews> Filter((uint X, uint Y) f) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -332,7 +332,7 @@ public ulong Delete(Bound<uint> X) =>

public ulong Delete((uint X, uint Y) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -342,7 +342,7 @@ public ulong Delete((uint X, uint Y) f) =>

public IEnumerable<global::BTreeViews> Filter((uint X, Bound<uint> Y) f) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -352,7 +352,7 @@ public ulong Delete((uint X, uint Y) f) =>

public ulong Delete((uint X, Bound<uint> Y) f) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<
new SpacetimeDB.Internal.IndexScanRangeBounds<
uint,
SpacetimeDB.BSATN.U32,
uint,
Expand All @@ -368,28 +368,28 @@ internal sealed class FactionIndex()
{
public IEnumerable<global::BTreeViews> Filter(string Faction) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Faction
)
);

public ulong Delete(string Faction) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Faction
)
);

public IEnumerable<global::BTreeViews> Filter(Bound<string> Faction) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Faction
)
);

public ulong Delete(Bound<string> Faction) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Faction
)
);
Expand Down Expand Up @@ -490,28 +490,28 @@ public sealed class NameIndex()
{
public IEnumerable<global::MultiTableRow> Filter(string Name) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Name
)
);

public ulong Delete(string Name) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Name
)
);

public IEnumerable<global::MultiTableRow> Filter(Bound<string> Name) =>
DoFilter(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Name
)
);

public ulong Delete(Bound<string> Name) =>
DoDelete(
new SpacetimeDB.Internal.BTreeIndexBounds<string, SpacetimeDB.BSATN.String>(
new SpacetimeDB.Internal.IndexScanRangeBounds<string, SpacetimeDB.BSATN.String>(
Name
)
);
Expand Down
10 changes: 5 additions & 5 deletions crates/bindings-csharp/Codegen/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,17 @@ public IEnumerable<string> GenerateViewFilters(TableView view)

yield return $$"""
public IEnumerable<{{globalName}}> Filter({{argsScalar}}) =>
DoFilter(new SpacetimeDB.Internal.BTreeIndexBounds<{{types}}>({{argName}}));
DoFilter(new SpacetimeDB.Internal.IndexScanRangeBounds<{{types}}>({{argName}}));

public ulong Delete({{argsScalar}}) =>
DoDelete(new SpacetimeDB.Internal.BTreeIndexBounds<{{types}}>({{argName}}));
DoDelete(new SpacetimeDB.Internal.IndexScanRangeBounds<{{types}}>({{argName}}));

public IEnumerable<{{globalName}}> Filter({{argsBounds}}) =>
DoFilter(new SpacetimeDB.Internal.BTreeIndexBounds<{{types}}>({{argName}}));
DoFilter(new SpacetimeDB.Internal.IndexScanRangeBounds<{{types}}>({{argName}}));

public ulong Delete({{argsBounds}}) =>
DoDelete(new SpacetimeDB.Internal.BTreeIndexBounds<{{types}}>({{argName}}));
DoDelete(new SpacetimeDB.Internal.IndexScanRangeBounds<{{types}}>({{argName}}));

""";
}

Expand Down
Loading
Loading