code: function getMaxOperationId() {
          var query = new Query(operationTableName);
          return store.read(query.orderByDescending('id').take(1)).then(function(result) {
              Validate.isArray(result);
              
              if (result.length === 0) {
                  return 0;
              } else if (result.length === 1) {
                  return result[0].id;
              } else {
                  throw new Error('something is wrong!');
              }
          });
      }
docs: Gets the largest operation ID from the operation table
  If there are no records in the operation table, returns 0.