recordCallback (msg) {
    let key = msg.data[0]
    let version = parseInt(msg.data[1], 10)
    if (msg.action === C.ACTIONS.PATCH) {
      let path = msg.data[2]
      let value = this.server.convertTyped(msg.data[3])
      if (!this.data[key]) this.data[key] = {_d: {}}
      new JsonPath(path).setValue(this.data[key]._d, value)
      this.data[key]._v = version
      this.sheduleSave()
    } else if (msg.action === C.ACTIONS.UPDATE) {
      let value = this.server.convertTyped(msg.data[2])
      if (!this.data[key]) this.data[key] = {}
      this.data[key]._d = value
      this.data[key]._v = version
      this.sheduleSave()
    } else if (msg.action === C.ACTIONS.DELETE) {
      if (this.data[key]) delete this.data[key]
      this.sheduleSave()
    }
  }
/**
   * Record listener to update records by messages from other deepstream nodes
   * @param  {Object} msg
   */
Record listener to update records by messages from other deepstream nodes
@param  {Object} msg
Record listener to update records by messages from other deepstream nodes @param { Object } msg
recordCallback (msg) {
    let key = msg.data[0]
    let version = parseInt(msg.data[1], 10)
    if (msg.action === C.ACTIONS.PATCH) {
      let path = msg.data[2]
      let value = this.server.convertTyped(msg.data[3])
      if (!this.data[key]) this.data[key] = {_d: {}}
      new JsonPath(path).setValue(this.data[key]._d, value)
      this.data[key]._v = version
      this.sheduleSave()
    } else if (msg.action === C.ACTIONS.UPDATE) {
      let value = this.server.convertTyped(msg.data[2])
      if (!this.data[key]) this.data[key] = {}
      this.data[key]._d = value
      this.data[key]._v = version
      this.sheduleSave()
    } else if (msg.action === C.ACTIONS.DELETE) {
      if (this.data[key]) delete this.data[key]
      this.sheduleSave()
    }
  }
recordCallback ( msg ) { let key = msg . data [ 0 ] let version = parseInt ( msg . data [ 1 ] , 10 ) if ( msg . action === C . ACTIONS . PATCH ) { let path = msg . data [ 2 ] let value = this . server . convertTyped ( msg . data [ 3 ] ) if ( ! this . data [ key ] ) this . data [ key ] = { _d : { } } new JsonPath ( path ) . setValue ( this . data [ key ] . _d , value ) this . data [ key ] . _v = version this . sheduleSave ( ) } else if ( msg . action === C . ACTIONS . UPDATE ) { let value = this . server . convertTyped ( msg . data [ 2 ] ) if ( ! this . data [ key ] ) this . data [ key ] = { } this . data [ key ] . _d = value this . data [ key ] . _v = version this . sheduleSave ( ) } else if ( msg . action === C . ACTIONS . DELETE ) { if ( this . data [ key ] ) delete this . data [ key ] this . sheduleSave ( ) } }
Record listener to update records by messages from other deepstream nodes
 @param  {Object} msg
Record listener to update records by messages from other deepstream nodes @param { Object } msg