public ITransaction Update(IDocumentReference document, FieldPath field, object?value, params object?[] moreFieldsAndValues) { var wrapper = (DocumentReferenceWrapper)document; _transaction.Update((DocumentReference)wrapper, field?.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()); return(this); }
public void UpdateData(FieldPath field, object value, CompletionHandler handler, params object[] moreFieldsAndValues) { _documentReference.Update(field.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public IQuery OrderBy(FieldPath field, bool descending) { var direction = descending ? Query.Direction.Descending : Query.Direction.Ascending; var query = _query.OrderBy(field.ToNative(), direction); return(new QueryWrapper(query)); }
public Task UpdateDataAsync(FieldPath field, object value, params object[] moreFieldsAndValues) { var tcs = new TaskCompletionSource <bool>(); _documentReference.Update(field.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { if (task.IsSuccessful) { tcs.SetResult(true); } else { tcs.SetException(ExceptionMapper.Map(task.Exception)); } })); return(tcs.Task); }
public IQuery WhereLessThan(FieldPath field, object value) { var query = _query.WhereLessThan(field.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery WhereArrayContains(FieldPath field, object value) { var query = _query.WhereArrayContains(field.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public T Get <T>(FieldPath field, ServerTimestampBehavior serverTimestampBehavior) { return((T)_documentSnapshot.GetValue(field?.ToNative(), serverTimestampBehavior.ToNative()).ToFieldValue(new DocumentFieldInfo <T>())); }
public IQuery WhereEqualsTo(FieldPath field, object?value) { var query = _collectionReference.WhereEqualsTo(field?.ToNative() !, value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery WhereEqualsTo(FieldPath field, object?value) { var query = _query.WhereEqualTo(field?.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public T Get <T>(FieldPath field) { return((T)_documentSnapshot.GetValue(field?.ToNative()).ToFieldValue(new DocumentFieldInfo <T>())); }
public IQuery WhereArrayContains(FieldPath field, object value) { var query = _collectionReference.WhereArrayContains(field?.ToNative() !, value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery WhereLessThanOrEqualsTo(FieldPath field, object value) { var query = _collectionReference.WhereLessThanOrEqualTo(field.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery WhereArrayContainsAny(FieldPath field, IEnumerable <object> values) { var query = _query.WhereArrayContains(field?.ToNative(), values?.Select(x => x.ToNativeFieldValue()).ToArray()); return(new QueryWrapper(query)); }
public IQuery WhereGreaterThanOrEqualsTo(FieldPath field, object value) { var query = _query.WhereGreaterThanOrEqualsTo(field.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery WhereIn(FieldPath field, IEnumerable <object> values) { var query = _collectionReference.WhereFieldIn(field?.ToNative(), values?.Select(x => x.ToNativeFieldValue()).ToArray()); return(new QueryWrapper(query)); }
public IQuery WhereGreaterThan(FieldPath field, object value) { var query = _collectionReference.WhereGreaterThan(field.ToNative(), value.ToNativeFieldValue()); return(new QueryWrapper(query)); }
public IQuery OrderBy(FieldPath field) { var query = _collectionReference.OrderBy(field.ToNative()); return(new QueryWrapper(query)); }
public IQuery OrderBy(FieldPath field) { var query = _query.OrderedBy(field.ToNative()); return(new QueryWrapper(query)); }
public IQuery WhereIn(FieldPath field, IEnumerable <object> values) { var query = _query.WhereIn(field?.ToNative(), values?.Select(x => x.ToNativeFieldValue()).ToList()); return(new QueryWrapper(query)); }
public IQuery OrderBy(FieldPath field, bool descending) { var query = _query.OrderedBy(field.ToNative(), descending); return(new QueryWrapper(query)); }
public IQuery OrderBy(FieldPath field, bool descending) { var query = _collectionReference.OrderedBy(field?.ToNative(), descending); return(new QueryWrapper(query)); }
public void UpdateData(IDocumentReference document, FieldPath field, object value, params object[] moreFieldsAndValues) { var wrapper = (DocumentReferenceWrapper)document; _writeBatch.Update((DocumentReference)wrapper, field.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()); }
public IWriteBatch Update(IDocumentReference document, FieldPath field, object?value, params object?[] moreFieldsAndValues) { _writeBatch.Update(document.ToNative(), field?.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()); return(this); }