Skip to content

Commit 1afba75

Browse files
committed
Minor fixes
1 parent 4f7296d commit 1afba75

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

modules/sdk-test-cs/Lib.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ public static void insert_user(ReducerContext ctx, string name, Identity identit
20632063
[SpacetimeDB.View(Name = "my_user", Public = true)]
20642064
public static Users? MyUser(ViewContext ctx)
20652065
{
2066-
return ctx.Db.users.identity.Find(ctx.Sender) as Users;
2066+
return ctx.Db.users.identity.Find(ctx.Sender) as Users?;
20672067
}
20682068

20692069
[SpacetimeDB.Table(Name = "indexed_simple_enum", Public = true)]

sdks/csharp/examples~/regression-tests/client/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DbConnection ConnectToDB()
3838
}
3939

4040
uint waiting = 0;
41-
bool applied = false;
41+
var applied = false;
4242
SubscriptionHandle? handle = null;
4343

4444
void OnConnected(DbConnection conn, Identity identity, string authToken)
@@ -133,21 +133,21 @@ void OnSubscriptionApplied(SubscriptionEventContext context)
133133
ValidateBTreeIndexes(ctx);
134134
waiting--;
135135
});
136-
137-
136+
137+
138138
// Views test
139139
Log.Debug("Calling Iter on View");
140140
var viewIterRows = context.Db.MyPlayer.Iter();
141141
Debug.Assert(viewIterRows != null && viewIterRows.Any());
142-
142+
143143
Log.Debug("Calling RemoteQuery on View");
144144
var viewRemoteQueryRows = context.Db.MyPlayer.RemoteQuery("WHERE Id > 0");
145145
Debug.Assert(viewRemoteQueryRows != null && viewRemoteQueryRows.Result.Length > 0);
146-
146+
147147
Log.Debug("Calling Iter on Anonymous View");
148148
var anonViewIterRows = context.Db.PlayersForLevel.Iter();
149149
Debug.Assert(anonViewIterRows != null && anonViewIterRows.Any());
150-
150+
151151
Log.Debug("Calling RemoteQuery on Anonymous View");
152152
var anonViewRemoteQueryRows = context.Db.PlayersForLevel.RemoteQuery($"WHERE Level = 1)");
153153
Debug.Assert(anonViewRemoteQueryRows != null && anonViewRemoteQueryRows.Result.Length > 0);

sdks/csharp/examples~/regression-tests/server/Lib.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public partial struct PlayerLevel
3838
public ulong Level;
3939
}
4040

41-
[Type]
42-
public partial struct TransportData
43-
{
44-
public int TroopCount;
45-
}
46-
4741
[SpacetimeDB.Type]
4842
public partial struct PlayerAndLevel
4943
{

0 commit comments

Comments
 (0)