mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-24 00:22:21 -04:00
41 lines
1.4 KiB
C#
Generated
41 lines
1.4 KiB
C#
Generated
//HintName: PrivateTable.cs
|
|
|
|
// <auto-generated />
|
|
#nullable enable
|
|
|
|
partial class PrivateTable
|
|
{
|
|
private static readonly Lazy<SpacetimeDB.RawBindings.TableId> tableId =
|
|
new(() => SpacetimeDB.Runtime.GetTableId(nameof(PrivateTable)));
|
|
|
|
public static IEnumerable<PrivateTable> Iter() =>
|
|
new SpacetimeDB.Runtime.RawTableIter(tableId.Value).Parse<PrivateTable>();
|
|
|
|
public static SpacetimeDB.Module.TableDesc MakeTableDesc(
|
|
SpacetimeDB.BSATN.ITypeRegistrar registrar
|
|
) =>
|
|
new(
|
|
new(nameof(PrivateTable), new SpacetimeDB.Module.ColumnDefWithAttrs[] { }, false),
|
|
(SpacetimeDB.BSATN.AlgebraicType.Ref)new BSATN().GetAlgebraicType(registrar)
|
|
);
|
|
|
|
private static readonly Lazy<KeyValuePair<
|
|
string,
|
|
Action<BinaryWriter, object?>
|
|
>[]> fieldTypeInfos = new(() => new KeyValuePair<string, Action<BinaryWriter, object?>>[] { });
|
|
|
|
public static IEnumerable<PrivateTable> Query(
|
|
System.Linq.Expressions.Expression<Func<PrivateTable, bool>> filter
|
|
) =>
|
|
new SpacetimeDB.Runtime.RawTableIterFiltered(
|
|
tableId.Value,
|
|
SpacetimeDB.Filter.Filter.Compile<PrivateTable>(fieldTypeInfos.Value, filter)
|
|
).Parse<PrivateTable>();
|
|
|
|
public void Insert()
|
|
{
|
|
var bytes = SpacetimeDB.Runtime.Insert(tableId.Value, this);
|
|
// bytes should contain modified value now with autoinc fields updated
|
|
}
|
|
} // PrivateTable
|