public void SubscribeSnapshot(CloudDBZoneQuery cloudDBZoneQuery, CloudDBZoneQuery.CloudDBZoneQueryPolicy cloudDBZoneQueryPolicy, OnSnapshotListener listener) { if (mCloudDBZone == null) { Debug.Log($"[{TAG}]: CloudDBZone is null, try re-open it"); return; } mCloudDBZone.SubscribeSnapshot(cloudDBZoneQuery, cloudDBZoneQueryPolicy, listener); }
public void SubscribeSnapshot(CloudDBZoneQuery cloudDBZoneQuery, CloudDBZoneQuery.CloudDBZoneQueryPolicy cloudDBZoneQueryPolicy) { if (mCloudDBZone == null) { Debug.LogError($"[{TAG}]: CloudDBZone is null, try re-open it"); return; } mRegister = mCloudDBZone.SubscribeSnapshot(cloudDBZoneQuery, cloudDBZoneQueryPolicy, OnCloudDBZoneSnapshot, OnCloudDBZoneSnapshotException); Debug.Log($"[{TAG}]: SubscribeSnaphot()"); }
public void ExecuteQuery(CloudDBZoneQuery query, CloudDBZoneQuery.CloudDBZoneQueryPolicy CloudDBZoneQueryPolicy) { if (mCloudDBZone == null) { Debug.Log($"[{TAG}]: CloudDBZone is null, try re-open it"); return; } mCloudDBZone.ExecuteQuery <BookInfo>(query, CloudDBZoneQueryPolicy) .AddOnSuccessListener(snapshot => { Debug.Log($"[{TAG}]: mCloudDBZone.ExecuteQuery AddOnSuccessListener"); OnExecuteQuerySuccess?.Invoke(snapshot); }).AddOnFailureListener(exception => { OnExecuteQueryFailed?.Invoke(exception); Debug.Log($"[{TAG}]: mCloudDBZone.ExecuteQuery AddOnFailureListener " + exception.WrappedCauseMessage + " - " + exception.WrappedExceptionMessage + " - "); }); }
public void ExecuteCountQuery(CloudDBZoneQuery query, string fieldName, CloudDBZoneQuery.CloudDBZoneQueryPolicy CloudDBZoneQueryPolicy) { if (mCloudDBZone == null) { Debug.Log($"[{TAG}]: CloudDBZone is null, try re-open it"); return; } mCloudDBZone.ExecuteCountQuery(query, fieldName, CloudDBZoneQueryPolicy) .AddOnSuccessListener(result => { OnExecuteCountQuerySuccess?.Invoke(result); Debug.Log($"[{TAG}]: mCloudDBZone.ExecuteCountQuery AddOnSuccessListener " + result); }) .AddOnFailureListener(exception => { OnExecuteCountQueryFailed?.Invoke(exception); Debug.Log($"[{TAG}]: mCloudDBZone.ExecuteCountQuery AddOnFailureListener " + exception.WrappedCauseMessage + " - " + exception.WrappedExceptionMessage + " - "); }); }