B2G/gecko/services/sync/modules/engines.js
/**
   * Apply a single record against the store.
   *
   * This takes a single record and makes the local changes required so the
   * local state matches what's in the record.
   *
   * The default implementation calls one of remove(), create(), or update()
   * depending on the state obtained from the store itself. Store
   * implementations may overwrite this function if desired.
   *
   * @param record
   *        Record to apply
   */
Apply a single record against the store.
This takes a single record and makes the local changes required so the
local state matches what's in the record.

The default implementation calls one of remove(), create(), or update()
depending on the state obtained from the store itself. Store
implementations may overwrite this function if desired.

@param record
Record to apply
Apply a single record against the store . This takes a single record and makes the local changes required so the local state matches what ' s in the record . The default implementation calls one of remove () create () or update () depending on the state obtained from the store itself . Store implementations may overwrite this function if desired . @param record Record to apply
function Store_applyIncoming(record) {
    if (record.deleted)
      this.remove(record);
    else if (!this.itemExists(record.id))
      this.create(record);
    else
      this.update(record);
  }
function Store_applyIncoming ( record ) { if ( record . deleted ) this . remove ( record ) ; else if ( ! this . itemExists ( record . id ) ) this . create ( record ) ; else this . update ( record ) ; }
Apply a single record against the store.
Apply a single record against the store .