fs.Initialize("Firestore",True)
Dim users As CollectionReference = fs.collection("Users","UserCollection")
If users <> Null Then
Log("Setting query to get Users")
'driver.whereEqualTo("id","DonManfred").limit(1).fetch("DriverFetch")
users.setEventname("UserWatch","Userlist")
'users.addSnapshotListener
users.orderBy("Username").limit(25).fetch("UserWatch")
wait for UserWatch_Snapshot(success As Boolean, snap As QuerySnapshot, info As String)
Log($"UserWatch_Snapshot(${success},${snap.Size},${snap})"$)
Dim meta As SnapshotMetadata = snap.Metadata
Dim documents As List = snap.Documents
'Log(documents)
If documents.IsInitialized Then
If documents.Size > 0 Then
For i = 0 To documents.Size-1
Dim docsnap As DocumentSnapshot = documents.Get(i)
Log("Query DocumentNo: #"&i&": "&docsnap.Id)
Dim data As Map = docsnap.Data
Log(data)
Next
End If
End If
Else
Log("Snapshot does not contain a list of Documents...")
End If