@@ -50,7 +50,7 @@ void OnConnected(DbConnection conn, Identity identity, string authToken)
5050 {
5151 throw err ;
5252 } )
53- . Subscribe ( [ "SELECT * FROM ExampleData" ] ) ;
53+ . Subscribe ( [ "SELECT * FROM ExampleData" , "SELECT * FROM MyPlayer" ] ) ;
5454
5555 conn . Reducers . OnAdd += ( ReducerEventContext ctx , uint id , uint indexed ) =>
5656 {
@@ -134,14 +134,23 @@ void OnSubscriptionApplied(SubscriptionEventContext context)
134134 waiting -- ;
135135 } ) ;
136136
137+
137138 // Views test
138- Log . Debug ( "Calling View" ) ;
139- var viewRows = context . Db . GetUserByContext . Iter ( ) . FirstOrDefault ( ) ;
140- Debug . Assert ( viewRows != null && viewRows . IdentityString == context . Identity ? . ToString ( ) ) ;
139+ Log . Debug ( "Calling Iter on View" ) ;
140+ var viewIterRows = context . Db . MyPlayer . Iter ( ) ;
141+ Debug . Assert ( viewIterRows != null && viewIterRows . Any ( ) ) ;
142+
143+ Log . Debug ( "Calling RemoteQuery on View" ) ;
144+ var viewRemoteQueryRows = context . Db . MyPlayer . RemoteQuery ( "WHERE Id > 0" ) ;
145+ Debug . Assert ( viewRemoteQueryRows != null && viewRemoteQueryRows . Result . Length > 0 ) ;
146+
147+ Log . Debug ( "Calling Iter on Anonymous View" ) ;
148+ var anonViewIterRows = context . Db . PlayersForLevel . Iter ( ) ;
149+ Debug . Assert ( anonViewIterRows != null && anonViewIterRows . Any ( ) ) ;
141150
142- Log . Debug ( "Calling Anonymous View" ) ;
143- var anonViewRows = context . Db . GetUserByString . RemoteQuery ( "Where IdentityString = identityStringExample ") ;
144- Debug . Assert ( anonViewRows != null && anonViewRows . Result . Length > 0 ) ;
151+ Log . Debug ( "Calling RemoteQuery on Anonymous View" ) ;
152+ var anonViewRemoteQueryRows = context . Db . PlayersForLevel . RemoteQuery ( $ "WHERE Level = 1) ") ;
153+ Debug . Assert ( anonViewRemoteQueryRows != null && anonViewRemoteQueryRows . Result . Length > 0 ) ;
145154}
146155
147156System . AppDomain . CurrentDomain . UnhandledException += ( sender , args ) =>
0 commit comments