mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[android,js][database] transactions support implemented
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
import { NativeModules, NativeEventEmitter } from 'react-native';
|
||||
|
||||
import { Base } from './../base';
|
||||
import Snapshot from './snapshot.js';
|
||||
import Reference from './reference.js';
|
||||
import Snapshot from './snapshot';
|
||||
import Reference from './reference';
|
||||
import TransactionHandler from './transaction';
|
||||
import { promisify } from './../../utils';
|
||||
|
||||
const FirebaseDatabase = NativeModules.RNFirebaseDatabase;
|
||||
@@ -19,10 +20,11 @@ export default class Database extends Base {
|
||||
constructor(firebase: Object, options: Object = {}) {
|
||||
super(firebase, options);
|
||||
this.subscriptions = {};
|
||||
this.errorSubscriptions = {};
|
||||
this.serverTimeOffset = 0;
|
||||
this.errorSubscriptions = {};
|
||||
this.persistenceEnabled = false;
|
||||
this.namespace = 'firebase:database';
|
||||
this.transaction = new TransactionHandler(firebase, this, FirebaseDatabaseEvt);
|
||||
|
||||
if (firebase.options.persistence === true) {
|
||||
this._setPersistence(true);
|
||||
|
||||
Reference in New Issue
Block a user