From 5813188bbd5b514e98206d39c463546e8faf768b Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 27 Apr 2016 20:26:03 -0700 Subject: [PATCH 01/14] 0.4.0 --- .gitignore | 2 - dist/js-data-adapter.js | 1633 +++++++++++++++++++++++++++++++++++ dist/js-data-adapter.js.map | 1 + 3 files changed, 1634 insertions(+), 2 deletions(-) create mode 100644 dist/js-data-adapter.js create mode 100644 dist/js-data-adapter.js.map diff --git a/.gitignore b/.gitignore index 5b615c8..f42affc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ node_modules coverage doc -dist/*.js -dist/*.map \ No newline at end of file diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js new file mode 100644 index 0000000..55d9a77 --- /dev/null +++ b/dist/js-data-adapter.js @@ -0,0 +1,1633 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('js-data')) : + typeof define === 'function' && define.amd ? define('js-data-adapter', ['js-data'], factory) : + (factory(global.JSData)); +}(this, function (jsData) { 'use strict'; + + var babelHelpers = {}; + babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + babelHelpers.defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + + babelHelpers.slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + + babelHelpers; + + var noop = function noop() { + var self = this; + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var opts = args[args.length - 1]; + self.dbg.apply(self, [opts.op].concat(args)); + return jsData.utils.resolve(); + }; + + var noop2 = function noop2() { + var self = this; + + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + var opts = args[args.length - 2]; + self.dbg.apply(self, [opts.op].concat(args)); + return jsData.utils.resolve(); + }; + + var unique = function unique(array) { + var seen = {}; + var final = []; + array.forEach(function (item) { + if (item in seen) { + return; + } + final.push(item); + seen[item] = 0; + }); + return final; + }; + + var withoutRelations = function withoutRelations(mapper, props) { + return jsData.utils.omit(props, mapper.relationFields || []); + }; + + var DEFAULTS = { + /** + * Whether to log debugging information. + * + * @name Adapter#debug + * @type {boolean} + * @default false + */ + debug: false, + + /** + * Whether to return a more detailed response object. + * + * @name Adapter#raw + * @type {boolean} + * @default false + */ + raw: false + }; + + /** + * Abstract class meant to be extended by adapters. + * + * @class Adapter + * @abstract + * @param {Object} [opts] Configuration opts. + * @param {boolean} [opts.debug=false] Whether to log debugging information. + * @param {boolean} [opts.raw=false] Whether to return a more detailed response + * object. + */ + function Adapter(opts) { + var self = this; + opts || (opts = {}); + jsData.utils.fillIn(opts, DEFAULTS); + jsData.utils.fillIn(self, opts); + } + + Adapter.reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; + + /** + * Response object used when `raw` is `true`. May contain other fields in + * addition to `data`. + * + * @typedef {Object} Response + * @property {Object} data Response data. + * @property {string} op The operation for which the response was created. + */ + function Response(data, meta, op) { + var self = this; + meta || (meta = {}); + self.data = data; + jsData.utils.fillIn(self, meta); + self.op = op; + } + + Adapter.Response = Response; + + /** + * Alternative to ES6 class syntax for extending `Adapter`. + * + * @name Adapter.extend + * @method + * @param {Object} [instanceProps] Properties that will be added to the + * prototype of the subclass. + * @param {Object} [classProps] Properties that will be added as static + * properties to the subclass itself. + * @return {Object} Subclass of `Adapter`. + */ + Adapter.extend = jsData.utils.extend; + + Adapter.noop = noop; + Adapter.noop2 = noop2; + Adapter.unique = unique; + + jsData.utils.addHiddenPropsToTarget(Adapter.prototype, { + /** + * Lifecycle method method called by count. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes count to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. + * + * @name Adapter#afterCount + * @method + * @param {Object} mapper The `mapper` argument passed to count. + * @param {Object} props The `props` argument passed to count. + * @param {Object} opts The `opts` argument passed to count. + * @property {string} opts.op `afterCount` + * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. + */ + afterCount: noop2, + + /** + * Lifecycle method method called by create. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes create to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. + * + * @name Adapter#afterCreate + * @method + * @param {Object} mapper The `mapper` argument passed to create. + * @param {Object} props The `props` argument passed to create. + * @param {Object} opts The `opts` argument passed to create. + * @property {string} opts.op `afterCreate` + * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`. + */ + afterCreate: noop2, + + /** + * Lifecycle method method called by createMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. + * + * @name Adapter#afterCreate + * @method + * @param {Object} mapper The `mapper` argument passed to createMany. + * @param {Object[]} props The `props` argument passed to createMany. + * @param {Object} opts The `opts` argument passed to createMany. + * @property {string} opts.op `afterCreateMany` + * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`. + */ + afterCreateMany: noop2, + + /** + * Lifecycle method method called by destroy. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. + * + * @name Adapter#afterDestroy + * @method + * @param {Object} mapper The `mapper` argument passed to destroy. + * @param {(string|number)} id The `id` argument passed to destroy. + * @param {Object} opts The `opts` argument passed to destroy. + * @property {string} opts.op `afterDestroy` + * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. + */ + afterDestroy: noop2, + + /** + * Lifecycle method method called by destroyAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. + * + * @name Adapter#afterDestroyAll + * @method + * @param {Object} mapper The `mapper` argument passed to destroyAll. + * @param {Object} query The `query` argument passed to destroyAll. + * @param {Object} opts The `opts` argument passed to destroyAll. + * @property {string} opts.op `afterDestroyAll` + * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. + */ + afterDestroyAll: noop2, + + /** + * Lifecycle method method called by find. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes find to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. + * + * @name Adapter#afterFind + * @method + * @param {Object} mapper The `mapper` argument passed to find. + * @param {(string|number)} id The `id` argument passed to find. + * @param {Object} opts The `opts` argument passed to find. + * @property {string} opts.op `afterFind` + * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`. + */ + afterFind: noop2, + + /** + * Lifecycle method method called by findAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. + * + * @name Adapter#afterFindAll + * @method + * @param {Object} mapper The `mapper` argument passed to findAll. + * @param {Object} query The `query` argument passed to findAll. + * @param {Object} opts The `opts` argument passed to findAll. + * @property {string} opts.op `afterFindAll` + * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`. + */ + afterFindAll: noop2, + + /** + * Lifecycle method method called by sum. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes sum to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. + * + * @name Adapter#afterSum + * @method + * @param {Object} mapper The `mapper` argument passed to sum. + * @param {string} field The `field` argument passed to sum. + * @param {Object} query The `query` argument passed to sum. + * @param {Object} opts The `opts` argument passed to sum. + * @property {string} opts.op `afterSum` + * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. + */ + afterSum: noop2, + + /** + * Lifecycle method method called by update. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes update to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. + * + * @name Adapter#afterUpdate + * @method + * @param {Object} mapper The `mapper` argument passed to update. + * @param {(string|number)} id The `id` argument passed to update. + * @param {Object} props The `props` argument passed to update. + * @param {Object} opts The `opts` argument passed to update. + * @property {string} opts.op `afterUpdate` + * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdate: noop2, + + /** + * Lifecycle method method called by updateAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. + * + * @name Adapter#afterUpdateAll + * @method + * @param {Object} mapper The `mapper` argument passed to updateAll. + * @param {Object} props The `props` argument passed to updateAll. + * @param {Object} query The `query` argument passed to updateAll. + * @param {Object} opts The `opts` argument passed to updateAll. + * @property {string} opts.op `afterUpdateAll` + * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdateAll: noop2, + + /** + * Lifecycle method method called by updateMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. + * + * @name Adapter#afterUpdateMany + * @method + * @param {Object} mapper The `mapper` argument passed to updateMany. + * @param {Object[]} records The `records` argument passed to updateMany. + * @param {Object} opts The `opts` argument passed to updateMany. + * @property {string} opts.op `afterUpdateMany` + * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdateMany: noop2, + + /** + * Lifecycle method method called by count. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes count to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. + * + * @name Adapter#beforeCount + * @method + * @param {Object} mapper The `mapper` argument passed to count. + * @param {Object} query The `query` argument passed to count. + * @param {Object} opts The `opts` argument passed to count. + * @property {string} opts.op `beforeCount` + */ + beforeCount: noop, + + /** + * Lifecycle method method called by create. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes create to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. + * + * @name Adapter#beforeCreate + * @method + * @param {Object} mapper The `mapper` argument passed to create. + * @param {Object} props The `props` argument passed to create. + * @param {Object} opts The `opts` argument passed to create. + * @property {string} opts.op `beforeCreate` + */ + beforeCreate: noop, + + /** + * Lifecycle method method called by createMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. + * + * @name Adapter#beforeCreateMany + * @method + * @param {Object} mapper The `mapper` argument passed to createMany. + * @param {Object[]} props The `props` argument passed to createMany. + * @param {Object} opts The `opts` argument passed to createMany. + * @property {string} opts.op `beforeCreateMany` + */ + beforeCreateMany: noop, + + /** + * Lifecycle method method called by destroy. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. + * + * @name Adapter#beforeDestroy + * @method + * @param {Object} mapper The `mapper` argument passed to destroy. + * @param {(string|number)} id The `id` argument passed to destroy. + * @param {Object} opts The `opts` argument passed to destroy. + * @property {string} opts.op `beforeDestroy` + */ + beforeDestroy: noop, + + /** + * Lifecycle method method called by destroyAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. + * + * @name Adapter#beforeDestroyAll + * @method + * @param {Object} mapper The `mapper` argument passed to destroyAll. + * @param {Object} query The `query` argument passed to destroyAll. + * @param {Object} opts The `opts` argument passed to destroyAll. + * @property {string} opts.op `beforeDestroyAll` + */ + beforeDestroyAll: noop, + + /** + * Lifecycle method method called by find. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes find to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. + * + * @name Adapter#beforeFind + * @method + * @param {Object} mapper The `mapper` argument passed to find. + * @param {(string|number)} id The `id` argument passed to find. + * @param {Object} opts The `opts` argument passed to find. + * @property {string} opts.op `beforeFind` + */ + beforeFind: noop, + + /** + * Lifecycle method method called by findAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. + * + * @name Adapter#beforeFindAll + * @method + * @param {Object} mapper The `mapper` argument passed to findAll. + * @param {Object} query The `query` argument passed to findAll. + * @param {Object} opts The `opts` argument passed to findAll. + * @property {string} opts.op `beforeFindAll` + */ + beforeFindAll: noop, + + /** + * Lifecycle method method called by sum. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes sum to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. + * + * @name Adapter#beforeSum + * @method + * @param {Object} mapper The `mapper` argument passed to sum. + * @param {Object} query The `query` argument passed to sum. + * @param {Object} opts The `opts` argument passed to sum. + * @property {string} opts.op `beforeSum` + */ + beforeSum: noop, + + /** + * Lifecycle method method called by update. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes update to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. + * + * @name Adapter#beforeUpdate + * @method + * @param {Object} mapper The `mapper` argument passed to update. + * @param {(string|number)} id The `id` argument passed to update. + * @param {Object} props The `props` argument passed to update. + * @param {Object} opts The `opts` argument passed to update. + * @property {string} opts.op `beforeUpdate` + */ + beforeUpdate: noop, + + /** + * Lifecycle method method called by updateAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. + * + * @name Adapter#beforeUpdateAll + * @method + * @param {Object} mapper The `mapper` argument passed to updateAll. + * @param {Object} props The `props` argument passed to updateAll. + * @param {Object} query The `query` argument passed to updateAll. + * @param {Object} opts The `opts` argument passed to updateAll. + * @property {string} opts.op `beforeUpdateAll` + */ + beforeUpdateAll: noop, + + /** + * Lifecycle method method called by updateMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. + * + * @name Adapter#beforeUpdateMany + * @method + * @param {Object} mapper The `mapper` argument passed to updateMany. + * @param {Object[]} props The `props` argument passed to updateMany. + * @param {Object} opts The `opts` argument passed to updateMany. + * @property {string} opts.op `beforeUpdateMany` + */ + beforeUpdateMany: noop, + + /** + * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`. + * + * @name Adapter#dbg + * @method + */ + dbg: function dbg() { + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + this.log.apply(this, ['debug'].concat(args)); + }, + + + /** + * Retrieve the number of records that match the selection query. Called by + * `Mapper#count`. + * + * @name Adapter#count + * @method + * @param {Object} mapper The mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + count: function count(mapper, query, opts) { + var self = this; + var op = void 0; + query || (query = {}); + opts || (opts = {}); + + // beforeCount lifecycle hook + op = opts.op = 'beforeCount'; + return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + // Allow for re-assignment from lifecycle hook + op = opts.op = 'count'; + self.dbg(op, mapper, query, opts); + return jsData.utils.resolve(self._count(mapper, query, opts)); + }).then(function (results) { + var _results = babelHelpers.slicedToArray(results, 2); + + var data = _results[0]; + var result = _results[1]; + + result || (result = {}); + var response = new Response(data, result, op); + response = self.respond(response, opts); + + // afterCount lifecycle hook + op = opts.op = 'afterCount'; + return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Create a new record. Called by `Mapper#create`. + * + * @name Adapter#create + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The record to be created. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + create: function create(mapper, props, opts) { + var self = this; + var op = void 0; + props || (props = {}); + opts || (opts = {}); + + // beforeCreate lifecycle hook + op = opts.op = 'beforeCreate'; + return jsData.utils.resolve(self[op](mapper, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = jsData.utils.isUndefined(_props) ? props : _props; + props = withoutRelations(mapper, props); + op = opts.op = 'create'; + self.dbg(op, mapper, props, opts); + return jsData.utils.resolve(self._create(mapper, props, opts)); + }).then(function (results) { + var _results2 = babelHelpers.slicedToArray(results, 2); + + var data = _results2[0]; + var result = _results2[1]; + + result || (result = {}); + var response = new Response(data, result, 'create'); + response.created = data ? 1 : 0; + response = self.respond(response, opts); + + // afterCreate lifecycle hook + op = opts.op = 'afterCreate'; + return jsData.utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Create multiple records in a single batch. Called by `Mapper#createMany`. + * + * @name Adapter#createMany + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The records to be created. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + createMany: function createMany(mapper, props, opts) { + var self = this; + var op = void 0; + props || (props = {}); + opts || (opts = {}); + + // beforeCreateMany lifecycle hook + op = opts.op = 'beforeCreateMany'; + return jsData.utils.resolve(self[op](mapper, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = jsData.utils.isUndefined(_props) ? props : _props; + props = props.map(function (record) { + return withoutRelations(mapper, record); + }); + op = opts.op = 'createMany'; + self.dbg(op, mapper, props, opts); + return jsData.utils.resolve(self._createMany(mapper, props, opts)); + }).then(function (results) { + var _results3 = babelHelpers.slicedToArray(results, 2); + + var data = _results3[0]; + var result = _results3[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'createMany'); + response.created = data.length; + response = self.respond(response, opts); + + // afterCreateMany lifecycle hook + op = opts.op = 'afterCreateMany'; + return jsData.utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Destroy the record with the given primary key. Called by + * `Mapper#destroy`. + * + * @name Adapter#destroy + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id Primary key of the record to destroy. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + destroy: function destroy(mapper, id, opts) { + var self = this; + var op = void 0; + opts || (opts = {}); + + // beforeDestroy lifecycle hook + op = opts.op = 'beforeDestroy'; + return jsData.utils.resolve(self[op](mapper, id, opts)).then(function () { + op = opts.op = 'destroy'; + self.dbg(op, mapper, id, opts); + return jsData.utils.resolve(self._destroy(mapper, id, opts)); + }).then(function (results) { + var _results4 = babelHelpers.slicedToArray(results, 2); + + var data = _results4[0]; + var result = _results4[1]; + + result || (result = {}); + var response = new Response(data, result, 'destroy'); + response = self.respond(response, opts); + + // afterDestroy lifecycle hook + op = opts.op = 'afterDestroy'; + return jsData.utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Destroy the records that match the selection query. Called by + * `Mapper#destroyAll`. + * + * @name Adapter#destroyAll + * @method + * @param {Object} mapper the mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + destroyAll: function destroyAll(mapper, query, opts) { + var self = this; + var op = void 0; + query || (query = {}); + opts || (opts = {}); + + // beforeDestroyAll lifecycle hook + op = opts.op = 'beforeDestroyAll'; + return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + op = opts.op = 'destroyAll'; + self.dbg(op, mapper, query, opts); + return jsData.utils.resolve(self._destroyAll(mapper, query, opts)); + }).then(function (results) { + var _results5 = babelHelpers.slicedToArray(results, 2); + + var data = _results5[0]; + var result = _results5[1]; + + result || (result = {}); + var response = new Response(data, result, 'destroyAll'); + response = self.respond(response, opts); + + // afterDestroyAll lifecycle hook + op = opts.op = 'afterDestroyAll'; + return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Load a belongsTo relationship. + * + * Override with care. + * + * @name Adapter#loadBelongsTo + * @method + * @return {Promise} + */ + loadBelongsTo: function loadBelongsTo(mapper, def, records, __opts) { + var self = this; + var relationDef = def.getRelation(); + + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + var _ret = function () { + var record = records; + return { + v: self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { + def.setLocalField(record, relatedItem); + }) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : babelHelpers.typeof(_ret)) === "object") return _ret.v; + } else { + var keys = records.map(function (record) { + return self.makeBelongsToForeignKey(mapper, def, record); + }).filter(function (key) { + return key; + }); + return self.findAll(relationDef, { + where: babelHelpers.defineProperty({}, relationDef.idAttribute, { + 'in': keys + }) + }, __opts).then(function (relatedItems) { + records.forEach(function (record) { + relatedItems.forEach(function (relatedItem) { + if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) { + def.setLocalField(record, relatedItem); + } + }); + }); + }); + } + }, + + + /** + * Retrieve the record with the given primary key. Called by `Mapper#find`. + * + * @name Adapter#find + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id Primary key of the record to retrieve. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @param {string[]} [opts.with=[]] Relations to eager load. + * @return {Promise} + */ + find: function find(mapper, id, opts) { + var self = this; + var record = void 0, + op = void 0; + opts || (opts = {}); + opts.with || (opts.with = []); + + // beforeFind lifecycle hook + op = opts.op = 'beforeFind'; + return jsData.utils.resolve(self[op](mapper, id, opts)).then(function () { + op = opts.op = 'find'; + self.dbg(op, mapper, id, opts); + return jsData.utils.resolve(self._find(mapper, id, opts)); + }).then(function (results) { + var _results6 = babelHelpers.slicedToArray(results, 1); + + var _record = _results6[0]; + + if (!_record) { + return; + } + record = _record; + var tasks = []; + + jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { + var task = void 0; + if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { + if (def.type === 'hasOne') { + task = self.loadHasOne(mapper, def, record, __opts); + } else { + task = self.loadHasMany(mapper, def, record, __opts); + } + } else if (def.type === 'hasMany' && def.localKeys) { + task = self.loadHasManyLocalKeys(mapper, def, record, __opts); + } else if (def.type === 'hasMany' && def.foreignKeys) { + task = self.loadHasManyForeignKeys(mapper, def, record, __opts); + } else if (def.type === 'belongsTo') { + task = self.loadBelongsTo(mapper, def, record, __opts); + } + if (task) { + tasks.push(task); + } + }); + + return Promise.all(tasks); + }).then(function () { + var response = new Response(record, {}, 'find'); + response.found = record ? 1 : 0; + response = self.respond(response, opts); + + // afterFind lifecycle hook + op = opts.op = 'afterFind'; + return jsData.utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Retrieve the records that match the selection query. + * + * @name Adapter#findAll + * @method + * @param {Object} mapper The mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @param {string[]} [opts.with=[]] Relations to eager load. + * @return {Promise} + */ + findAll: function findAll(mapper, query, opts) { + var self = this; + opts || (opts = {}); + opts.with || (opts.with = []); + + var records = []; + var op = void 0; + var activeWith = opts._activeWith; + + if (jsData.utils.isObject(activeWith)) { + var activeQuery = activeWith.query || {}; + if (activeWith.replace) { + query = activeQuery; + } else { + jsData.utils.deepFillIn(query, activeQuery); + } + } + + // beforeFindAll lifecycle hook + op = opts.op = 'beforeFindAll'; + return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + op = opts.op = 'findAll'; + self.dbg(op, mapper, query, opts); + return jsData.utils.resolve(self._findAll(mapper, query, opts)); + }).then(function (results) { + var _results7 = babelHelpers.slicedToArray(results, 1); + + var _records = _results7[0]; + + _records || (_records = []); + records = _records; + var tasks = []; + jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { + var task = void 0; + if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { + if (def.type === 'hasMany') { + task = self.loadHasMany(mapper, def, records, __opts); + } else { + task = self.loadHasOne(mapper, def, records, __opts); + } + } else if (def.type === 'hasMany' && def.localKeys) { + task = self.loadHasManyLocalKeys(mapper, def, records, __opts); + } else if (def.type === 'hasMany' && def.foreignKeys) { + task = self.loadHasManyForeignKeys(mapper, def, records, __opts); + } else if (def.type === 'belongsTo') { + task = self.loadBelongsTo(mapper, def, records, __opts); + } + if (task) { + tasks.push(task); + } + }); + return Promise.all(tasks); + }).then(function () { + var response = new Response(records, {}, 'findAll'); + response.found = records.length; + response = self.respond(response, opts); + + // afterFindAll lifecycle hook + op = opts.op = 'afterFindAll'; + return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Resolve the value of the specified option based on the given options and + * this adapter's settings. Override with care. + * + * @name Adapter#getOpt + * @method + * @param {string} opt The name of the option. + * @param {Object} [opts] Configuration options. + * @return {*} The value of the specified option. + */ + getOpt: function getOpt(opt, opts) { + opts || (opts = {}); + return jsData.utils.isUndefined(opts[opt]) ? jsData.utils.plainCopy(this[opt]) : jsData.utils.plainCopy(opts[opt]); + }, + + + /** + * Load a hasMany relationship. + * + * Override with care. + * + * @name Adapter#loadHasMany + * @method + * @return {Promise} + */ + loadHasMany: function loadHasMany(mapper, def, records, __opts) { + var self = this; + var singular = false; + + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + singular = true; + records = [records]; + } + var IDs = records.map(function (record) { + return self.makeHasManyForeignKey(mapper, def, record); + }); + var query = { + where: {} + }; + var criteria = query.where[def.foreignKey] = {}; + if (singular) { + // more efficient query when we only have one record + criteria['=='] = IDs[0]; + } else { + criteria['in'] = IDs.filter(function (id) { + return id; + }); + } + return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) { + records.forEach(function (record) { + var attached = []; + // avoid unneccesary iteration when we only have one record + if (singular) { + attached = relatedItems; + } else { + relatedItems.forEach(function (relatedItem) { + if (jsData.utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) { + attached.push(relatedItem); + } + }); + } + def.setLocalField(record, attached); + }); + }); + }, + loadHasManyLocalKeys: function loadHasManyLocalKeys(mapper, def, records, __opts) { + var self = this; + var record = void 0; + var relatedMapper = def.getRelation(); + + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + record = records; + } + + if (record) { + return self.findAll(relatedMapper, { + where: babelHelpers.defineProperty({}, relatedMapper.idAttribute, { + 'in': self.makeHasManyLocalKeys(mapper, def, record) + }) + }, __opts).then(function (relatedItems) { + def.setLocalField(record, relatedItems); + }); + } else { + var _ret2 = function () { + var localKeys = []; + records.forEach(function (record) { + localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record)); + }); + return { + v: self.findAll(relatedMapper, { + where: babelHelpers.defineProperty({}, relatedMapper.idAttribute, { + 'in': unique(localKeys).filter(function (x) { + return x; + }) + }) + }, __opts).then(function (relatedItems) { + records.forEach(function (item) { + var attached = []; + var itemKeys = jsData.utils.get(item, def.localKeys) || []; + itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); + relatedItems.forEach(function (relatedItem) { + if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) { + attached.push(relatedItem); + } + }); + def.setLocalField(item, attached); + }); + return relatedItems; + }) + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : babelHelpers.typeof(_ret2)) === "object") return _ret2.v; + } + }, + loadHasManyForeignKeys: function loadHasManyForeignKeys(mapper, def, records, __opts) { + var self = this; + var relatedMapper = def.getRelation(); + var idAttribute = mapper.idAttribute; + var record = void 0; + + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + record = records; + } + + if (record) { + return self.findAll(def.getRelation(), { + where: babelHelpers.defineProperty({}, def.foreignKeys, { + 'contains': self.makeHasManyForeignKeys(mapper, def, record) + }) + }, __opts).then(function (relatedItems) { + def.setLocalField(record, relatedItems); + }); + } else { + return self.findAll(relatedMapper, { + where: babelHelpers.defineProperty({}, def.foreignKeys, { + 'isectNotEmpty': records.map(function (record) { + return self.makeHasManyForeignKeys(mapper, def, record); + }) + }) + }, __opts).then(function (relatedItems) { + var foreignKeysField = def.foreignKeys; + records.forEach(function (record) { + var _relatedItems = []; + var id = jsData.utils.get(record, idAttribute); + relatedItems.forEach(function (relatedItem) { + var foreignKeys = jsData.utils.get(relatedItems, foreignKeysField) || []; + if (foreignKeys.indexOf(id) !== -1) { + _relatedItems.push(relatedItem); + } + }); + def.setLocalField(record, _relatedItems); + }); + }); + } + }, + + + /** + * Load a hasOne relationship. + * + * Override with care. + * + * @name Adapter#loadHasOne + * @method + * @return {Promise} + */ + loadHasOne: function loadHasOne(mapper, def, records, __opts) { + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + records = [records]; + } + return this.loadHasMany(mapper, def, records, __opts).then(function () { + records.forEach(function (record) { + var relatedData = def.getLocalField(record); + if (jsData.utils.isArray(relatedData) && relatedData.length) { + def.setLocalField(record, relatedData[0]); + } + }); + }); + }, + + + /** + * Logging utility method. Override this method if you want to send log + * messages to something other than the console. + * + * @name Adapter#log + * @method + * @param {string} level Log level. + * @param {...*} values Values to log. + */ + log: function log(level) { + for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + args[_key4 - 1] = arguments[_key4]; + } + + if (level && !args.length) { + args.push(level); + level = 'debug'; + } + if (level === 'debug' && !this.debug) { + return; + } + var prefix = level.toUpperCase() + ': (Adapter)'; + if (console[level]) { + var _console; + + (_console = console)[level].apply(_console, [prefix].concat(args)); + } else { + var _console2; + + (_console2 = console).log.apply(_console2, [prefix].concat(args)); + } + }, + + + /** + * Return the foreignKey from the given record for the provided relationship. + * + * There may be reasons why you may want to override this method, like when + * the id of the parent doesn't exactly match up to the key on the child. + * + * Override with care. + * + * @name Adapter#makeHasManyForeignKey + * @method + * @return {*} + */ + makeHasManyForeignKey: function makeHasManyForeignKey(mapper, def, record) { + return def.getForeignKey(record); + }, + + + /** + * Return the localKeys from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeHasManyLocalKeys + * @method + * @return {*} + */ + makeHasManyLocalKeys: function makeHasManyLocalKeys(mapper, def, record) { + var localKeys = []; + var itemKeys = jsData.utils.get(record, def.localKeys) || []; + itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); + localKeys = localKeys.concat(itemKeys); + return unique(localKeys).filter(function (x) { + return x; + }); + }, + + + /** + * Return the foreignKeys from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeHasManyForeignKeys + * @method + * @return {*} + */ + makeHasManyForeignKeys: function makeHasManyForeignKeys(mapper, def, record) { + return jsData.utils.get(record, mapper.idAttribute); + }, + + + /** + * Return the foreignKey from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeBelongsToForeignKey + * @method + * @return {*} + */ + makeBelongsToForeignKey: function makeBelongsToForeignKey(mapper, def, record) { + return def.getForeignKey(record); + }, + + + /** + * Retrieve sum of the specified field of the records that match the selection + * query. Called by `Mapper#sum`. + * + * @name Adapter#sum + * @method + * @param {Object} mapper The mapper. + * @param {string} field By to sum. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + sum: function sum(mapper, field, query, opts) { + var self = this; + var op = void 0; + if (!jsData.utils.isString(field)) { + throw new Error('field must be a string!'); + } + query || (query = {}); + opts || (opts = {}); + + // beforeSum lifecycle hook + op = opts.op = 'beforeSum'; + return jsData.utils.resolve(self[op](mapper, field, query, opts)).then(function () { + // Allow for re-assignment from lifecycle hook + op = opts.op = 'sum'; + self.dbg(op, mapper, field, query, opts); + return jsData.utils.resolve(self._sum(mapper, field, query, opts)); + }).then(function (results) { + var _results8 = babelHelpers.slicedToArray(results, 2); + + var data = _results8[0]; + var result = _results8[1]; + + result || (result = {}); + var response = new Response(data, result, op); + response = self.respond(response, opts); + + // afterSum lifecycle hook + op = opts.op = 'afterSum'; + return jsData.utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * @name Adapter#respond + * @method + * @param {Object} response Response object. + * @param {Object} opts Configuration options. + * return {Object} If `opts.raw == true` then return `response`, else return + * `response.data`. + */ + respond: function respond(response, opts) { + return this.getOpt('raw', opts) ? response : response.data; + }, + + + /** + * Apply the given update to the record with the specified primary key. Called + * by `Mapper#update`. + * + * @name Adapter#update + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id The primary key of the record to be updated. + * @param {Object} props The update to apply to the record. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + update: function update(mapper, id, props, opts) { + var self = this; + props || (props = {}); + opts || (opts = {}); + var op = void 0; + + // beforeUpdate lifecycle hook + op = opts.op = 'beforeUpdate'; + return jsData.utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = jsData.utils.isUndefined(_props) ? props : _props; + op = opts.op = 'update'; + self.dbg(op, mapper, id, props, opts); + return jsData.utils.resolve(self._update(mapper, id, props, opts)); + }).then(function (results) { + var _results9 = babelHelpers.slicedToArray(results, 2); + + var data = _results9[0]; + var result = _results9[1]; + + result || (result = {}); + var response = new Response(data, result, 'update'); + response.updated = data ? 1 : 0; + response = self.respond(response, opts); + + // afterUpdate lifecycle hook + op = opts.op = 'afterUpdate'; + return jsData.utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Apply the given update to all records that match the selection query. + * Called by `Mapper#updateAll`. + * + * @name Adapter#updateAll + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The update to apply to the selected records. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + updateAll: function updateAll(mapper, props, query, opts) { + var self = this; + props || (props = {}); + query || (query = {}); + opts || (opts = {}); + var op = void 0; + + // beforeUpdateAll lifecycle hook + op = opts.op = 'beforeUpdateAll'; + return jsData.utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = jsData.utils.isUndefined(_props) ? props : _props; + op = opts.op = 'updateAll'; + self.dbg(op, mapper, props, query, opts); + return jsData.utils.resolve(self._updateAll(mapper, props, query, opts)); + }).then(function (results) { + var _results10 = babelHelpers.slicedToArray(results, 2); + + var data = _results10[0]; + var result = _results10[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'updateAll'); + response.updated = data.length; + response = self.respond(response, opts); + + // afterUpdateAll lifecycle hook + op = opts.op = 'afterUpdateAll'; + return jsData.utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + }, + + + /** + * Update the given records in a single batch. Called by `Mapper#updateMany`. + * + * @name Adapter#updateMany + * @method + * @param {Object} mapper The mapper. + * @param {Object[]} records The records to update. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + updateMany: function updateMany(mapper, records, opts) { + var self = this; + records || (records = []); + opts || (opts = {}); + var op = void 0; + var idAttribute = mapper.idAttribute; + + records = records.filter(function (record) { + return jsData.utils.get(record, idAttribute); + }); + + // beforeUpdateMany lifecycle hook + op = opts.op = 'beforeUpdateMany'; + return jsData.utils.resolve(self[op](mapper, records, opts)).then(function (_records) { + // Allow for re-assignment from lifecycle hook + records = jsData.utils.isUndefined(_records) ? records : _records; + records = records.map(function (record) { + return withoutRelations(mapper, record); + }); + op = opts.op = 'updateMany'; + self.dbg(op, mapper, records, opts); + return jsData.utils.resolve(self._updateMany(mapper, records, opts)); + }).then(function (results) { + var _results11 = babelHelpers.slicedToArray(results, 2); + + var data = _results11[0]; + var result = _results11[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'updateMany'); + response.updated = data.length; + response = self.respond(response, opts); + + // afterUpdateMany lifecycle hook + op = opts.op = 'afterUpdateMany'; + return jsData.utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) { + // Allow for re-assignment from lifecycle hook + return jsData.utils.isUndefined(_response) ? response : _response; + }); + }); + } + }); + + module.exports = Adapter; + +})); +//# sourceMappingURL=js-data-adapter.js.map \ No newline at end of file diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map new file mode 100644 index 0000000..d8a2132 --- /dev/null +++ b/dist/js-data-adapter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["import {utils} from 'js-data'\n\nconst noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nconst noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nconst unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nconst withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nfunction Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nAdapter.reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @typedef {Object} Response\n * @property {Object} data Response data.\n * @property {string} op The operation for which the response was created.\n */\nfunction Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n self.data = data\n utils.fillIn(self, meta)\n self.op = op\n}\n\nAdapter.Response = Response\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nAdapter.noop = noop\nAdapter.noop2 = noop2\nAdapter.unique = unique\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n\nmodule.exports = Adapter\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEA,IAAM,OAAO,SAAP,IAAO,GAAmB;AAC9B,EAAA,MAAM,OAAO,IAAb;;AAD8B,EAAA,oCAAN,IAAM;AAAN,EAAA,QA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,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,KAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EAAyD,IAAzD,CAA8D,UAAU,SAAV,EAAqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAn1C6C,EAAA,CAAhD;;AAs1CA,EAAA,OAAO,OAAP,GAAiB,OAAjB;;"} \ No newline at end of file From f5583a3d46dee0457e8fe61c1124d7168d36abe3 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 27 Apr 2016 23:31:09 -0700 Subject: [PATCH 02/14] 0.5.0 --- dist/js-data-adapter.js | 70 +++++++++++++++++++++++++++++-------- dist/js-data-adapter.js.map | 2 +- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index 55d9a77..674e0e0 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -1,8 +1,8 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('js-data')) : - typeof define === 'function' && define.amd ? define('js-data-adapter', ['js-data'], factory) : - (factory(global.JSData)); -}(this, function (jsData) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('js-data')) : + typeof define === 'function' && define.amd ? define('js-data-adapter', ['exports', 'js-data'], factory) : + (factory((global.Adapter = global.Adapter || {}),global.JSData)); +}(this, function (exports,jsData) { 'use strict'; var babelHelpers = {}; babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { @@ -66,6 +66,9 @@ babelHelpers; + /** + * @name module:js-data-adapter.noop + */ var noop = function noop() { var self = this; @@ -78,6 +81,9 @@ return jsData.utils.resolve(); }; + /** + * @name module:js-data-adapter.noop2 + */ var noop2 = function noop2() { var self = this; @@ -90,6 +96,9 @@ return jsData.utils.resolve(); }; + /** + * @name module:js-data-adapter.unique + */ var unique = function unique(array) { var seen = {}; var final = []; @@ -103,6 +112,9 @@ return final; }; + /** + * @name module:js-data-adapter.withoutRelations + */ var withoutRelations = function withoutRelations(mapper, props) { return jsData.utils.omit(props, mapper.relationFields || []); }; @@ -127,6 +139,12 @@ raw: false }; + /** + * {@link Adapter} class. + * + * @name module:js-data-adapter.Adapter + * @see Adapter + */ /** * Abstract class meant to be extended by adapters. * @@ -144,26 +162,46 @@ jsData.utils.fillIn(self, opts); } - Adapter.reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; + /** + * @name module:js-data-adapter.reserved + */ + var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; + /** + * {@link Response} class. + * + * @name module:js-data-adapter.Response + * @see Response + */ /** * Response object used when `raw` is `true`. May contain other fields in * addition to `data`. * - * @typedef {Object} Response - * @property {Object} data Response data. - * @property {string} op The operation for which the response was created. + * @class Response */ function Response(data, meta, op) { var self = this; meta || (meta = {}); + + /** + * Response data. + * + * @name Response#data + * @type {*} + */ self.data = data; + jsData.utils.fillIn(self, meta); + + /** + * The operation for which the response was created. + * + * @name Response#op + * @type {string} + */ self.op = op; } - Adapter.Response = Response; - /** * Alternative to ES6 class syntax for extending `Adapter`. * @@ -177,10 +215,6 @@ */ Adapter.extend = jsData.utils.extend; - Adapter.noop = noop; - Adapter.noop2 = noop2; - Adapter.unique = unique; - jsData.utils.addHiddenPropsToTarget(Adapter.prototype, { /** * Lifecycle method method called by count. @@ -1627,7 +1661,13 @@ } }); - module.exports = Adapter; + exports.noop = noop; + exports.noop2 = noop2; + exports.unique = unique; + exports.withoutRelations = withoutRelations; + exports.Adapter = Adapter; + exports.reserved = reserved; + exports.Response = Response; })); //# sourceMappingURL=js-data-adapter.js.map \ No newline at end of file diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index d8a2132..2e8c11a 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["import {utils} from 'js-data'\n\nconst noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nconst noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nconst unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nconst withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nfunction Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nAdapter.reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @typedef {Object} Response\n * @property {Object} data Response data.\n * @property {string} op The operation for which the response was created.\n */\nfunction Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n self.data = data\n utils.fillIn(self, meta)\n self.op = op\n}\n\nAdapter.Response = Response\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nAdapter.noop = noop\nAdapter.noop2 = noop2\nAdapter.unique = unique\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n\nmodule.exports = Adapter\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEA,IAAM,OAAO,SAAP,IAAO,GAAmB;AAC9B,EAAA,MAAM,OAAO,IAAb;;AAD8B,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAE9B,EAAA,MAAM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T,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,KAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EAAyD,IAAzD,CAA8D,UAAU,SAAV,EAAqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAn1C6C,EAAA,CAAhD;;AAs1CA,EAAA,OAAO,OAAP,GAAiB,OAAjB;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["/**\n * Registered as `js-data-adapter` in NPM.\n *\n * @module js-data-adapter\n */\n\nimport {utils} from 'js-data'\n\n/**\n * @name module:js-data-adapter.noop\n */\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\n/**\n * @name module:js-data-adapter.noop2\n */\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\n/**\n * @name module:js-data-adapter.unique\n */\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\n/**\n * @name module:js-data-adapter.withoutRelations\n */\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * {@link Adapter} class.\n *\n * @name module:js-data-adapter.Adapter\n * @see Adapter\n */\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\n/**\n * @name module:js-data-adapter.reserved\n */\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * {@link Response} class.\n *\n * @name module:js-data-adapter.Response\n * @see Response\n */\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,EAAO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;;;;AAUP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;;;;AAUP,EAAO,IAAM,SAAS,SAAT,MAAS,CAAU,KAAV,EAAiB;AACrC,EAAA,MAAM,OAAO,EAAb;AACA,EAAA,MAAM,QAAQ,EAAd;AACA,EAAA,QAAM,OAAN,CAAc,UAAU,IAAV,EAAgB;AAC5B,EAAA,QAAI,QAAQ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A,EAAA,WAAK,GAAL,CAAS,EAAT,EAAa,MAAb,EAAqB,OAArB,EAA8B,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KATM,EASJ,IATI,CASC,UAAU,OAAV,EAAmB;AAAA,EAAA,kDACJ,OADI;;AAAA,EAAA,UACpB,IADoB;AAAA,EAAA,UACd,MADc;;AAEzB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,KAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EAAyD,IAAzD,CAA8D,UAAU,SAAV,EAAqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAn1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file From 2f23cf8739f51138aa52ca7d37411f23becab967 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 29 Apr 2016 20:39:37 -0700 Subject: [PATCH 03/14] 0.6.0 --- dist/js-data-adapter.js | 27 --------------------------- dist/js-data-adapter.js.map | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index 674e0e0..ca17dac 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -66,9 +66,6 @@ babelHelpers; - /** - * @name module:js-data-adapter.noop - */ var noop = function noop() { var self = this; @@ -81,9 +78,6 @@ return jsData.utils.resolve(); }; - /** - * @name module:js-data-adapter.noop2 - */ var noop2 = function noop2() { var self = this; @@ -96,9 +90,6 @@ return jsData.utils.resolve(); }; - /** - * @name module:js-data-adapter.unique - */ var unique = function unique(array) { var seen = {}; var final = []; @@ -112,9 +103,6 @@ return final; }; - /** - * @name module:js-data-adapter.withoutRelations - */ var withoutRelations = function withoutRelations(mapper, props) { return jsData.utils.omit(props, mapper.relationFields || []); }; @@ -139,12 +127,6 @@ raw: false }; - /** - * {@link Adapter} class. - * - * @name module:js-data-adapter.Adapter - * @see Adapter - */ /** * Abstract class meant to be extended by adapters. * @@ -162,17 +144,8 @@ jsData.utils.fillIn(self, opts); } - /** - * @name module:js-data-adapter.reserved - */ var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; - /** - * {@link Response} class. - * - * @name module:js-data-adapter.Response - * @see Response - */ /** * Response object used when `raw` is `true`. May contain other fields in * addition to `data`. diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index 2e8c11a..2df560e 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["/**\n * Registered as `js-data-adapter` in NPM.\n *\n * @module js-data-adapter\n */\n\nimport {utils} from 'js-data'\n\n/**\n * @name module:js-data-adapter.noop\n */\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\n/**\n * @name module:js-data-adapter.noop2\n */\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\n/**\n * @name module:js-data-adapter.unique\n */\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\n/**\n * @name module:js-data-adapter.withoutRelations\n */\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * {@link Adapter} class.\n *\n * @name module:js-data-adapter.Adapter\n * @see Adapter\n */\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\n/**\n * @name module:js-data-adapter.reserved\n */\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * {@link Response} class.\n *\n * @name module:js-data-adapter.Response\n * @see Response\n */\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,EAAO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;;;;AAUP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AAC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3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IA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AAP;AAwBD,EAAA;AAn1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file From c3d8c6acc2378065cbed6871e8bad66c3ff4a02a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Sat, 30 Apr 2016 13:18:54 -0700 Subject: [PATCH 04/14] 0.6.1 --- dist/js-data-adapter.js | 2 ++ dist/js-data-adapter.js.map | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index ca17dac..bdf0126 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -1497,6 +1497,7 @@ return jsData.utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; + props = withoutRelations(mapper, props); op = opts.op = 'update'; self.dbg(op, mapper, id, props, opts); return jsData.utils.resolve(self._update(mapper, id, props, opts)); @@ -1553,6 +1554,7 @@ return jsData.utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; + props = withoutRelations(mapper, props); op = opts.op = 'updateAll'; self.dbg(op, mapper, props, query, opts); return jsData.utils.resolve(self._updateAll(mapper, props, query, opts)); diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index 2df560e..b839d2d 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,SAAS,SAAT,MAAS,CAAU,KAAV,EAAiB;AACrC,EAAA,MAAM,OAAO,EAAb;AACA,EAAA,MAAM,QAAQ,E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S,CAAV;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,YAAf;AACA,EAAA,WAAK,GAAL,CAAS,EAAT,EAAa,MAAb,EAAqB,OAArB,EAA8B,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KATM,EASJ,IATI,CASC,UAAU,OAAV,EAAmB;AAAA,EAAA,kDACJ,OADI;;AAAA,EAAA,UACpB,IADoB;AAAA,EAAA,UACd,MADc;;AAEzB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,KAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EAAyD,IAAzD,CAA8D,UAAU,SAAV,EAAqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAn1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;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9fdb11cd9be93 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 16 May 2016 22:58:01 -0700 Subject: [PATCH 05/14] 0.7.0 --- dist/js-data-adapter-tests.js | 4661 +++++++++++++++++++++++++++++ dist/js-data-adapter-tests.js.map | 1 + 2 files changed, 4662 insertions(+) create mode 100644 dist/js-data-adapter-tests.js create mode 100644 dist/js-data-adapter-tests.js.map diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js new file mode 100644 index 0000000..5566031 --- /dev/null +++ b/dist/js-data-adapter-tests.js @@ -0,0 +1,4661 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chai'), require('sinon')) : + typeof define === 'function' && define.amd ? define('js-data-adapter-tests', ['chai', 'sinon'], factory) : + (global.JSDataAdapterTests = factory(global.chai,global.sinon)); +}(this, function (chai,sinon$1) { 'use strict'; + + sinon$1 = 'default' in sinon$1 ? sinon$1['default'] : sinon$1; + + var babelHelpers = {}; + babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + babelHelpers.asyncToGenerator = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new Promise(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return Promise.resolve(value).then(function (value) { + return step("next", value); + }, function (err) { + return step("throw", err); + }); + } + } + + return step("next"); + }); + }; + }; + + babelHelpers.classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + babelHelpers.createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + babelHelpers.defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + + babelHelpers.inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + }; + + babelHelpers.possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; + }; + + babelHelpers; + + /* global assert:true */ + function afterCreateTest (options) { + describe('Adapter#afterCreate', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.afterCreate), 'function', 'adapter should have a "afterCreate" method'); + }); + it('should call afterCreate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); + + case 7: + user = _context.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + + case 18: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user, 'foo', 'result should be "foo"'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + + case 17: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isDefined(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + + case 18: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + + assert.debug('created', User.name, user); + + assert.equal(user, 'foo', 'result should be "foo"'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + + case 17: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should receive raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, props, result, args; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props, { raw: true }); + + case 7: + result = _context5.sent; + + assert.debug('created', User.name, result); + + assert.equal(result.created, 1, 'result.created'); + assert.equal(result.data.name, props.name, 'result.data.name'); + assert.isDefined(result.data[User.idAttribute], 'result.data[' + User.idAttribute + ']'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received result'); + assert.equal(args[3].created, 1, 'result.created'); + assert.isObject(args[3].data, 'result.data'); + + case 21: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); + } + + /* global assert:true */ + function afterUpdateTest (options) { + describe('Adapter#afterUpdate', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.afterUpdate), 'function', 'adapter should have a "afterUpdate" method'); + }); + it('should call afterUpdate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); + + case 7: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + + case 30: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should receive raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, result, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context2.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }, { raw: true }); + + case 15: + result = _context2.sent; + + assert.debug('updated', User.name, result); + assert.isDefined(result.data, 'result.data'); + assert.equal(result.data.name, 'Johnny', result.data.name); + assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received update result'); + assert.equal(args[4].updated, 1, 'args[4].updated'); + assert.isDefined(args[4].data, 'args[4].data'); + assert.equal(args[4].data[User.idAttribute], userId, 'args[4].data.' + User.idAttribute); + assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name'); + + case 33: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context3.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context3.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + + case 29: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context4.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context4.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + + case 30: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return Promise.resolve('foo'); + }); + + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props); + + case 7: + user = _context5.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context5.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context5.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + + case 29: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); + } + + /* global assert:true */ + function beforeCreateTest (options) { + describe('Adapter#beforeCreate', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.beforeCreate), 'function', 'adapter should have a "beforeCreate" method'); + }); + it('should call beforeCreate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); + + case 7: + user = _context.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + + case 17: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return { name: 'Sally' }; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + + case 17: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isDefined(args[2], 'beforeCreate should have received options'); + + case 17: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return Promise.resolve({ name: 'Sally' }); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + + case 17: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); + } + + /* global assert:true */ + function beforeUpdateTest (options) { + describe('Adapter#beforeUpdate', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.beforeUpdate), 'function', 'adapter should have a "beforeUpdate" method'); + }); + it('should call beforeUpdate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); + + case 7: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeCreate should have received options'); + + case 26: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return { name: 'Sally' }; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context2.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context2.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Sally'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeCreate should have received options'); + + case 26: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context3.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context3.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeCreate should have received options'); + + case 26: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return Promise.resolve({ name: 'Sally' }); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context4.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context4.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Sally'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeCreate should have received options'); + + case 26: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); + } + + /* global assert:true */ + function countTest (options) { + describe('Adapter#count', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.count), 'function', 'adapter should have a "count" method'); + }); + it('should count users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, count, user, user2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('count', User.name, {}); + _context.next = 6; + return adapter.count(User); + + case 6: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 0); + + assert.debug('count', User.name, { name: 'John' }); + _context.next = 12; + return adapter.count(User, { name: 'John' }); + + case 12: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 0); + + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 18; + return adapter.count(User, { name: 'Sally' }); + + case 18: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 0); + + assert.debug('create', User.name, props); + _context.next = 24; + return adapter.create(User, props); + + case 24: + user = _context.sent; + + assert.debug('created', User.name, user); + + assert.debug('count', User.name, {}); + _context.next = 29; + return adapter.count(User); + + case 29: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 1); + + assert.debug('count', User.name, { name: 'John' }); + _context.next = 35; + return adapter.count(User, { name: 'John' }); + + case 35: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 1); + + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 41; + return adapter.count(User, { name: 'Sally' }); + + case 41: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 0); + + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 47; + return adapter.create(User, { name: 'Sally' }); + + case 47: + user2 = _context.sent; + + assert.debug('created', User.name, user2); + + assert.debug('count', User.name, {}); + _context.next = 52; + return adapter.count(User); + + case 52: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 2); + + assert.debug('count', User.name, { name: 'John' }); + _context.next = 58; + return adapter.count(User, { name: 'John' }); + + case 58: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 1); + + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 64; + return adapter.count(User, { name: 'Sally' }); + + case 64: + count = _context.sent; + + assert.debug('counted', User.name, count); + assert.equal(count, 1); + + case 67: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should count users and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.debug('count', User.name, props); + _context2.next = 11; + return adapter.count(User, props, { raw: true }); + + case 11: + result = _context2.sent; + + assert.debug('counted', User.name, result); + assert.equal(result.data, 1, 'result.data'); + + case 14: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + }); + } + + /* global assert:true */ + function createTest (options) { + describe('Adapter#create', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.create), 'function', 'adapter should have a "create" method'); + }); + it('should create a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, foundUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + + assert.debug('find', User.name, userId); + _context.next = 14; + return adapter.find(User, userId); + + case 14: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + + assert.equal(foundUser.name, props.name, 'foundUser.name'); + assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]'); + assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); + + case 19: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); + } + + /* global assert:true */ + function createManyTest (options) { + describe('Adapter#createMany', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.createMany), 'function', 'adapter should have a "createMany" method'); + }); + it('should create multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, user1, user2, users, users3; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + user1 = { name: 'John', age: 20 }; + user2 = { name: 'John', age: 30 }; + + + assert.debug('createMany', User.name, [user1, user2]); + _context.next = 7; + return adapter.createMany(User, [user1, user2]); + + case 7: + users = _context.sent; + + assert.debug('created', User.name, users); + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.isDefined(users[0][User.idAttribute]); + assert.isDefined(users[1][User.idAttribute]); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('findAll', User.name, { age: 20 }); + _context.next = 17; + return adapter.findAll(User, { age: 20 }); + + case 17: + users3 = _context.sent; + + assert.debug('found', User.name, users3); + assert.equal(users3.length, 1); + + case 20: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); + } + + /* global assert:true */ + function destroyTest (options) { + describe('Adapter#destroy', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.destroy), 'function', 'adapter should have a "destroy" method'); + }); + it('should destroy a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + beforeDestroyCalled = false; + afterDestroyCalled = false; + + // Test beforeDestroy and afterDestroy + + adapter.beforeDestroy = function (mapper, id, opts) { + beforeDestroyCalled = true; + assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); + assert.isDefined(id, 'beforeDestroy should have received id argument'); + assert.isObject(opts, 'beforeDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + adapter.afterDestroy = function (mapper, id, opts) { + afterDestroyCalled = true; + assert.isObject(mapper, 'afterDestroy should have received mapper argument'); + assert.isDefined(id, 'afterDestroy should have received id argument'); + assert.isObject(opts, 'afterDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + + assert.debug('destroy', User.name, userId); + _context.next = 16; + return adapter.destroy(User, userId); + + case 16: + destroyedUser = _context.sent; + + assert.debug('destroyed', User.name, destroyedUser); + assert.isUndefined(destroyedUser, 'destroyedUser'); + assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); + assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); + + case 21: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should destroy a user and allow afterDestroy re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + beforeDestroyCalled = false; + afterDestroyCalled = false; + + // Test beforeDestroy and afterDestroy + + adapter.beforeDestroy = function (mapper, id, opts) { + beforeDestroyCalled = true; + assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); + assert.isDefined(id, 'beforeDestroy should have received id argument'); + assert.isObject(opts, 'beforeDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + adapter.afterDestroy = function (mapper, id, opts) { + afterDestroyCalled = true; + assert.isObject(mapper, 'afterDestroy should have received mapper argument'); + assert.isDefined(id, 'afterDestroy should have received id argument'); + assert.isObject(opts, 'afterDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve('foo'); + }; + + assert.debug('destroy', User.name, userId); + _context2.next = 16; + return adapter.destroy(User, userId, { raw: true }); + + case 16: + destroyedUser = _context2.sent; + + assert.debug('destroyed', User.name, destroyedUser); + assert.equal(destroyedUser, 'foo', 'destroyedUser'); + assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); + assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); + + case 21: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should destroy a user and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context3.next = 6; + return adapter.create(User, props); + + case 6: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.debug('destroy', User.name, userId); + _context3.next = 12; + return adapter.destroy(User, userId, { raw: true }); + + case 12: + result = _context3.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 1, 'result.deleted'); + } + + case 16: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should destroy nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroy', User.name, 'non-existent-id'); + _context4.next = 5; + return adapter.destroy(User, 'non-existent-id'); + + case 5: + result = _context4.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result, 'result'); + + case 8: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should destroy nothing and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroy', User.name, 'non-existent-id'); + _context5.next = 5; + return adapter.destroy(User, 'non-existent-id', { raw: true }); + + case 5: + result = _context5.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 0, 'result.deleted'); + } + + case 9: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); + } + + /* global assert:true */ + function destroyAllTest (options) { + describe('Adapter#destroyAll', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.destroyAll), 'function', 'adapter should have a "destroyAll" method'); + }); + it('should destroy all users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, user2, foundUsers, destroyedUsers; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 12; + return adapter.create(User, { name: 'Sally' }); + + case 12: + user2 = _context.sent; + + assert.debug('created', User.name, user2); + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 17; + return adapter.findAll(User, { name: 'John' }); + + case 17: + foundUsers = _context.sent; + + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 1, 'foundUsers.length'); + assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]'); + assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name'); + + assert.debug('destroyAll', User.name, { name: 'John' }); + _context.next = 25; + return adapter.destroyAll(User, { name: 'John' }); + + case 25: + destroyedUsers = _context.sent; + + assert.debug('destroyed', User.name, destroyedUsers); + assert.isUndefined(destroyedUsers, 'destroyedUsers'); + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 31; + return adapter.findAll(User, { name: 'John' }); + + case 31: + foundUsers = _context.sent; + + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 0); + + assert.debug('findAll', User.name, {}); + _context.next = 37; + return adapter.findAll(User, {}); + + case 37: + foundUsers = _context.sent; + + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 1); + + case 40: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should destroy users and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.debug('destroyAll', User.name, props); + _context2.next = 11; + return adapter.destroyAll(User, props, { raw: true }); + + case 11: + result = _context2.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 1, 'result.deleted'); + } + + case 15: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should destroy nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroyAll', User.name, {}); + _context3.next = 5; + return adapter.destroyAll(User, {}); + + case 5: + result = _context3.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result, 'result'); + + case 8: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should destroy nothing and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroyAll', User.name, {}); + _context4.next = 5; + return adapter.destroyAll(User, {}, { raw: true }); + + case 5: + result = _context4.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 0, 'result.deleted'); + } + + case 9: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); + } + + /* global assert:true */ + function extendTest (options) { + describe('Adapter.extend', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.constructor.extend), 'function', 'adapter constructor function should have an "extend" method'); + }); + it('should return a subclass of the adapter class using extend', function () { + var Adapter = this.$$adapter.constructor; + + var SubAdapter = Adapter.extend({ + foo: function foo() { + return 'foo'; + } + }, { + bar: function bar() { + return 'bar'; + } + }); + + assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); + try { + assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); + } catch (err) { + assert.equal(babelHelpers.typeof(SubAdapter.extend), 'function', 'should have same static methods'); + } + + var subAdapter = new SubAdapter(); + + assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); + assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); + }); + it('should return a subclass of the adapter class using ES6 classes', function () { + var Adapter = this.$$adapter.constructor; + + var SubAdapter = function (_Adapter) { + babelHelpers.inherits(SubAdapter, _Adapter); + + function SubAdapter() { + babelHelpers.classCallCheck(this, SubAdapter); + return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SubAdapter).apply(this, arguments)); + } + + babelHelpers.createClass(SubAdapter, [{ + key: 'foo', + value: function foo() { + return 'foo'; + } + }], [{ + key: 'bar', + value: function bar() { + return 'bar'; + } + }]); + return SubAdapter; + }(Adapter); + + assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); + try { + assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); + } catch (err) { + try { + assert.equal(babelHelpers.typeof(SubAdapter.extend), 'function', 'should have same static methods'); + } catch (err) { + var obj = {}; + if (obj.setPrototypeOf) { + throw err; + } + } + } + + var subAdapter = new SubAdapter(); + + assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); + assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); + }); + }); + } + + /* global assert:true */ + function findTest (options) { + describe('Adapter#find', function () { + var adapter, User, Profile, Post, Comment, Tag; + + beforeEach(function () { + adapter = this.$$adapter; + User = this.$$User; + Profile = this.$$Profile; + Post = this.$$Post; + Comment = this.$$Comment; + Tag = this.$$Tag; + }); + + it('should exist', function () { + assert.equal(babelHelpers.typeof(adapter.find), 'function', 'adapter should have a "find" method'); + }); + + it('should find a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var props, user, userId, beforeFindCalled, afterFindCalled, foundUser, post, postId, comments, foundPost; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + assert.equal(user.name, 'John', 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + + // Test beforeFind and afterFind + beforeFindCalled = false; + afterFindCalled = false; + + adapter.beforeFind = function (mapper, id, opts) { + beforeFindCalled = true; + assert.isObject(mapper, 'beforeFind should have received mapper argument'); + assert.isDefined(id, 'beforeFind should have received id argument'); + assert.equal(id, userId, 'beforeFind should have received correct id argument'); + assert.isObject(opts, 'beforeFind should have received opts argument'); + // Optionally return a promise for async + return Promise.resolve(); + }; + adapter.afterFind = function (mapper, id, opts, record) { + afterFindCalled = true; + assert.isObject(mapper, 'afterFind should have received mapper argument'); + assert.isDefined(id, 'afterFind should have received id argument'); + assert.equal(id, userId, 'afterFind should have received correct id argument'); + assert.isObject(opts, 'afterFind should have received opts argument'); + assert.isObject(record, 'afterFind should have received record argument'); + // Optionally return a promise for async + return Promise.resolve(); + }; + + assert.debug('find', User.name, userId); + _context.next = 18; + return adapter.find(User, userId); + + case 18: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'John', 'name of found user should be "John"'); + assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id'); + assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); + assert.isTrue(afterFindCalled, 'afterFind should have been called'); + + // should allow re-assignment + beforeFindCalled = false; + afterFindCalled = false; + adapter.afterFind = function (mapper, id, opts, record) { + afterFindCalled = true; + assert.isObject(mapper, 'afterFind should have received mapper argument'); + assert.isDefined(id, 'afterFind should have received id argument'); + assert.equal(id, userId, 'afterFind should have received correct id argument'); + assert.isObject(opts, 'afterFind should have received opts argument'); + assert.isObject(record, 'afterFind should have received record argument'); + // Test re-assignment + return Promise.resolve(babelHelpers.defineProperty({ name: 'Sally' }, User.idAttribute, userId)); + }; + + assert.debug('find', User.name, userId); + _context.next = 30; + return adapter.find(User, userId); + + case 30: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'Sally', 'foundUser.name'); + assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); + assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); + assert.isTrue(afterFindCalled, 'afterFind should have been called'); + // clear hooks + delete adapter.beforeFind; + delete adapter.afterFind; + + props = { content: 'test', userId: userId }; + assert.debug('create', Post.name, props); + _context.next = 42; + return adapter.create(Post, props); + + case 42: + post = _context.sent; + + assert.debug('created', Post.name, post); + postId = post[Post.idAttribute]; + + + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]'); + assert.equal(post.userId, userId, 'post.userId'); + + props = [{ + content: 'test2', + postId: postId, + userId: userId + }, { + content: 'test3', + postId: postId, + userId: userId + }]; + assert.debug('create', Comment.name, props); + _context.next = 52; + return Promise.all([adapter.create(Comment, props[0]), adapter.create(Comment, props[1])]); + + case 52: + comments = _context.sent; + + assert.debug('created', Comment.name, comments); + + comments.sort(function (a, b) { + return a.content > b.content; + }); + + assert.debug('find', Post.name, postId); + _context.next = 58; + return adapter.find(Post, postId, { with: ['user', 'comment'] }); + + case 58: + foundPost = _context.sent; + + assert.debug('found', Post.name, foundPost); + foundPost.comments.sort(function (a, b) { + return a.content > b.content; + }); + assert.equalObjects(foundPost.user, user, 'foundPost.user'); + assert.equalObjects(foundPost.comments, comments, 'foundPost.comments'); + + case 63: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + + it('should return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var props, user, userId, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context2.next = 4; + return adapter.create(User, props); + + case 4: + user = _context2.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + assert.equal(user.name, 'John', 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + + assert.debug('find', User.name, userId); + _context2.next = 12; + return adapter.find(User, userId, { raw: true }); + + case 12: + result = _context2.sent; + + assert.debug('found', User.name, result); + assert.isDefined(result.data, 'result.data'); + assert.isDefined(result.found, 'result.found'); + assert.equal(result.data.name, 'John', 'result.data.name'); + assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); + assert.equal(result.found, 1, 'result.found'); + + case 19: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + + it('should return nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + assert.debug('find', User.name, 'non-existent-id'); + _context3.next = 3; + return adapter.find(User, 'non-existent-id'); + + case 3: + result = _context3.sent; + + assert.debug('found', User.name, result); + assert.isUndefined(result, 'result'); + + case 6: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + + it('should return raw and nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + assert.debug('find', User.name, 'non-existent-id'); + _context4.next = 3; + return adapter.find(User, 'non-existent-id', { raw: true }); + + case 3: + result = _context4.sent; + + assert.debug('found', User.name, result); + assert.isUndefined(result.data, 'result.data'); + assert.isDefined(result.found, 'result.found'); + assert.equal(result.found, 0, 'result.found'); + + case 8: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + + it('should load belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var props, user, profile, post, comment; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props); + + case 7: + user = _context5.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context5.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context5.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context5.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context5.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context5.sent; + + assert.debug('created', Comment.name, comment); + + assert.debug('find', Comment.name, comment[Comment.idAttribute]); + _context5.next = 30; + return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'post'] }); + + case 30: + comment = _context5.sent; + + assert.debug('found', Comment.name, comment); + + assert.isDefined(comment, 'comment'); + assert.isDefined(comment.post, 'comment.post'); + assert.isDefined(comment.user, 'comment.user'); + + case 35: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + + it('should load belongsTo relations and filter sub queries', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + var props, user, user2, post, post2, post3, post4; + return regeneratorRuntime.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context6.next = 6; + return adapter.create(User, props); + + case 6: + user = _context6.sent; + + assert.debug('created', User.name, user); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context6.next = 12; + return adapter.create(User, props); + + case 12: + user2 = _context6.sent; + + assert.debug('created', User.name, user); + + props = { status: 'draft', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 18; + return adapter.create(Post, props); + + case 18: + post = _context6.sent; + + assert.debug('created', Post.name, post); + + props = { status: 'published', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 24; + return adapter.create(Post, props); + + case 24: + post2 = _context6.sent; + + assert.debug('created', Post.name, post2); + + props = { status: 'draft', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 30; + return adapter.create(Post, props); + + case 30: + post3 = _context6.sent; + + assert.debug('created', Post.name, post3); + + props = { status: 'published', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 36; + return adapter.create(Post, props); + + case 36: + post4 = _context6.sent; + + assert.debug('created', Post.name, post4); + + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 41; + return adapter.find(User, user[User.idAttribute], { 'with': ['post'] }); + + case 41: + user = _context6.sent; + + assert.debug('found', User.name, user); + + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 2, 'user.posts.length'); + + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 49; + return adapter.find(User, user[User.idAttribute], { 'with': [{ + relation: 'post', + query: { + status: 'published' + } + }] }); + + case 49: + user = _context6.sent; + + assert.debug('found', User.name, user); + + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 1, 'user.posts.length'); + + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 57; + return adapter.find(User, user[User.idAttribute], { 'with': [{ + relation: 'post', + replace: true, + query: { + status: 'published' + } + }] }); + + case 57: + user = _context6.sent; + + assert.debug('found', User.name, user); + + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 2, 'user.posts.length'); + + case 62: + case 'end': + return _context6.stop(); + } + } + }, _callee6, this); + }))); + + if (options.hasFeature('findBelongsToNested')) { + it('should load belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + var props, user, profile, post, comment; + return regeneratorRuntime.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context7.next = 7; + return adapter.create(User, props); + + case 7: + user = _context7.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context7.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context7.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context7.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context7.sent; + + assert.debug('created', Comment.name, comment); + + assert.debug('find', Comment.name, comment[Comment.idAttribute]); + _context7.next = 30; + return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'user.profile', 'post', 'post.user'] }); + + case 30: + comment = _context7.sent; + + assert.debug('found', Comment.name, comment); + + assert.isDefined(comment, 'comment'); + assert.isDefined(comment.post, 'comment.post'); + assert.isDefined(comment.post.user, 'comment.post.user'); + assert.isDefined(comment.user, 'comment.user'); + assert.isDefined(comment.user.profile, 'comment.user.profile'); + + case 37: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + }))); + } + + it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + var props, user, profile, post, postId, comment; + return regeneratorRuntime.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context8.next = 7; + return adapter.create(User, props); + + case 7: + user = _context8.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context8.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context8.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context8.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context8.sent; + postId = post[Post.idAttribute]; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: postId, userId: post.userId }; + assert.debug('create', Comment.name, props); + _context8.next = 26; + return adapter.create(Comment, props); + + case 26: + comment = _context8.sent; + + assert.debug('created', Comment.name, comment); + + assert.debug('find', Post.name, postId); + _context8.next = 31; + return adapter.find(Post, postId, { 'with': ['user', 'comment'] }); + + case 31: + post = _context8.sent; + + assert.debug('found', Post.name, post); + + assert.isDefined(post.comments, 'post.comments'); + assert.isDefined(post.user, 'post.user'); + + case 35: + case 'end': + return _context8.stop(); + } + } + }, _callee8, this); + }))); + + if (options.hasFeature('findBelongsToHasManyNested')) { + it('should load hasMany and belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + var props, user, profile, post, postId, comment; + return regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context9.next = 7; + return adapter.create(User, props); + + case 7: + user = _context9.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context9.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context9.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context9.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context9.sent; + postId = post[Post.idAttribute]; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: postId, userId: post.userId }; + assert.debug('create', Comment.name, props); + _context9.next = 26; + return adapter.create(Comment, props); + + case 26: + comment = _context9.sent; + + assert.debug('created', Comment.name, comment); + + assert.debug('find', Post.name, postId); + _context9.next = 31; + return adapter.find(Post, postId, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); + + case 31: + post = _context9.sent; + + assert.debug('found', Post.name, post); + + assert.isDefined(post.comments, 'post.comments'); + assert.isDefined(post.comments[0].user, 'post.comments[0].user'); + assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile'); + assert.isDefined(post.user, 'post.user'); + + case 37: + case 'end': + return _context9.stop(); + } + } + }, _callee9, this); + }))); + } + + if (options.hasFeature('findHasManyLocalKeys')) { + it('should load hasMany localKeys (array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + var props, tag, tag2, post, postId; + return regeneratorRuntime.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; + + assert.debug('create', Tag.name, props); + _context10.next = 6; + return adapter.create(Tag, props); + + case 6: + tag = _context10.sent; + + assert.debug('created', Tag.name, tag); + + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context10.next = 12; + return adapter.create(Tag, props); + + case 12: + tag2 = _context10.sent; + + assert.debug('created', Tag.name, tag2); + + props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }; + assert.debug('create', Post.name, props); + _context10.next = 18; + return adapter.create(Post, props); + + case 18: + post = _context10.sent; + postId = post[Post.idAttribute]; + + assert.debug('created', Post.name, post); + + assert.debug('find', Post.name, postId); + _context10.next = 24; + return adapter.find(Post, postId, { 'with': ['tag'] }); + + case 24: + post = _context10.sent; + + assert.debug('found', Post.name, post); + + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); + assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); + + case 30: + case 'end': + return _context10.stop(); + } + } + }, _callee10, this); + }))); + it('should load hasMany localKeys (empty array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + var props, post, postId; + return regeneratorRuntime.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + this.toClear.push('Post'); + props = { content: 'test' }; + + assert.debug('create', Post.name, props); + _context11.next = 5; + return adapter.create(Post, props); + + case 5: + post = _context11.sent; + postId = post[Post.idAttribute]; + + assert.debug('created', Post.name, post); + + assert.debug('find', Post.name, postId); + _context11.next = 11; + return adapter.find(Post, postId, { 'with': ['tag'] }); + + case 11: + post = _context11.sent; + + assert.debug('found', Post.name, post); + + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.deepEqual(post.tags, [], 'post.tags'); + + case 16: + case 'end': + return _context11.stop(); + } + } + }, _callee11, this); + }))); + it('should load hasMany localKeys (object) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + var _tagIds; + + var props, tag, tag2, post, postId; + return regeneratorRuntime.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; + + assert.debug('create', Tag.name, props); + _context12.next = 6; + return adapter.create(Tag, props); + + case 6: + tag = _context12.sent; + + assert.debug('created', Tag.name, tag); + + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context12.next = 12; + return adapter.create(Tag, props); + + case 12: + tag2 = _context12.sent; + + assert.debug('created', Tag.name, tag2); + + props = { content: 'test', tagIds: (_tagIds = {}, babelHelpers.defineProperty(_tagIds, tag[Tag.idAttribute], true), babelHelpers.defineProperty(_tagIds, tag2[Tag.idAttribute], true), _tagIds) }; + assert.debug('create', Post.name, props); + _context12.next = 18; + return adapter.create(Post, props); + + case 18: + post = _context12.sent; + postId = post[Post.idAttribute]; + + assert.debug('created', Post.name, post); + + assert.debug('find', Post.name, postId); + _context12.next = 24; + return adapter.find(Post, postId, { 'with': ['tag'] }); + + case 24: + post = _context12.sent; + + assert.debug('found', Post.name); + + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); + assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); + + case 30: + case 'end': + return _context12.stop(); + } + } + }, _callee12, this); + }))); + } + + if (options.hasFeature('findHasManyForeignKeys')) { + it('should load hasMany foreignKeys (array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + var props, tag, tagId, tag2, tag2Id, post, post2; + return regeneratorRuntime.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; + + assert.debug('create', Tag.name, props); + _context13.next = 6; + return adapter.create(Tag, props); + + case 6: + tag = _context13.sent; + tagId = tag[Tag.idAttribute]; + + assert.debug('created', Tag.name, tag); + + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context13.next = 13; + return adapter.create(Tag, props); + + case 13: + tag2 = _context13.sent; + tag2Id = tag2[Tag.idAttribute]; + + assert.debug('created', Tag.name, tag2); + + props = { content: 'test', tagIds: [tagId] }; + assert.debug('create', Post.name, props); + _context13.next = 20; + return adapter.create(Post, props); + + case 20: + post = _context13.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', tagIds: [tagId, tag2Id] }; + assert.debug('create', Post.name, props); + _context13.next = 26; + return adapter.create(Post, props); + + case 26: + post2 = _context13.sent; + + assert.debug('created', Post.name, post2); + + assert.debug('find', Tag.name, tagId); + _context13.next = 31; + return adapter.find(Tag, tagId, { 'with': ['post'] }); + + case 31: + tag = _context13.sent; + + assert.debug('found', Tag.name, tag); + + assert.isDefined(tag.posts, 'tag.posts'); + assert.equal(tag.value, 'big data', 'tag.value'); + assert.equal(tag.posts.length, 2, 'tag.posts.length'); + + assert.debug('find', Tag.name, tag2Id); + _context13.next = 39; + return adapter.find(Tag, tag2Id, { 'with': ['post'] }); + + case 39: + tag2 = _context13.sent; + + assert.debug('found', Tag.name, tag2); + + assert.isDefined(tag2.posts, 'tag2.posts'); + assert.equal(tag2.value, 'servers', 'tag2.value'); + assert.equal(tag2.posts.length, 1, 'tag2.posts.length'); + assert.objectsEqual(tag2.posts, [post2], 'tag2.posts'); + + case 45: + case 'end': + return _context13.stop(); + } + } + }, _callee13, this); + }))); + } + }); + } + + /* global assert:true */ + function findAllTest (options) { + describe('Adapter#findAll', function () { + var adapter, User, Profile, Post, Comment; + + beforeEach(function () { + adapter = this.$$adapter; + User = this.$$User; + Profile = this.$$Profile; + Post = this.$$Post; + Comment = this.$$Comment; + }); + + it('should exist', function () { + assert.equal(babelHelpers.typeof(adapter.findAll), 'function', 'adapter should have a "findAll" method'); + }); + + it('should filter users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var props, users, user, userId, users2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + props = { name: 'John' }; + + assert.debug('findAll', User.name, { age: 30 }); + _context.next = 4; + return adapter.findAll(User, { age: 30 }); + + case 4: + users = _context.sent; + + assert.debug('found', User.name, users); + assert.equal(users.length, 0, 'users.length'); + + assert.debug('create', User.name, props); + _context.next = 10; + return adapter.create(User, props); + + case 10: + user = _context.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 16; + return adapter.findAll(User, { name: 'John' }); + + case 16: + users2 = _context.sent; + + assert.debug('found', User.name, users2); + + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', users2[0].name); + + case 21: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + + if (options.hasFeature('findAllInOp')) { + it('should filter users using the "in" operator', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var users, user, id, users2; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return adapter.findAll(User, { + where: { + age: { + 'in': [30] + } + } + }); + + case 2: + users = _context2.sent; + + assert.equal(users.length, 0, 'users.length'); + + _context2.next = 6; + return adapter.create(User, { name: 'John' }); + + case 6: + user = _context2.sent; + id = user[User.idAttribute]; + _context2.next = 10; + return adapter.findAll(User, { name: 'John' }); + + case 10: + users2 = _context2.sent; + + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', 'users2[0].name'); + + case 14: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + } + + if (options.hasFeature('findAllLikeOp')) { + it('should filter users using the "like" operator', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var users, user, id, users2; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return adapter.findAll(User, { + where: { + name: { + 'like': '%J%' + } + } + }); + + case 2: + users = _context3.sent; + + assert.equal(users.length, 0); + + _context3.next = 6; + return adapter.create(User, { name: 'John' }); + + case 6: + user = _context3.sent; + id = user.id; + _context3.next = 10; + return adapter.findAll(User, { + where: { + name: { + 'like': '%J%' + } + } + }); + + case 10: + users2 = _context3.sent; + + assert.equal(users2.length, 1); + assert.equal(users2[0].id, id); + assert.equal(users2[0].name, 'John'); + + case 14: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + } + + if (options.hasFeature('findAllOpNotFound')) { + it('should throw "Operator not found" error', function () { + return adapter.findAll(User, { + where: { + name: { + op: 'John' + } + } + }).then(function () { + throw new Error('should have failed!'); + }, function (err) { + assert.equal(err.message, 'Operator op not supported!'); + }); + }); + } + + if (options.hasFeature('findAllBelongsTo')) { + it('should load belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var props, user, profile, post, comment, user2, post2, comment2, comments; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context4.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context4.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context4.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context4.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context4.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context4.sent; + + assert.debug('created', Comment.name, comment); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context4.next = 31; + return adapter.create(User, props); + + case 31: + user2 = _context4.sent; + + assert.debug('created', User.name, user2); + + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context4.next = 37; + return adapter.create(Post, props); + + case 37: + post2 = _context4.sent; + + assert.debug('created', Post.name, post2); + + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context4.next = 43; + return adapter.create(Comment, props); + + case 43: + comment2 = _context4.sent; + + assert.debug('created', Comment.name, comment2); + + assert.debug('findAll', Comment.name, {}); + _context4.next = 48; + return adapter.findAll(Comment, {}, { 'with': ['user', 'post'] }); + + case 48: + comments = _context4.sent; + + assert.debug('found', Comment.name, comments); + + assert.isDefined(comments[0].post, 'comments[0].post'); + assert.isDefined(comments[0].user, 'comments[0].user'); + assert.isDefined(comments[1].post, 'comments[1].post'); + assert.isDefined(comments[1].user, 'comments[1].user'); + + case 54: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + + it('should load belongsTo relations and filter sub queries', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var props, user, user2, post, post2, post3, post4, users; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context5.next = 6; + return adapter.create(User, props); + + case 6: + user = _context5.sent; + + assert.debug('created', User.name, user); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context5.next = 12; + return adapter.create(User, props); + + case 12: + user2 = _context5.sent; + + assert.debug('created', User.name, user); + + props = { status: 'draft', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 18; + return adapter.create(Post, props); + + case 18: + post = _context5.sent; + + assert.debug('created', Post.name, post); + + props = { status: 'published', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 24; + return adapter.create(Post, props); + + case 24: + post2 = _context5.sent; + + assert.debug('created', Post.name, post2); + + props = { status: 'draft', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 30; + return adapter.create(Post, props); + + case 30: + post3 = _context5.sent; + + assert.debug('created', Post.name, post3); + + props = { status: 'published', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 36; + return adapter.create(Post, props); + + case 36: + post4 = _context5.sent; + + assert.debug('created', Post.name, post4); + + assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + _context5.next = 41; + return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); + + case 41: + users = _context5.sent; + + assert.debug('found', User.name, users); + + assert.isDefined(users, 'users'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 2, 'users[0].posts.length'); + + assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + _context5.next = 49; + return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ + relation: 'post', + query: { + status: 'published' + } + }] }); + + case 49: + users = _context5.sent; + + assert.debug('found', User.name, users); + + assert.isDefined(users, 'users'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); + + assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + _context5.next = 57; + return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ + relation: 'post', + replace: true, + query: { + status: 'published' + } + }] }); + + case 57: + users = _context5.sent; + + assert.debug('found', User.name, users); + + assert.isDefined(user, 'user'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); + + case 62: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + } + + if (options.hasFeature('findAllBelongsToNested')) { + it('should load belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + var props, user, profile, post, comment, user2, post2, comment2, comments; + return regeneratorRuntime.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context6.next = 7; + return adapter.create(User, props); + + case 7: + user = _context6.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context6.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context6.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context6.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context6.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context6.sent; + + assert.debug('created', Comment.name, comment); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context6.next = 31; + return adapter.create(User, props); + + case 31: + user2 = _context6.sent; + + assert.debug('created', User.name, user2); + + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 37; + return adapter.create(Post, props); + + case 37: + post2 = _context6.sent; + + assert.debug('created', Post.name, post2); + + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context6.next = 43; + return adapter.create(Comment, props); + + case 43: + comment2 = _context6.sent; + + assert.debug('created', Comment.name, comment2); + + assert.debug('findAll', Comment.name, {}); + _context6.next = 48; + return adapter.findAll(Comment, {}, { 'with': ['user', 'user.profile', 'post', 'post.user'] }); + + case 48: + comments = _context6.sent; + + assert.debug('found', Comment.name, comments); + + assert.isDefined(comments[0].post, 'comments[0].post'); + assert.isDefined(comments[0].post.user, 'comments[0].post.user'); + assert.isDefined(comments[0].user, 'comments[0].user'); + assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile'); + assert.isDefined(comments[1].post, 'comments[1].post'); + assert.isDefined(comments[1].post.user, 'comments[1].post.user'); + assert.isDefined(comments[1].user, 'comments[1].user'); + + case 57: + case 'end': + return _context6.stop(); + } + } + }, _callee6, this); + }))); + } + + if (options.hasFeature('findAllBelongsToHasMany')) { + it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + var props, user, profile, post, comment, user2, post2, comment2, posts; + return regeneratorRuntime.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context7.next = 7; + return adapter.create(User, props); + + case 7: + user = _context7.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context7.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context7.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context7.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context7.sent; + + assert.debug('created', Comment.name, comment); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context7.next = 31; + return adapter.create(User, props); + + case 31: + user2 = _context7.sent; + + assert.debug('created', User.name, user2); + + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 37; + return adapter.create(Post, props); + + case 37: + post2 = _context7.sent; + + assert.debug('created', Post.name, post2); + + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 43; + return adapter.create(Comment, props); + + case 43: + comment2 = _context7.sent; + + assert.debug('created', Comment.name, comment2); + + assert.debug('find', Post.name, {}); + _context7.next = 48; + return adapter.findAll(Post, {}, { 'with': ['user', 'comment'] }); + + case 48: + posts = _context7.sent; + + assert.debug('found', Post.name, posts); + + assert.isDefined(posts[0].comments, 'posts[0].comments'); + assert.isDefined(posts[0].user, 'posts[0].user'); + assert.isDefined(posts[1].comments, 'posts[1].comments'); + assert.isDefined(posts[1].user, 'posts[1].user'); + + case 54: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + }))); + } + + if (options.hasFeature('findAllBelongsToHasManyNested')) { + it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + var props, user, profile, post, comment, user2, post2, comment2, posts; + return regeneratorRuntime.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context8.next = 7; + return adapter.create(User, props); + + case 7: + user = _context8.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context8.next = 13; + return adapter.create(Profile, props); + + case 13: + profile = _context8.sent; + + assert.debug('created', Profile.name, profile); + + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context8.next = 19; + return adapter.create(Post, props); + + case 19: + post = _context8.sent; + + assert.debug('created', Post.name, post); + + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context8.next = 25; + return adapter.create(Comment, props); + + case 25: + comment = _context8.sent; + + assert.debug('created', Comment.name, comment); + + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context8.next = 31; + return adapter.create(User, props); + + case 31: + user2 = _context8.sent; + + assert.debug('created', User.name, user2); + + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context8.next = 37; + return adapter.create(Post, props); + + case 37: + post2 = _context8.sent; + + assert.debug('created', Post.name, post2); + + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context8.next = 43; + return adapter.create(Comment, props); + + case 43: + comment2 = _context8.sent; + + assert.debug('created', Comment.name, comment2); + + assert.debug('find', Post.name, {}); + _context8.next = 48; + return adapter.findAll(Post, {}, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); + + case 48: + posts = _context8.sent; + + assert.debug('found', Post.name, posts); + + assert.isDefined(posts[0].comments, 'posts[0].comments'); + assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user'); + assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile'); + assert.isDefined(posts[0].user, 'posts[0].user'); + assert.isDefined(posts[1].comments, 'posts[1].comments'); + assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user'); + assert.isDefined(posts[1].user, 'posts[1].user'); + + case 57: + case 'end': + return _context8.stop(); + } + } + }, _callee8, this); + }))); + } + + if (options.hasFeature('filterOnRelations')) { + it('should filter using belongsTo relation', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + var profile1, user1, post1, user2, post2, users; + return regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context9.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); + + case 5: + profile1 = _context9.sent; + _context9.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); + + case 8: + user1 = _context9.sent; + _context9.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); + + case 11: + post1 = _context9.sent; + _context9.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); + + case 14: + _context9.next = 16; + return adapter.create(User, { name: 'Sally' }); + + case 16: + user2 = _context9.sent; + _context9.next = 19; + return adapter.create(Post, { content: 'bar', userId: user2.id }); + + case 19: + post2 = _context9.sent; + _context9.next = 22; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); + + case 22: + _context9.next = 24; + return adapter.findAll(User, { 'profile.email': 'foo@test.com' }); + + case 24: + users = _context9.sent; + + assert.equal(users.length, 1); + assert.equal(users[0].profileId, profile1.id); + assert.equal(users[0].name, 'John'); + + case 28: + case 'end': + return _context9.stop(); + } + } + }, _callee9, this); + }))); + + it('should filter through multiple hasOne/belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + var profile1, user1, post1, profile2, user2, post2, comments; + return regeneratorRuntime.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context10.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); + + case 5: + profile1 = _context10.sent; + _context10.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); + + case 8: + user1 = _context10.sent; + _context10.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); + + case 11: + post1 = _context10.sent; + _context10.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); + + case 14: + _context10.next = 16; + return adapter.create(Profile, { email: 'bar@test.com' }); + + case 16: + profile2 = _context10.sent; + _context10.next = 19; + return adapter.create(User, { name: 'Sally', profileId: profile2.id }); + + case 19: + user2 = _context10.sent; + _context10.next = 22; + return adapter.create(Post, { content: 'bar', userId: user2.id }); + + case 22: + post2 = _context10.sent; + _context10.next = 25; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); + + case 25: + _context10.next = 27; + return adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' }); + + case 27: + comments = _context10.sent; + + assert.equal(comments.length, 1); + assert.equal(comments[0].userId, user1.id); + assert.equal(comments[0].content, 'test1'); + + case 31: + case 'end': + return _context10.stop(); + } + } + }, _callee10, this); + }))); + + it('should filter using multiple hasOne/belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + var profile1, user1, post1, profile2, user2, post2, comments; + return regeneratorRuntime.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context11.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); + + case 5: + profile1 = _context11.sent; + _context11.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); + + case 8: + user1 = _context11.sent; + _context11.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); + + case 11: + post1 = _context11.sent; + _context11.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); + + case 14: + _context11.next = 16; + return adapter.create(Profile, { email: 'bar@test.com' }); + + case 16: + profile2 = _context11.sent; + _context11.next = 19; + return adapter.create(User, { name: 'Sally', profileId: profile2.id }); + + case 19: + user2 = _context11.sent; + _context11.next = 22; + return adapter.create(Post, { content: 'bar', userId: user2.id }); + + case 22: + post2 = _context11.sent; + _context11.next = 25; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); + + case 25: + _context11.next = 27; + return adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' }); + + case 27: + comments = _context11.sent; + + assert.equal(comments.length, 1); + assert.equal(comments[0].userId, user1.id); + assert.equal(comments[0].content, 'test1'); + + case 31: + case 'end': + return _context11.stop(); + } + } + }, _callee11, this); + }))); + } + + it('should allow passing limit and offset as strings', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + return regeneratorRuntime.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return adapter.findAll(User, { limit: '10', offset: '20' }); + + case 2: + case 'end': + return _context12.stop(); + } + } + }, _callee12, this); + }))); + + if (options.hasFeature('findAllGroupedWhere')) { + it('should support filtering grouped "where" clauses', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + var PostCollection, post1, post3, post5, query; + return regeneratorRuntime.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + PostCollection = adapter.getCollection(Post); + post1 = PostCollection.add({ author: 'John', age: 30, id: 5, roles: ['admin'] }); + + PostCollection.add({ author: 'Sally', age: 31, id: 6, roles: ['admin', 'dev'] }); + post3 = PostCollection.add({ author: 'Mike', age: 32, id: 7, roles: ['admin', 'dev'] }); + + PostCollection.add({ author: 'Adam', age: 33, id: 8, roles: [] }); + post5 = PostCollection.add({ author: 'Adam', age: 33, id: 9, roles: ['admin', 'dev', 'owner'] }); + query = { + where: [[{ + roles: { + 'contains': 'admin' + }, + age: { + '=': 30 + } + }, 'or', { + author: { + '=': 'Mike' + } + }], 'or', { + roles: { + 'contains': 'owner' + }, + age: { + '=': 33 + } + }] + }; + _context13.t0 = assert; + _context13.next = 10; + return adapter.findAll(Post, query); + + case 10: + _context13.t1 = _context13.sent; + _context13.t2 = [post1, post3, post5]; + + _context13.t0.objectsEqual.call(_context13.t0, _context13.t1, _context13.t2); + + case 13: + case 'end': + return _context13.stop(); + } + } + }, _callee13, this); + }))); + } + }); + } + + /* global assert:true */ + function sumTest (options) { + describe('Adapter#sum', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.sum), 'function', 'adapter should have a "sum" method'); + }); + it('should sum users\' age', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, sum, user, user2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 30 }; + + + assert.debug('sum', User.name, {}); + _context.next = 6; + return adapter.sum(User, 'age'); + + case 6: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); + + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 12; + return adapter.sum(User, 'age', { name: 'John' }); + + case 12: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); + + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 18; + return adapter.sum(User, 'age', { name: 'Sally' }); + + case 18: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); + + assert.debug('create', User.name, props); + _context.next = 24; + return adapter.create(User, props); + + case 24: + user = _context.sent; + + assert.debug('created', User.name, user); + + assert.debug('sum', User.name, {}); + _context.next = 29; + return adapter.sum(User, 'age'); + + case 29: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); + + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 35; + return adapter.sum(User, 'age', { name: 'John' }); + + case 35: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); + + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 41; + return adapter.sum(User, 'age', { name: 'Sally' }); + + case 41: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); + + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 47; + return adapter.create(User, { name: 'Sally', age: 27 }); + + case 47: + user2 = _context.sent; + + assert.debug('created', User.name, user2); + + assert.debug('sum', User.name, {}); + _context.next = 52; + return adapter.sum(User, 'age'); + + case 52: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 57); + + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 58; + return adapter.sum(User, 'age', { name: 'John' }); + + case 58: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); + + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 64; + return adapter.sum(User, 'age', { name: 'Sally' }); + + case 64: + sum = _context.sent; + + assert.debug('summed', User.name, sum); + assert.equal(sum, 27); + + case 67: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should sum users\' age and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 30 }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.debug('sum', User.name, props); + _context2.next = 11; + return adapter.sum(User, 'age', props, { raw: true }); + + case 11: + result = _context2.sent; + + assert.debug('summed', User.name, result); + assert.equal(result.data, 30, 'result.data'); + + case 14: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + }); + } + + /* global assert:true */ + function updateTest (options) { + describe('Adapter#update', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.update), 'function', 'adapter should have a "update" method'); + }); + it('should update a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, foundUser, updatedUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('find', User.name, user[User.idAttribute]); + _context.next = 13; + return adapter.find(User, user[User.idAttribute]); + + case 13: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + + assert.equal(foundUser.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(foundUser[User.idAttribute], 'new user should have an id'); + assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); + + assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); + _context.next = 21; + return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }); + + case 21: + updatedUser = _context.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], user[User.idAttribute]); + + assert.debug('find', User.name, user[User.idAttribute]); + _context.next = 28; + return adapter.find(User, user[User.idAttribute]); + + case 28: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'Johnny'); + assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); + + case 32: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should update a user and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); + _context2.next = 13; + return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true }); + + case 13: + result = _context2.sent; + + assert.debug('updated', User.name, result); + assert.isDefined(result.data, 'result.data is defined'); + assert.isDefined(result.updated, 'result.updated is defined'); + assert.equal(result.data.name, 'Johnny', 'result.data.name should be "Johnny"'); + assert.equal(result.data[User.idAttribute], user[User.idAttribute], 'result.data.' + User.idAttribute + ' should be ' + user[User.idAttribute]); + assert.equal(result.updated, 1, 'result.updated should be 1'); + + case 20: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should throw when updating non-existent row', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('update', 'non-existent-id', { name: 'Johnny' }); + _context3.prev = 3; + _context3.next = 6; + return adapter.update(User, 'non-existent-id', { name: 'Johnny' }); + + case 6: + throw new Error('update should have failed!'); + + case 9: + _context3.prev = 9; + _context3.t0 = _context3['catch'](3); + + assert.debug('correctly threw error', _context3.t0.message); + assert.isDefined(_context3.t0.message, 'err.message is defined'); + assert.equal(_context3.t0.message, 'Not Found', 'err.message should be "Not Found"'); + + case 14: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this, [[3, 9]]); + }))); + }); + } + + /* global assert:true */ + function updateAllTest (options) { + describe('Adapter#updateAll', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.updateAll), 'function', 'adapter should have a "updateAll" method'); + }); + it('should update multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user1, userId1, user2, userId2, users, users2, users3, users4; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 20 }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user1 = _context.sent; + + assert.debug('created', User.name, user1); + userId1 = user1[User.idAttribute]; + + + props = { name: 'John', age: 30 }; + + assert.debug('create', User.name, props); + _context.next = 13; + return adapter.create(User, props); + + case 13: + user2 = _context.sent; + + assert.debug('created', User.name, user2); + userId2 = user2[User.idAttribute]; + + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 19; + return adapter.findAll(User, { name: 'John' }); + + case 19: + users = _context.sent; + + assert.debug('found', User.name, users); + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users[0].name, 'John'); + assert.equal(users[0].name, 'John'); + assert.equal(users.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' }); + _context.next = 31; + return adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' }); + + case 31: + users2 = _context.sent; + + assert.debug('updated', User.name, users2); + users2.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users2[0].name, 'Johnny'); + assert.equal(users2[0].name, 'Johnny'); + assert.equal(users2.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 43; + return adapter.findAll(User, { name: 'John' }); + + case 43: + users3 = _context.sent; + + assert.debug('found', User.name, users3); + assert.equalObjects(users3, []); + assert.equal(users3.length, 0); + + assert.debug('findAll', User.name, { name: 'Johnny' }); + _context.next = 50; + return adapter.findAll(User, { name: 'Johnny' }); + + case 50: + users4 = _context.sent; + + assert.debug('found', User.name, users4); + + users4.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users4[0].name, 'Johnny'); + assert.equal(users4[0].name, 'Johnny'); + assert.equal(users4.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 30; + }).length, 1); + + case 59: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); + } + + /* global assert:true */ + function updateManyTest (options) { + describe('Adapter#updateMany', function () { + it('should exist', function () { + assert.equal(babelHelpers.typeof(this.$$adapter.updateMany), 'function', 'adapter should have a "updateMany" method'); + }); + it('should update multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, user1, userId1, user2, userId2, users, users2, users3, users4; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + _context.next = 4; + return adapter.create(User, { name: 'John', age: 20 }); + + case 4: + user1 = _context.sent; + userId1 = user1.id; + _context.next = 8; + return adapter.create(User, { name: 'John', age: 30 }); + + case 8: + user2 = _context.sent; + userId2 = user2.id; + _context.next = 12; + return adapter.findAll(User, { name: 'John' }); + + case 12: + users = _context.sent; + + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users[0].name, 'John'); + assert.equal(users[0].name, 'John'); + assert.equal(users.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.id === userId2; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + user1.age = 101; + user2.age = 202; + _context.next = 24; + return adapter.updateMany(User, [user1, user2]); + + case 24: + users2 = _context.sent; + + users2.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users2.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.id === userId2; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 101; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 202; + }).length, 1); + + _context.next = 32; + return adapter.findAll(User, { age: 20 }); + + case 32: + users3 = _context.sent; + + assert.objectsEqual(users3, []); + assert.equal(users3.length, 0); + + _context.next = 37; + return adapter.findAll(User, { age: 101 }); + + case 37: + users4 = _context.sent; + + users4.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users4.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.id === userId2; + }).length, 0); + assert.equal(users4.filter(function (x) { + return x.age === 101; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 202; + }).length, 0); + + case 43: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); + } + + chai.assert.equalObjects = function (a, b, m) { + chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); + }; + + chai.assert.objectsEqual = function (a, b, m) { + chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); + }; + + var debug = false; + + chai.assert.debug = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (debug) { + var _console; + + args.forEach(function (arg, i) { + args[i] = JSON.stringify(arg, null, 2); + }); + (_console = console).log.apply(_console, ['DEBUG (TEST):'].concat(args)); + } + }; + + var prefix = 'TestRunner.init(options): options'; + + var index = { + init: function init(options) { + options = options || {}; + debug = !!options.debug; + options.hasMethod = function (method) { + options.methods || (options.methods = 'all'); + options.xmethods || (options.xmethods = []); + return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1; + }; + options.hasFeature = function (feature) { + options.features || (options.features = 'all'); + options.xfeatures || (options.xfeatures = []); + return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1; + }; + if (!options.Adapter || typeof options.Adapter !== 'function') { + throw new Error(prefix + '.Adapter: Expected function, Actual: ' + babelHelpers.typeof(options.Adapter)); + } + beforeEach(function () { + this.$$adapter = new options.Adapter(options.adapterConfig); + this.$$container = new options.JSData.Container(options.containerConfig || { + mapperDefaults: { + debug: false + } + }); + this.$$store = new options.JSData.DataStore(options.storeConfig || { + mapperDefaults: { + debug: false + } + }); + this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true }); + this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true }); + var userOptions = { + name: 'user', + relations: { + hasMany: { + post: { + localField: 'posts', + foreignKey: 'userId' + } + }, + hasOne: { + profile: { + localField: 'profile', + foreignKey: 'userId' + }, + address: { + localField: 'address', + foreignKey: 'userId' + } + }, + belongsTo: { + organization: { + localField: 'organization', + foreignKey: 'organizationId' + } + } + } + }; + var organizationOptions = { + name: 'organization', + relations: { + hasMany: { + user: { + localField: 'users', + foreignKey: 'organizationId' + } + } + } + }; + var postOptions = { + name: 'post', + relations: { + belongsTo: { + user: { + localField: 'user', + foreignKey: 'userId' + } + }, + hasMany: { + comment: { + localField: 'comments', + foreignKey: 'postId' + }, + tag: { + localField: 'tags', + localKeys: 'tagIds' + } + } + } + }; + var commentOptions = { + name: 'comment', + relations: { + belongsTo: { + post: { + localField: 'post', + foreignKey: 'postId' + }, + user: { + localField: 'user', + foreignKey: 'userId' + } + } + } + }; + var tagOptions = { + name: 'tag', + relations: { + hasMany: { + post: { + localField: 'posts', + foreignKeys: 'tagIds' + } + } + } + }; + this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); + this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); + this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); + this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); + this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {}); + this.$$store.defineMapper('profile', options.profileConfig || {}); + this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {}); + this.$$store.defineMapper('address', options.addressConfig || {}); + this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); + this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); + this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); + this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); + this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); + this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); + this.toClear = ['User']; + }); + + describe('js-data-adapter-tests', function () { + if (options.hasMethod('beforeCreate')) { + beforeCreateTest(options); + } + if (options.hasMethod('count')) { + countTest(options); + } + if (options.hasMethod('create')) { + createTest(options); + } + if (options.hasMethod('afterCreate')) { + afterCreateTest(options); + } + if (options.hasMethod('createMany')) { + createManyTest(options); + } + if (options.hasMethod('extend')) { + extendTest(options); + } + if (options.hasMethod('find')) { + findTest(options); + } + if (options.hasMethod('findAll')) { + findAllTest(options); + } + if (options.hasMethod('destroy')) { + destroyTest(options); + } + if (options.hasMethod('destroyAll')) { + destroyAllTest(options); + } + if (options.hasMethod('beforeUpdate')) { + beforeUpdateTest(options); + } + if (options.hasMethod('sum')) { + sumTest(options); + } + if (options.hasMethod('update')) { + updateTest(options); + } + if (options.hasMethod('afterUpdate')) { + afterUpdateTest(options); + } + if (options.hasMethod('updateAll')) { + updateAllTest(options); + } + if (options.hasMethod('updateMany')) { + updateManyTest(options); + } + }); + + afterEach(babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var Test, toClear, promise; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + Test = this; + toClear = []; + + if (Test.toClear.indexOf('Tag') !== -1) { + toClear.push('Tag'); + } + if (Test.toClear.indexOf('Comment') !== -1) { + toClear.push('Comment'); + } + if (Test.toClear.indexOf('Post') !== -1) { + toClear.push('Post'); + } + if (Test.toClear.indexOf('Profile') !== -1) { + toClear.push('Profile'); + } + if (Test.toClear.indexOf('User') !== -1) { + toClear.push('User'); + } + if (Test.toClear.indexOf('Address') !== -1) { + toClear.push('Address'); + } + promise = Promise.resolve(); + + toClear.forEach(function (Mapper) { + promise = promise.then(function () { + return Test.$$adapter.destroyAll(Test['$$' + Mapper]); + }); + }); + _context.next = 12; + return promise; + + case 12: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }, + assert: chai.assert, + sinon: sinon$1, + fail: function fail(msg) { + chai.assert.equal('should not reach this!: ' + msg, 'failure'); + }, + TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {}], + TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {}], + TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {}], + TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {}], + TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false] + }; + + return index; + +})); +//# sourceMappingURL=js-data-adapter-tests.js.map \ No newline at end of file diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map new file mode 100644 index 0000000..a510593 --- /dev/null +++ b/dist/js-data-adapter-tests.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n const PostCollection = adapter.getCollection(Post)\n const post1 = PostCollection.add({ author: 'John', age: 30, id: 5, roles: ['admin'] })\n PostCollection.add({ author: 'Sally', age: 31, id: 6, roles: ['admin', 'dev'] })\n const post3 = PostCollection.add({ author: 'Mike', age: 32, id: 7, roles: ['admin', 'dev'] })\n PostCollection.add({ author: 'Adam', age: 33, id: 8, roles: [] })\n const post5 = PostCollection.add({ author: 'Adam', age: 33, id: 9, roles: ['admin', 'dev', 'owner'] })\n\n let query = {\n where: [\n [\n {\n roles: {\n 'contains': 'admin'\n },\n age: {\n '=': 30\n }\n },\n 'or',\n {\n author: {\n '=': 'Mike'\n }\n }\n ],\n 'or',\n {\n roles: {\n 'contains': 'owner'\n },\n age: {\n '=': 33\n }\n }\n ]\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [post1, post3, post5])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,wDAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB,IAXsB,EAmBtB,IAnBsB;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBAHsB,GAGd,EAAE,MAAM,MAAR,EAHc;;;AAK5B,EAAA,oBAAM,IAAN,CAAW,OAAX,EAAoB,aAApB,EAAmC,UAAU,MAAV,EAAkB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;;;"} \ No newline at end of file From abd6f6ca05a05bf4df81aaac584c6e4b041a704c Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 16 May 2016 23:20:58 -0700 Subject: [PATCH 06/14] 0.7.1 --- dist/js-data-adapter-tests.js | 41 ++++++++++++++----------------- dist/js-data-adapter-tests.js.map | 2 +- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index 5566031..e9c098a 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -3748,51 +3748,48 @@ if (options.hasFeature('findAllGroupedWhere')) { it('should support filtering grouped "where" clauses', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee13() { - var PostCollection, post1, post3, post5, query; + var posts, query; return regeneratorRuntime.wrap(function _callee13$(_context13) { while (1) { switch (_context13.prev = _context13.next) { case 0: - PostCollection = adapter.getCollection(Post); - post1 = PostCollection.add({ author: 'John', age: 30, id: 5, roles: ['admin'] }); + _context13.next = 2; + return adapter.createMany(Post, [{ status: 'draft', content: 'foo' }, { status: 'broken', content: 'bar' }, { status: 'published', content: 'hi' }, { status: 'flagged', content: 'hello world' }, { status: 'flagged', content: 'test' }]); - PostCollection.add({ author: 'Sally', age: 31, id: 6, roles: ['admin', 'dev'] }); - post3 = PostCollection.add({ author: 'Mike', age: 32, id: 7, roles: ['admin', 'dev'] }); - - PostCollection.add({ author: 'Adam', age: 33, id: 8, roles: [] }); - post5 = PostCollection.add({ author: 'Adam', age: 33, id: 9, roles: ['admin', 'dev', 'owner'] }); + case 2: + posts = _context13.sent; query = { where: [[{ - roles: { - 'contains': 'admin' + content: { + '=': 'foo' }, - age: { - '=': 30 + status: { + '=': 'draft' } }, 'or', { - author: { - '=': 'Mike' + status: { + '=': 'published' } }], 'or', { - roles: { - 'contains': 'owner' + content: { + '=': 'test' }, - age: { - '=': 33 + status: { + '=': 'flagged' } }] }; _context13.t0 = assert; - _context13.next = 10; + _context13.next = 7; return adapter.findAll(Post, query); - case 10: + case 7: _context13.t1 = _context13.sent; - _context13.t2 = [post1, post3, post5]; + _context13.t2 = [posts[0], posts[2], posts[4]]; _context13.t0.objectsEqual.call(_context13.t0, _context13.t1, _context13.t2); - case 13: + case 10: case 'end': return _context13.stop(); } diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index a510593..ac3a2e3 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n const PostCollection = adapter.getCollection(Post)\n const post1 = PostCollection.add({ author: 'John', age: 30, id: 5, roles: ['admin'] })\n PostCollection.add({ author: 'Sally', age: 31, id: 6, roles: ['admin', 'dev'] })\n const post3 = PostCollection.add({ author: 'Mike', age: 32, id: 7, roles: ['admin', 'dev'] })\n PostCollection.add({ author: 'Adam', age: 33, id: 8, roles: [] })\n const post5 = PostCollection.add({ author: 'Adam', age: 33, id: 9, roles: ['admin', 'dev', 'owner'] })\n\n let query = {\n where: [\n [\n {\n roles: {\n 'contains': 'admin'\n },\n age: {\n '=': 30\n }\n },\n 'or',\n {\n author: {\n '=': 'Mike'\n }\n }\n ],\n 'or',\n {\n roles: {\n 'contains': 'owner'\n },\n age: {\n '=': 33\n }\n }\n ]\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [post1, post3, post5])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,wDAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EA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AAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ]\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[2], posts[4]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,wDAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB,IAXsB,EAmBtB,IAnBsB;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBA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C,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAjOlB;AAmOb,EAAA,wCAAsC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CAnOzB;AAqOb,EAAA,0CAAwC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;AAuOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file From bea15437554c483e295f2e5b3316c05563e3c600 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 17 May 2016 14:54:11 -0700 Subject: [PATCH 07/14] 0.7.2 --- dist/js-data-adapter-tests.js | 16 +++++++++------- dist/js-data-adapter-tests.js.map | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index e9c098a..080e1f5 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -3753,10 +3753,11 @@ while (1) { switch (_context13.prev = _context13.next) { case 0: - _context13.next = 2; + this.toClear.push('Post'); + _context13.next = 3; return adapter.createMany(Post, [{ status: 'draft', content: 'foo' }, { status: 'broken', content: 'bar' }, { status: 'published', content: 'hi' }, { status: 'flagged', content: 'hello world' }, { status: 'flagged', content: 'test' }]); - case 2: + case 3: posts = _context13.sent; query = { where: [[{ @@ -3777,19 +3778,20 @@ status: { '=': 'flagged' } - }] + }], + orderBy: 'status' }; _context13.t0 = assert; - _context13.next = 7; + _context13.next = 8; return adapter.findAll(Post, query); - case 7: + case 8: _context13.t1 = _context13.sent; - _context13.t2 = [posts[0], posts[2], posts[4]]; + _context13.t2 = [posts[0], posts[4], posts[2]]; _context13.t0.objectsEqual.call(_context13.t0, _context13.t1, _context13.t2); - case 10: + case 11: case 'end': return _context13.stop(); } diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index ac3a2e3..b5b9a3b 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ]\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[2], posts[4]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YA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KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,wDAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB,IAXsB,EAmBtB,IAnBsB;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBAHsB,GAGd,EAAE,MAAM,MAAR,EAHc;;;AAK5B,EAAA,oBAAM,IAAN,CAAW,OAAX,EAAoB,aAApB,EAAmC,UAAU,MAAV,EAAkB,KAAlB,EAAyB,IAAzB,EAA+B;AAChE,EAAA,uBAAO,SAAP,CAAiB,IAAjB,EAAuB,0CAAvB;AACA,EAAA,uBAAO,KAAP,CAAa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AAmC,YAAY,EAA/C,CAnOzB;AAqOb,EAAA,0CAAwC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;AAuOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file From 320cb7172ea0a29c375e4302801e5e1fbef11a33 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 25 May 2016 20:49:34 -0700 Subject: [PATCH 08/14] 0.7.3 --- dist/js-data-adapter-tests.js | 121 ++++++++++++++++++++++++------ dist/js-data-adapter-tests.js.map | 2 +- dist/js-data-adapter.js | 20 +++-- dist/js-data-adapter.js.map | 2 +- 4 files changed, 114 insertions(+), 31 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index 080e1f5..de92a8b 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -150,8 +150,9 @@ assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); assert.isObject(args[2], 'afterCreate should have received options'); assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); - case 18: + case 19: case 'end': return _context.stop(); } @@ -195,8 +196,9 @@ assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); assert.isObject(args[2], 'afterCreate should have received options'); assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); - case 17: + case 18: case 'end': return _context2.stop(); } @@ -241,8 +243,9 @@ assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); assert.isDefined(args[2], 'afterCreate should have received options'); assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); - case 18: + case 19: case 'end': return _context3.stop(); } @@ -286,8 +289,9 @@ assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); assert.isObject(args[2], 'afterCreate should have received options'); assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); - case 17: + case 18: case 'end': return _context4.stop(); } @@ -334,8 +338,9 @@ assert.isObject(args[3], 'afterCreate should have received result'); assert.equal(args[3].created, 1, 'result.created'); assert.isObject(args[3].data, 'result.data'); + adapter.afterCreate.restore(); - case 21: + case 22: case 'end': return _context5.stop(); } @@ -404,8 +409,9 @@ assert.isDefined(args[4], 'afterUpdate should have received updated record'); assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); - case 30: + case 31: case 'end': return _context.stop(); } @@ -468,8 +474,9 @@ assert.isDefined(args[4].data, 'args[4].data'); assert.equal(args[4].data[User.idAttribute], userId, 'args[4].data.' + User.idAttribute); assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name'); + adapter.afterUpdate.restore(); - case 33: + case 34: case 'end': return _context2.stop(); } @@ -529,8 +536,9 @@ assert.isDefined(args[4], 'afterUpdate should have received updated record'); assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); - case 29: + case 30: case 'end': return _context3.stop(); } @@ -591,8 +599,9 @@ assert.isDefined(args[4], 'afterUpdate should have received updated record'); assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); - case 30: + case 31: case 'end': return _context4.stop(); } @@ -652,8 +661,9 @@ assert.isDefined(args[4], 'afterUpdate should have received updated record'); assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); - case 29: + case 30: case 'end': return _context5.stop(); } @@ -705,8 +715,9 @@ assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); - case 17: + case 18: case 'end': return _context.stop(); } @@ -750,8 +761,9 @@ assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); - case 17: + case 18: case 'end': return _context2.stop(); } @@ -795,8 +807,9 @@ assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); assert.isDefined(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); - case 17: + case 18: case 'end': return _context3.stop(); } @@ -840,8 +853,9 @@ assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); - case 17: + case 18: case 'end': return _context4.stop(); } @@ -905,9 +919,10 @@ assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeCreate should have received options'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); - case 26: + case 27: case 'end': return _context.stop(); } @@ -963,9 +978,10 @@ assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeCreate should have received options'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); - case 26: + case 27: case 'end': return _context2.stop(); } @@ -1021,9 +1037,10 @@ assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeCreate should have received options'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); - case 26: + case 27: case 'end': return _context3.stop(); } @@ -1079,9 +1096,10 @@ assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeCreate should have received options'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); - case 26: + case 27: case 'end': return _context4.stop(); } @@ -4122,6 +4140,65 @@ } }, _callee3, this, [[3, 9]]); }))); + it('should keep relations specified by "with"', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, store, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + store = this.$$container; + + + sinon.stub(adapter, '_update', function (mapper, id, props, opts) { + assert.deepEqual(props.posts, [{ + id: 1234, + userId: 1 + }]); + assert.deepEqual(props.profile, { + id: 238, + userId: 1 + }); + assert.equal(props.address, undefined); + assert.equal(props.organization, undefined); + return [props, {}]; + }); + + assert.debug('update', 1, { id: 1 }); + _context4.next = 6; + return store.update('user', 1, { + id: 1, + posts: [{ + id: 1234, + userId: 1 + }], + address: { + id: 412, + userId: 1 + }, + profile: { + id: 238, + userId: 1 + }, + organizationId: 333, + organization: { + id: 333 + } + }, { with: ['posts', 'profile'] }); + + case 6: + result = _context4.sent; + + assert.debug('updated', 1, result); + adapter._update.restore(); + + case 9: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); }); } diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index b5b9a3b..3873ad8 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeCreate should have received options')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4C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KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;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C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index bdf0126..f8598d4 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -103,8 +103,14 @@ return final; }; - var withoutRelations = function withoutRelations(mapper, props) { - return jsData.utils.omit(props, mapper.relationFields || []); + var withoutRelations = function withoutRelations(mapper, props, opts) { + opts || (opts = {}); + opts.with || (opts.with = []); + var relationFields = mapper.relationFields || []; + var toStrip = relationFields.filter(function (value) { + return opts.with.indexOf(value) === -1; + }); + return jsData.utils.omit(props, toStrip); }; var DEFAULTS = { @@ -745,7 +751,7 @@ return jsData.utils.resolve(self[op](mapper, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; - props = withoutRelations(mapper, props); + props = withoutRelations(mapper, props, opts); op = opts.op = 'create'; self.dbg(op, mapper, props, opts); return jsData.utils.resolve(self._create(mapper, props, opts)); @@ -794,7 +800,7 @@ // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; props = props.map(function (record) { - return withoutRelations(mapper, record); + return withoutRelations(mapper, record, opts); }); op = opts.op = 'createMany'; self.dbg(op, mapper, props, opts); @@ -1497,7 +1503,7 @@ return jsData.utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; - props = withoutRelations(mapper, props); + props = withoutRelations(mapper, props, opts); op = opts.op = 'update'; self.dbg(op, mapper, id, props, opts); return jsData.utils.resolve(self._update(mapper, id, props, opts)); @@ -1554,7 +1560,7 @@ return jsData.utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook props = jsData.utils.isUndefined(_props) ? props : _props; - props = withoutRelations(mapper, props); + props = withoutRelations(mapper, props, opts); op = opts.op = 'updateAll'; self.dbg(op, mapper, props, query, opts); return jsData.utils.resolve(self._updateAll(mapper, props, query, opts)); @@ -1609,7 +1615,7 @@ // Allow for re-assignment from lifecycle hook records = jsData.utils.isUndefined(_records) ? records : _records; records = records.map(function (record) { - return withoutRelations(mapper, record); + return withoutRelations(mapper, record, opts); }); op = opts.op = 'updateMany'; self.dbg(op, mapper, records, opts); diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index b839d2d..8c56be7 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props) {\n return utils.omit(props, mapper.relationFields || [])\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props)\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle h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V,EAAmB;AAAA,EAAA,kDACJ,OADI;;AAAA,EAAA,UACpB,IADoB;AAAA,EAAA,UACd,MADc;;AAEzB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,KAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,KAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EAAyD,IAAzD,CAA8D,UAAU,SAAV,EAAqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAr1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter(function (value) {\n return opts.with.indexOf(value) === -1\n })\n return utils.omit(props, toStrip)\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record, opts)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record, opts)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,SAAS,SAAT,MAAS,CAAU,KAAV,EAAiB;AACrC,EAAA,MAAM,OAAO,EAAb;AACA,EAAA,MAAM,QAAQ,EAAd;AACA,EAAA,QAAM,OAAN,CAAc,UAAU,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AqB;;AAExF,EAAA,eAAOA,aAAM,WAAN,CAAkB,SAAlB,IAA+B,QAA/B,GAA0C,SAAjD;AACD,EAAA,OAHM,CAAP;AAID,EAAA,KAvBM,CAAP;AAwBD,EAAA;AAr1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file From d73dc859fd7a7d53487a99b40ba0835dae2b335a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Thu, 7 Jul 2016 21:27:23 -0700 Subject: [PATCH 09/14] 0.7.4 --- dist/js-data-adapter-tests.js | 211 +++++++------- dist/js-data-adapter-tests.js.map | 2 +- dist/js-data-adapter.js | 438 +++++++++++++----------------- dist/js-data-adapter.js.map | 2 +- 4 files changed, 295 insertions(+), 358 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index de92a8b..cb6e053 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -6,14 +6,13 @@ sinon$1 = 'default' in sinon$1 ? sinon$1['default'] : sinon$1; - var babelHelpers = {}; - babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - babelHelpers.asyncToGenerator = function (fn) { + var asyncToGenerator = function (fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { @@ -42,13 +41,13 @@ }; }; - babelHelpers.classCallCheck = function (instance, Constructor) { + var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - babelHelpers.createClass = function () { + var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; @@ -66,7 +65,7 @@ }; }(); - babelHelpers.defineProperty = function (obj, key, value) { + var defineProperty = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, @@ -81,7 +80,7 @@ return obj; }; - babelHelpers.inherits = function (subClass, superClass) { + var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } @@ -97,7 +96,7 @@ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; - babelHelpers.possibleConstructorReturn = function (self, call) { + var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } @@ -105,15 +104,13 @@ return call && (typeof call === "object" || typeof call === "function") ? call : self; }; - babelHelpers; - /* global assert:true */ function afterCreateTest (options) { describe('Adapter#afterCreate', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.afterCreate), 'function', 'adapter should have a "afterCreate" method'); + assert.equal(_typeof(this.$$adapter.afterCreate), 'function', 'adapter should have a "afterCreate" method'); }); - it('should call afterCreate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should call afterCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -159,7 +156,7 @@ } }, _callee, this); }))); - it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -205,7 +202,7 @@ } }, _callee2, this); }))); - it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -252,7 +249,7 @@ } }, _callee3, this); }))); - it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -298,7 +295,7 @@ } }, _callee4, this); }))); - it('should receive raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var adapter, User, props, result, args; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { @@ -354,9 +351,9 @@ function afterUpdateTest (options) { describe('Adapter#afterUpdate', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.afterUpdate), 'function', 'adapter should have a "afterUpdate" method'); + assert.equal(_typeof(this.$$adapter.afterUpdate), 'function', 'adapter should have a "afterUpdate" method'); }); - it('should call afterUpdate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should call afterUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -418,7 +415,7 @@ } }, _callee, this); }))); - it('should receive raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, userId, result, args; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -483,7 +480,7 @@ } }, _callee2, this); }))); - it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -545,7 +542,7 @@ } }, _callee3, this); }))); - it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -608,7 +605,7 @@ } }, _callee4, this); }))); - it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { @@ -677,9 +674,9 @@ function beforeCreateTest (options) { describe('Adapter#beforeCreate', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.beforeCreate), 'function', 'adapter should have a "beforeCreate" method'); + assert.equal(_typeof(this.$$adapter.beforeCreate), 'function', 'adapter should have a "beforeCreate" method'); }); - it('should call beforeCreate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should call beforeCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -724,7 +721,7 @@ } }, _callee, this); }))); - it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -770,7 +767,7 @@ } }, _callee2, this); }))); - it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -816,7 +813,7 @@ } }, _callee3, this); }))); - it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, props, user, args; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -869,9 +866,9 @@ function beforeUpdateTest (options) { describe('Adapter#beforeUpdate', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.beforeUpdate), 'function', 'adapter should have a "beforeUpdate" method'); + assert.equal(_typeof(this.$$adapter.beforeUpdate), 'function', 'adapter should have a "beforeUpdate" method'); }); - it('should call beforeUpdate', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should call beforeUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -929,7 +926,7 @@ } }, _callee, this); }))); - it('should allow re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -988,7 +985,7 @@ } }, _callee2, this); }))); - it('should allow returning a promise', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -1047,7 +1044,7 @@ } }, _callee3, this); }))); - it('should allow returning a promise and re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, props, user, userId, updatedUser, args; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -1113,9 +1110,9 @@ function countTest (options) { describe('Adapter#count', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.count), 'function', 'adapter should have a "count" method'); + assert.equal(_typeof(this.$$adapter.count), 'function', 'adapter should have a "count" method'); }); - it('should count users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should count users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, count, user, user2; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1241,7 +1238,7 @@ } }, _callee, this); }))); - it('should count users and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should count users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, result; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -1285,9 +1282,9 @@ function createTest (options) { describe('Adapter#create', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.create), 'function', 'adapter should have a "create" method'); + assert.equal(_typeof(this.$$adapter.create), 'function', 'adapter should have a "create" method'); }); - it('should create a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should create a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, userId, foundUser; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1338,9 +1335,9 @@ function createManyTest (options) { describe('Adapter#createMany', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.createMany), 'function', 'adapter should have a "createMany" method'); + assert.equal(_typeof(this.$$adapter.createMany), 'function', 'adapter should have a "createMany" method'); }); - it('should create multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should create multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, user1, user2, users, users3; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1396,9 +1393,9 @@ function destroyTest (options) { describe('Adapter#destroy', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.destroy), 'function', 'adapter should have a "destroy" method'); + assert.equal(_typeof(this.$$adapter.destroy), 'function', 'adapter should have a "destroy" method'); }); - it('should destroy a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should destroy a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1460,7 +1457,7 @@ } }, _callee, this); }))); - it('should destroy a user and allow afterDestroy re-assignment', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should destroy a user and allow afterDestroy re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -1522,7 +1519,7 @@ } }, _callee2, this); }))); - it('should destroy a user and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should destroy a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, props, user, userId, result; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -1564,7 +1561,7 @@ } }, _callee3, this); }))); - it('should destroy nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, result; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -1591,7 +1588,7 @@ } }, _callee4, this); }))); - it('should destroy nothing and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var adapter, User, result; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { @@ -1629,9 +1626,9 @@ function destroyAllTest (options) { describe('Adapter#destroyAll', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.destroyAll), 'function', 'adapter should have a "destroyAll" method'); + assert.equal(_typeof(this.$$adapter.destroyAll), 'function', 'adapter should have a "destroyAll" method'); }); - it('should destroy all users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should destroy all users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, userId, user2, foundUsers, destroyedUsers; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1710,7 +1707,7 @@ } }, _callee, this); }))); - it('should destroy users and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should destroy users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, result; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -1751,7 +1748,7 @@ } }, _callee2, this); }))); - it('should destroy nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User, result; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -1778,7 +1775,7 @@ } }, _callee3, this); }))); - it('should destroy nothing and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, User, result; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -1816,7 +1813,7 @@ function extendTest (options) { describe('Adapter.extend', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.constructor.extend), 'function', 'adapter constructor function should have an "extend" method'); + assert.equal(_typeof(this.$$adapter.constructor.extend), 'function', 'adapter constructor function should have an "extend" method'); }); it('should return a subclass of the adapter class using extend', function () { var Adapter = this.$$adapter.constructor; @@ -1835,7 +1832,7 @@ try { assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); } catch (err) { - assert.equal(babelHelpers.typeof(SubAdapter.extend), 'function', 'should have same static methods'); + assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); } var subAdapter = new SubAdapter(); @@ -1847,14 +1844,14 @@ var Adapter = this.$$adapter.constructor; var SubAdapter = function (_Adapter) { - babelHelpers.inherits(SubAdapter, _Adapter); + inherits(SubAdapter, _Adapter); function SubAdapter() { - babelHelpers.classCallCheck(this, SubAdapter); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SubAdapter).apply(this, arguments)); + classCallCheck(this, SubAdapter); + return possibleConstructorReturn(this, Object.getPrototypeOf(SubAdapter).apply(this, arguments)); } - babelHelpers.createClass(SubAdapter, [{ + createClass(SubAdapter, [{ key: 'foo', value: function foo() { return 'foo'; @@ -1873,7 +1870,7 @@ assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); } catch (err) { try { - assert.equal(babelHelpers.typeof(SubAdapter.extend), 'function', 'should have same static methods'); + assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); } catch (err) { var obj = {}; if (obj.setPrototypeOf) { @@ -1905,10 +1902,10 @@ }); it('should exist', function () { - assert.equal(babelHelpers.typeof(adapter.find), 'function', 'adapter should have a "find" method'); + assert.equal(_typeof(adapter.find), 'function', 'adapter should have a "find" method'); }); - it('should find a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should find a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var props, user, userId, beforeFindCalled, afterFindCalled, foundUser, post, postId, comments, foundPost; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -1979,7 +1976,7 @@ assert.isObject(opts, 'afterFind should have received opts argument'); assert.isObject(record, 'afterFind should have received record argument'); // Test re-assignment - return Promise.resolve(babelHelpers.defineProperty({ name: 'Sally' }, User.idAttribute, userId)); + return Promise.resolve(defineProperty({ name: 'Sally' }, User.idAttribute, userId)); }; assert.debug('find', User.name, userId); @@ -2058,7 +2055,7 @@ }, _callee, this); }))); - it('should return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var props, user, userId, result; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -2101,7 +2098,7 @@ }, _callee2, this); }))); - it('should return nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should return nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var result; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -2125,7 +2122,7 @@ }, _callee3, this); }))); - it('should return raw and nothing', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should return raw and nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var result; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -2151,7 +2148,7 @@ }, _callee4, this); }))); - it('should load belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var props, user, profile, post, comment; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { @@ -2222,7 +2219,7 @@ }, _callee5, this); }))); - it('should load belongsTo relations and filter sub queries', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { var props, user, user2, post, post2, post3, post4; return regeneratorRuntime.wrap(function _callee6$(_context6) { while (1) { @@ -2350,7 +2347,7 @@ }))); if (options.hasFeature('findBelongsToNested')) { - it('should load belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { var props, user, profile, post, comment; return regeneratorRuntime.wrap(function _callee7$(_context7) { while (1) { @@ -2424,7 +2421,7 @@ }))); } - it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { var props, user, profile, post, postId, comment; return regeneratorRuntime.wrap(function _callee8$(_context8) { while (1) { @@ -2496,7 +2493,7 @@ }))); if (options.hasFeature('findBelongsToHasManyNested')) { - it('should load hasMany and belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + it('should load hasMany and belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { var props, user, profile, post, postId, comment; return regeneratorRuntime.wrap(function _callee9$(_context9) { while (1) { @@ -2571,7 +2568,7 @@ } if (options.hasFeature('findHasManyLocalKeys')) { - it('should load hasMany localKeys (array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + it('should load hasMany localKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { var props, tag, tag2, post, postId; return regeneratorRuntime.wrap(function _callee10$(_context10) { while (1) { @@ -2632,7 +2629,7 @@ } }, _callee10, this); }))); - it('should load hasMany localKeys (empty array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + it('should load hasMany localKeys (empty array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { var props, post, postId; return regeneratorRuntime.wrap(function _callee11$(_context11) { while (1) { @@ -2671,7 +2668,7 @@ } }, _callee11, this); }))); - it('should load hasMany localKeys (object) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + it('should load hasMany localKeys (object) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { var _tagIds; var props, tag, tag2, post, postId; @@ -2702,7 +2699,7 @@ assert.debug('created', Tag.name, tag2); - props = { content: 'test', tagIds: (_tagIds = {}, babelHelpers.defineProperty(_tagIds, tag[Tag.idAttribute], true), babelHelpers.defineProperty(_tagIds, tag2[Tag.idAttribute], true), _tagIds) }; + props = { content: 'test', tagIds: (_tagIds = {}, defineProperty(_tagIds, tag[Tag.idAttribute], true), defineProperty(_tagIds, tag2[Tag.idAttribute], true), _tagIds) }; assert.debug('create', Post.name, props); _context12.next = 18; return adapter.create(Post, props); @@ -2737,7 +2734,7 @@ } if (options.hasFeature('findHasManyForeignKeys')) { - it('should load hasMany foreignKeys (array) relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + it('should load hasMany foreignKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { var props, tag, tagId, tag2, tag2Id, post, post2; return regeneratorRuntime.wrap(function _callee13$(_context13) { while (1) { @@ -2840,10 +2837,10 @@ }); it('should exist', function () { - assert.equal(babelHelpers.typeof(adapter.findAll), 'function', 'adapter should have a "findAll" method'); + assert.equal(_typeof(adapter.findAll), 'function', 'adapter should have a "findAll" method'); }); - it('should filter users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should filter users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var props, users, user, userId, users2; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -2894,7 +2891,7 @@ }))); if (options.hasFeature('findAllInOp')) { - it('should filter users using the "in" operator', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should filter users using the "in" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var users, user, id, users2; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -2940,7 +2937,7 @@ } if (options.hasFeature('findAllLikeOp')) { - it('should filter users using the "like" operator', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should filter users using the "like" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var users, user, id, users2; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -3008,7 +3005,7 @@ } if (options.hasFeature('findAllBelongsTo')) { - it('should load belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var props, user, profile, post, comment, user2, post2, comment2, comments; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -3110,7 +3107,7 @@ }, _callee4, this); }))); - it('should load belongsTo relations and filter sub queries', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var props, user, user2, post, post2, post3, post4, users; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { @@ -3179,9 +3176,9 @@ assert.debug('created', Post.name, post4); - assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context5.next = 41; - return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); case 41: users = _context5.sent; @@ -3192,9 +3189,9 @@ assert.isDefined(users[0].posts, 'users[0].posts'); assert.equal(users[0].posts.length, 2, 'users[0].posts.length'); - assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context5.next = 49; - return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', query: { status: 'published' @@ -3210,9 +3207,9 @@ assert.isDefined(users[0].posts, 'users[0].posts'); assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); - assert.debug('findAll', User.name, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute])); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context5.next = 57; - return adapter.findAll(User, babelHelpers.defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', replace: true, query: { @@ -3239,7 +3236,7 @@ } if (options.hasFeature('findAllBelongsToNested')) { - it('should load belongsTo relations (nested)', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { var props, user, profile, post, comment, user2, post2, comment2, comments; return regeneratorRuntime.wrap(function _callee6$(_context6) { while (1) { @@ -3346,7 +3343,7 @@ } if (options.hasFeature('findAllBelongsToHasMany')) { - it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { var props, user, profile, post, comment, user2, post2, comment2, posts; return regeneratorRuntime.wrap(function _callee7$(_context7) { while (1) { @@ -3450,7 +3447,7 @@ } if (options.hasFeature('findAllBelongsToHasManyNested')) { - it('should load hasMany and belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { var props, user, profile, post, comment, user2, post2, comment2, posts; return regeneratorRuntime.wrap(function _callee8$(_context8) { while (1) { @@ -3557,7 +3554,7 @@ } if (options.hasFeature('filterOnRelations')) { - it('should filter using belongsTo relation', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + it('should filter using belongsTo relation', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { var profile1, user1, post1, user2, post2, users; return regeneratorRuntime.wrap(function _callee9$(_context9) { while (1) { @@ -3617,7 +3614,7 @@ }, _callee9, this); }))); - it('should filter through multiple hasOne/belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + it('should filter through multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { var profile1, user1, post1, profile2, user2, post2, comments; return regeneratorRuntime.wrap(function _callee10$(_context10) { while (1) { @@ -3682,7 +3679,7 @@ }, _callee10, this); }))); - it('should filter using multiple hasOne/belongsTo relations', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + it('should filter using multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { var profile1, user1, post1, profile2, user2, post2, comments; return regeneratorRuntime.wrap(function _callee11$(_context11) { while (1) { @@ -3748,7 +3745,7 @@ }))); } - it('should allow passing limit and offset as strings', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + it('should allow passing limit and offset as strings', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { return regeneratorRuntime.wrap(function _callee12$(_context12) { while (1) { switch (_context12.prev = _context12.next) { @@ -3765,7 +3762,7 @@ }))); if (options.hasFeature('findAllGroupedWhere')) { - it('should support filtering grouped "where" clauses', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + it('should support filtering grouped "where" clauses', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { var posts, query; return regeneratorRuntime.wrap(function _callee13$(_context13) { while (1) { @@ -3824,9 +3821,9 @@ function sumTest (options) { describe('Adapter#sum', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.sum), 'function', 'adapter should have a "sum" method'); + assert.equal(_typeof(this.$$adapter.sum), 'function', 'adapter should have a "sum" method'); }); - it('should sum users\' age', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should sum users\' age', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, sum, user, user2; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -3952,7 +3949,7 @@ } }, _callee, this); }))); - it('should sum users\' age and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should sum users\' age and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, result; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -3996,9 +3993,9 @@ function updateTest (options) { describe('Adapter#update', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.update), 'function', 'adapter should have a "update" method'); + assert.equal(_typeof(this.$$adapter.update), 'function', 'adapter should have a "update" method'); }); - it('should update a user', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should update a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user, foundUser, updatedUser; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -4063,7 +4060,7 @@ } }, _callee, this); }))); - it('should update a user and return raw', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should update a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { var adapter, User, props, user, result; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -4107,7 +4104,7 @@ } }, _callee2, this); }))); - it('should throw when updating non-existent row', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should throw when updating non-existent row', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var adapter, User; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { @@ -4140,7 +4137,7 @@ } }, _callee3, this, [[3, 9]]); }))); - it('should keep relations specified by "with"', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should keep relations specified by "with"', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var adapter, store, result; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { @@ -4206,9 +4203,9 @@ function updateAllTest (options) { describe('Adapter#updateAll', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.updateAll), 'function', 'adapter should have a "updateAll" method'); + assert.equal(_typeof(this.$$adapter.updateAll), 'function', 'adapter should have a "updateAll" method'); }); - it('should update multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, props, user1, userId1, user2, userId2, users, users2, users3, users4; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -4347,9 +4344,9 @@ function updateManyTest (options) { describe('Adapter#updateMany', function () { it('should exist', function () { - assert.equal(babelHelpers.typeof(this.$$adapter.updateMany), 'function', 'adapter should have a "updateMany" method'); + assert.equal(_typeof(this.$$adapter.updateMany), 'function', 'adapter should have a "updateMany" method'); }); - it('should update multiple users', babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { var adapter, User, user1, userId1, user2, userId2, users, users2, users3, users4; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -4500,7 +4497,7 @@ return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1; }; if (!options.Adapter || typeof options.Adapter !== 'function') { - throw new Error(prefix + '.Adapter: Expected function, Actual: ' + babelHelpers.typeof(options.Adapter)); + throw new Error(prefix + '.Adapter: Expected function, Actual: ' + _typeof(options.Adapter)); } beforeEach(function () { this.$$adapter = new options.Adapter(options.adapterConfig); @@ -4669,7 +4666,7 @@ } }); - afterEach(babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() { + afterEach(asyncToGenerator(regeneratorRuntime.mark(function _callee() { var Test, toClear, promise; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index 3873ad8..7093171 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,qBAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,wDAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB,IAXsB,EAmBtB,IAnBsB;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBAH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AjOlB;AAmOb,EAAA,wCAAsC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CAnOzB;AAqOb,EAAA,0CAAwC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;AAuOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,SAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,2CAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB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hC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAjOlB;AAmOb,EAAA,wCAAsC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CAnOzB;AAqOb,EAAA,0CAAwC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;AAuOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index f8598d4..83b558a 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -4,14 +4,13 @@ (factory((global.Adapter = global.Adapter || {}),global.JSData)); }(this, function (exports,jsData) { 'use strict'; - var babelHelpers = {}; - babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - babelHelpers.defineProperty = function (obj, key, value) { + var defineProperty = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, @@ -26,7 +25,7 @@ return obj; }; - babelHelpers.slicedToArray = function () { + var slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; @@ -64,29 +63,23 @@ }; }(); - babelHelpers; - var noop = function noop() { - var self = this; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var opts = args[args.length - 1]; - self.dbg.apply(self, [opts.op].concat(args)); + this.dbg.apply(this, [opts.op].concat(args)); return jsData.utils.resolve(); }; var noop2 = function noop2() { - var self = this; - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var opts = args[args.length - 2]; - self.dbg.apply(self, [opts.op].concat(args)); + this.dbg.apply(this, [opts.op].concat(args)); return jsData.utils.resolve(); }; @@ -113,6 +106,36 @@ return jsData.utils.omit(props, toStrip); }; + var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; + + /** + * Response object used when `raw` is `true`. May contain other fields in + * addition to `data`. + * + * @class Response + */ + function Response(data, meta, op) { + meta || (meta = {}); + + /** + * Response data. + * + * @name Response#data + * @type {*} + */ + this.data = data; + + jsData.utils.fillIn(this, meta); + + /** + * The operation for which the response was created. + * + * @name Response#op + * @type {string} + */ + this.op = op; + } + var DEFAULTS = { /** * Whether to log debugging information. @@ -138,63 +161,23 @@ * * @class Adapter * @abstract + * @extends Component * @param {Object} [opts] Configuration opts. * @param {boolean} [opts.debug=false] Whether to log debugging information. * @param {boolean} [opts.raw=false] Whether to return a more detailed response * object. */ function Adapter(opts) { - var self = this; + jsData.utils.classCallCheck(this, Adapter); + jsData.Component.call(this); opts || (opts = {}); jsData.utils.fillIn(opts, DEFAULTS); - jsData.utils.fillIn(self, opts); + jsData.utils.fillIn(this, opts); } - var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; - - /** - * Response object used when `raw` is `true`. May contain other fields in - * addition to `data`. - * - * @class Response - */ - function Response(data, meta, op) { - var self = this; - meta || (meta = {}); - - /** - * Response data. - * - * @name Response#data - * @type {*} - */ - self.data = data; - - jsData.utils.fillIn(self, meta); + jsData.Component.extend({ + constructor: Adapter, - /** - * The operation for which the response was created. - * - * @name Response#op - * @type {string} - */ - self.op = op; - } - - /** - * Alternative to ES6 class syntax for extending `Adapter`. - * - * @name Adapter.extend - * @method - * @param {Object} [instanceProps] Properties that will be added to the - * prototype of the subclass. - * @param {Object} [classProps] Properties that will be added as static - * properties to the subclass itself. - * @return {Object} Subclass of `Adapter`. - */ - Adapter.extend = jsData.utils.extend; - - jsData.utils.addHiddenPropsToTarget(Adapter.prototype, { /** * Lifecycle method method called by count. * @@ -661,21 +644,6 @@ */ beforeUpdateMany: noop, - /** - * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`. - * - * @name Adapter#dbg - * @method - */ - dbg: function dbg() { - for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - this.log.apply(this, ['debug'].concat(args)); - }, - - /** * Retrieve the number of records that match the selection query. Called by * `Mapper#count`. @@ -696,33 +664,33 @@ * @return {Promise} */ count: function count(mapper, query, opts) { - var self = this; + var _this = this; + var op = void 0; query || (query = {}); opts || (opts = {}); // beforeCount lifecycle hook op = opts.op = 'beforeCount'; - return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { // Allow for re-assignment from lifecycle hook op = opts.op = 'count'; - self.dbg(op, mapper, query, opts); - return jsData.utils.resolve(self._count(mapper, query, opts)); + _this.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this._count(mapper, query, opts)); }).then(function (results) { - var _results = babelHelpers.slicedToArray(results, 2); + var _results = slicedToArray(results, 2); var data = _results[0]; var result = _results[1]; result || (result = {}); var response = new Response(data, result, op); - response = self.respond(response, opts); + response = _this.respond(response, opts); // afterCount lifecycle hook op = opts.op = 'afterCount'; - return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -741,22 +709,23 @@ * @return {Promise} */ create: function create(mapper, props, opts) { - var self = this; + var _this2 = this; + var op = void 0; props || (props = {}); opts || (opts = {}); // beforeCreate lifecycle hook op = opts.op = 'beforeCreate'; - return jsData.utils.resolve(self[op](mapper, props, opts)).then(function (_props) { + return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook - props = jsData.utils.isUndefined(_props) ? props : _props; + props = _props === undefined ? props : _props; props = withoutRelations(mapper, props, opts); op = opts.op = 'create'; - self.dbg(op, mapper, props, opts); - return jsData.utils.resolve(self._create(mapper, props, opts)); + _this2.dbg(op, mapper, props, opts); + return jsData.utils.resolve(_this2._create(mapper, props, opts)); }).then(function (results) { - var _results2 = babelHelpers.slicedToArray(results, 2); + var _results2 = slicedToArray(results, 2); var data = _results2[0]; var result = _results2[1]; @@ -764,13 +733,12 @@ result || (result = {}); var response = new Response(data, result, 'create'); response.created = data ? 1 : 0; - response = self.respond(response, opts); + response = _this2.respond(response, opts); // afterCreate lifecycle hook op = opts.op = 'afterCreate'; - return jsData.utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this2[op](mapper, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -789,24 +757,25 @@ * @return {Promise} */ createMany: function createMany(mapper, props, opts) { - var self = this; + var _this3 = this; + var op = void 0; props || (props = {}); opts || (opts = {}); // beforeCreateMany lifecycle hook op = opts.op = 'beforeCreateMany'; - return jsData.utils.resolve(self[op](mapper, props, opts)).then(function (_props) { + return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook - props = jsData.utils.isUndefined(_props) ? props : _props; + props = _props === undefined ? props : _props; props = props.map(function (record) { return withoutRelations(mapper, record, opts); }); op = opts.op = 'createMany'; - self.dbg(op, mapper, props, opts); - return jsData.utils.resolve(self._createMany(mapper, props, opts)); + _this3.dbg(op, mapper, props, opts); + return jsData.utils.resolve(_this3._createMany(mapper, props, opts)); }).then(function (results) { - var _results3 = babelHelpers.slicedToArray(results, 2); + var _results3 = slicedToArray(results, 2); var data = _results3[0]; var result = _results3[1]; @@ -815,13 +784,12 @@ result || (result = {}); var response = new Response(data, result, 'createMany'); response.created = data.length; - response = self.respond(response, opts); + response = _this3.respond(response, opts); // afterCreateMany lifecycle hook op = opts.op = 'afterCreateMany'; - return jsData.utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this3[op](mapper, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -841,31 +809,31 @@ * @return {Promise} */ destroy: function destroy(mapper, id, opts) { - var self = this; + var _this4 = this; + var op = void 0; opts || (opts = {}); // beforeDestroy lifecycle hook op = opts.op = 'beforeDestroy'; - return jsData.utils.resolve(self[op](mapper, id, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { op = opts.op = 'destroy'; - self.dbg(op, mapper, id, opts); - return jsData.utils.resolve(self._destroy(mapper, id, opts)); + _this4.dbg(op, mapper, id, opts); + return jsData.utils.resolve(_this4._destroy(mapper, id, opts)); }).then(function (results) { - var _results4 = babelHelpers.slicedToArray(results, 2); + var _results4 = slicedToArray(results, 2); var data = _results4[0]; var result = _results4[1]; result || (result = {}); var response = new Response(data, result, 'destroy'); - response = self.respond(response, opts); + response = _this4.respond(response, opts); // afterDestroy lifecycle hook op = opts.op = 'afterDestroy'; - return jsData.utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this4[op](mapper, id, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -891,32 +859,32 @@ * @return {Promise} */ destroyAll: function destroyAll(mapper, query, opts) { - var self = this; + var _this5 = this; + var op = void 0; query || (query = {}); opts || (opts = {}); // beforeDestroyAll lifecycle hook op = opts.op = 'beforeDestroyAll'; - return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { op = opts.op = 'destroyAll'; - self.dbg(op, mapper, query, opts); - return jsData.utils.resolve(self._destroyAll(mapper, query, opts)); + _this5.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this5._destroyAll(mapper, query, opts)); }).then(function (results) { - var _results5 = babelHelpers.slicedToArray(results, 2); + var _results5 = slicedToArray(results, 2); var data = _results5[0]; var result = _results5[1]; result || (result = {}); var response = new Response(data, result, 'destroyAll'); - response = self.respond(response, opts); + response = _this5.respond(response, opts); // afterDestroyAll lifecycle hook op = opts.op = 'afterDestroyAll'; - return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this5[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -932,28 +900,29 @@ * @return {Promise} */ loadBelongsTo: function loadBelongsTo(mapper, def, records, __opts) { - var self = this; + var _this6 = this; + var relationDef = def.getRelation(); if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { var _ret = function () { var record = records; return { - v: self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { + v: _this6.find(relationDef, _this6.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { def.setLocalField(record, relatedItem); }) }; }(); - if ((typeof _ret === 'undefined' ? 'undefined' : babelHelpers.typeof(_ret)) === "object") return _ret.v; + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; } else { var keys = records.map(function (record) { - return self.makeBelongsToForeignKey(mapper, def, record); + return _this6.makeBelongsToForeignKey(mapper, def, record); }).filter(function (key) { return key; }); - return self.findAll(relationDef, { - where: babelHelpers.defineProperty({}, relationDef.idAttribute, { + return this.findAll(relationDef, { + where: defineProperty({}, relationDef.idAttribute, { 'in': keys }) }, __opts).then(function (relatedItems) { @@ -983,7 +952,8 @@ * @return {Promise} */ find: function find(mapper, id, opts) { - var self = this; + var _this7 = this; + var record = void 0, op = void 0; opts || (opts = {}); @@ -991,12 +961,12 @@ // beforeFind lifecycle hook op = opts.op = 'beforeFind'; - return jsData.utils.resolve(self[op](mapper, id, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { op = opts.op = 'find'; - self.dbg(op, mapper, id, opts); - return jsData.utils.resolve(self._find(mapper, id, opts)); + _this7.dbg(op, mapper, id, opts); + return jsData.utils.resolve(_this7._find(mapper, id, opts)); }).then(function (results) { - var _results6 = babelHelpers.slicedToArray(results, 1); + var _results6 = slicedToArray(results, 1); var _record = _results6[0]; @@ -1010,33 +980,32 @@ var task = void 0; if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { if (def.type === 'hasOne') { - task = self.loadHasOne(mapper, def, record, __opts); + task = _this7.loadHasOne(mapper, def, record, __opts); } else { - task = self.loadHasMany(mapper, def, record, __opts); + task = _this7.loadHasMany(mapper, def, record, __opts); } } else if (def.type === 'hasMany' && def.localKeys) { - task = self.loadHasManyLocalKeys(mapper, def, record, __opts); + task = _this7.loadHasManyLocalKeys(mapper, def, record, __opts); } else if (def.type === 'hasMany' && def.foreignKeys) { - task = self.loadHasManyForeignKeys(mapper, def, record, __opts); + task = _this7.loadHasManyForeignKeys(mapper, def, record, __opts); } else if (def.type === 'belongsTo') { - task = self.loadBelongsTo(mapper, def, record, __opts); + task = _this7.loadBelongsTo(mapper, def, record, __opts); } if (task) { tasks.push(task); } }); - return Promise.all(tasks); + return jsData.utils.Promise.all(tasks); }).then(function () { var response = new Response(record, {}, 'find'); response.found = record ? 1 : 0; - response = self.respond(response, opts); + response = _this7.respond(response, opts); // afterFind lifecycle hook op = opts.op = 'afterFind'; - return jsData.utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this7[op](mapper, id, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -1062,7 +1031,8 @@ * @return {Promise} */ findAll: function findAll(mapper, query, opts) { - var self = this; + var _this8 = this; + opts || (opts = {}); opts.with || (opts.with = []); @@ -1081,12 +1051,12 @@ // beforeFindAll lifecycle hook op = opts.op = 'beforeFindAll'; - return jsData.utils.resolve(self[op](mapper, query, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { op = opts.op = 'findAll'; - self.dbg(op, mapper, query, opts); - return jsData.utils.resolve(self._findAll(mapper, query, opts)); + _this8.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this8._findAll(mapper, query, opts)); }).then(function (results) { - var _results7 = babelHelpers.slicedToArray(results, 1); + var _results7 = slicedToArray(results, 1); var _records = _results7[0]; @@ -1097,32 +1067,31 @@ var task = void 0; if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { if (def.type === 'hasMany') { - task = self.loadHasMany(mapper, def, records, __opts); + task = _this8.loadHasMany(mapper, def, records, __opts); } else { - task = self.loadHasOne(mapper, def, records, __opts); + task = _this8.loadHasOne(mapper, def, records, __opts); } } else if (def.type === 'hasMany' && def.localKeys) { - task = self.loadHasManyLocalKeys(mapper, def, records, __opts); + task = _this8.loadHasManyLocalKeys(mapper, def, records, __opts); } else if (def.type === 'hasMany' && def.foreignKeys) { - task = self.loadHasManyForeignKeys(mapper, def, records, __opts); + task = _this8.loadHasManyForeignKeys(mapper, def, records, __opts); } else if (def.type === 'belongsTo') { - task = self.loadBelongsTo(mapper, def, records, __opts); + task = _this8.loadBelongsTo(mapper, def, records, __opts); } if (task) { tasks.push(task); } }); - return Promise.all(tasks); + return jsData.utils.Promise.all(tasks); }).then(function () { var response = new Response(records, {}, 'findAll'); response.found = records.length; - response = self.respond(response, opts); + response = _this8.respond(response, opts); // afterFindAll lifecycle hook op = opts.op = 'afterFindAll'; - return jsData.utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this8[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -1140,7 +1109,7 @@ */ getOpt: function getOpt(opt, opts) { opts || (opts = {}); - return jsData.utils.isUndefined(opts[opt]) ? jsData.utils.plainCopy(this[opt]) : jsData.utils.plainCopy(opts[opt]); + return opts[opt] === undefined ? jsData.utils.plainCopy(this[opt]) : jsData.utils.plainCopy(opts[opt]); }, @@ -1154,7 +1123,8 @@ * @return {Promise} */ loadHasMany: function loadHasMany(mapper, def, records, __opts) { - var self = this; + var _this9 = this; + var singular = false; if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { @@ -1162,7 +1132,7 @@ records = [records]; } var IDs = records.map(function (record) { - return self.makeHasManyForeignKey(mapper, def, record); + return _this9.makeHasManyForeignKey(mapper, def, record); }); var query = { where: {} @@ -1176,7 +1146,7 @@ return id; }); } - return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) { + return this.findAll(def.getRelation(), query, __opts).then(function (relatedItems) { records.forEach(function (record) { var attached = []; // avoid unneccesary iteration when we only have one record @@ -1194,7 +1164,8 @@ }); }, loadHasManyLocalKeys: function loadHasManyLocalKeys(mapper, def, records, __opts) { - var self = this; + var _this10 = this; + var record = void 0; var relatedMapper = def.getRelation(); @@ -1203,9 +1174,9 @@ } if (record) { - return self.findAll(relatedMapper, { - where: babelHelpers.defineProperty({}, relatedMapper.idAttribute, { - 'in': self.makeHasManyLocalKeys(mapper, def, record) + return this.findAll(relatedMapper, { + where: defineProperty({}, relatedMapper.idAttribute, { + 'in': this.makeHasManyLocalKeys(mapper, def, record) }) }, __opts).then(function (relatedItems) { def.setLocalField(record, relatedItems); @@ -1214,11 +1185,11 @@ var _ret2 = function () { var localKeys = []; records.forEach(function (record) { - localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record)); + localKeys = localKeys.concat(_this10.makeHasManyLocalKeys(mapper, def, record)); }); return { - v: self.findAll(relatedMapper, { - where: babelHelpers.defineProperty({}, relatedMapper.idAttribute, { + v: _this10.findAll(relatedMapper, { + where: defineProperty({}, relatedMapper.idAttribute, { 'in': unique(localKeys).filter(function (x) { return x; }) @@ -1240,11 +1211,12 @@ }; }(); - if ((typeof _ret2 === 'undefined' ? 'undefined' : babelHelpers.typeof(_ret2)) === "object") return _ret2.v; + if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; } }, loadHasManyForeignKeys: function loadHasManyForeignKeys(mapper, def, records, __opts) { - var self = this; + var _this11 = this; + var relatedMapper = def.getRelation(); var idAttribute = mapper.idAttribute; var record = void 0; @@ -1254,18 +1226,18 @@ } if (record) { - return self.findAll(def.getRelation(), { - where: babelHelpers.defineProperty({}, def.foreignKeys, { - 'contains': self.makeHasManyForeignKeys(mapper, def, record) + return this.findAll(def.getRelation(), { + where: defineProperty({}, def.foreignKeys, { + 'contains': this.makeHasManyForeignKeys(mapper, def, record) }) }, __opts).then(function (relatedItems) { def.setLocalField(record, relatedItems); }); } else { - return self.findAll(relatedMapper, { - where: babelHelpers.defineProperty({}, def.foreignKeys, { + return this.findAll(relatedMapper, { + where: defineProperty({}, def.foreignKeys, { 'isectNotEmpty': records.map(function (record) { - return self.makeHasManyForeignKeys(mapper, def, record); + return _this11.makeHasManyForeignKeys(mapper, def, record); }) }) }, __opts).then(function (relatedItems) { @@ -1310,40 +1282,6 @@ }, - /** - * Logging utility method. Override this method if you want to send log - * messages to something other than the console. - * - * @name Adapter#log - * @method - * @param {string} level Log level. - * @param {...*} values Values to log. - */ - log: function log(level) { - for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { - args[_key4 - 1] = arguments[_key4]; - } - - if (level && !args.length) { - args.push(level); - level = 'debug'; - } - if (level === 'debug' && !this.debug) { - return; - } - var prefix = level.toUpperCase() + ': (Adapter)'; - if (console[level]) { - var _console; - - (_console = console)[level].apply(_console, [prefix].concat(args)); - } else { - var _console2; - - (_console2 = console).log.apply(_console2, [prefix].concat(args)); - } - }, - - /** * Return the foreignKey from the given record for the provided relationship. * @@ -1430,7 +1368,8 @@ * @return {Promise} */ sum: function sum(mapper, field, query, opts) { - var self = this; + var _this12 = this; + var op = void 0; if (!jsData.utils.isString(field)) { throw new Error('field must be a string!'); @@ -1440,26 +1379,25 @@ // beforeSum lifecycle hook op = opts.op = 'beforeSum'; - return jsData.utils.resolve(self[op](mapper, field, query, opts)).then(function () { + return jsData.utils.resolve(this[op](mapper, field, query, opts)).then(function () { // Allow for re-assignment from lifecycle hook op = opts.op = 'sum'; - self.dbg(op, mapper, field, query, opts); - return jsData.utils.resolve(self._sum(mapper, field, query, opts)); + _this12.dbg(op, mapper, field, query, opts); + return jsData.utils.resolve(_this12._sum(mapper, field, query, opts)); }).then(function (results) { - var _results8 = babelHelpers.slicedToArray(results, 2); + var _results8 = slicedToArray(results, 2); var data = _results8[0]; var result = _results8[1]; result || (result = {}); var response = new Response(data, result, op); - response = self.respond(response, opts); + response = _this12.respond(response, opts); // afterSum lifecycle hook op = opts.op = 'afterSum'; - return jsData.utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this12[op](mapper, field, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -1493,22 +1431,23 @@ * @return {Promise} */ update: function update(mapper, id, props, opts) { - var self = this; + var _this13 = this; + props || (props = {}); opts || (opts = {}); var op = void 0; // beforeUpdate lifecycle hook op = opts.op = 'beforeUpdate'; - return jsData.utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) { + return jsData.utils.resolve(this[op](mapper, id, props, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook - props = jsData.utils.isUndefined(_props) ? props : _props; + props = _props === undefined ? props : _props; props = withoutRelations(mapper, props, opts); op = opts.op = 'update'; - self.dbg(op, mapper, id, props, opts); - return jsData.utils.resolve(self._update(mapper, id, props, opts)); + _this13.dbg(op, mapper, id, props, opts); + return jsData.utils.resolve(_this13._update(mapper, id, props, opts)); }).then(function (results) { - var _results9 = babelHelpers.slicedToArray(results, 2); + var _results9 = slicedToArray(results, 2); var data = _results9[0]; var result = _results9[1]; @@ -1516,13 +1455,12 @@ result || (result = {}); var response = new Response(data, result, 'update'); response.updated = data ? 1 : 0; - response = self.respond(response, opts); + response = _this13.respond(response, opts); // afterUpdate lifecycle hook op = opts.op = 'afterUpdate'; - return jsData.utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this13[op](mapper, id, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -1549,7 +1487,8 @@ * @return {Promise} */ updateAll: function updateAll(mapper, props, query, opts) { - var self = this; + var _this14 = this; + props || (props = {}); query || (query = {}); opts || (opts = {}); @@ -1557,15 +1496,15 @@ // beforeUpdateAll lifecycle hook op = opts.op = 'beforeUpdateAll'; - return jsData.utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) { + return jsData.utils.resolve(this[op](mapper, props, query, opts)).then(function (_props) { // Allow for re-assignment from lifecycle hook - props = jsData.utils.isUndefined(_props) ? props : _props; + props = _props === undefined ? props : _props; props = withoutRelations(mapper, props, opts); op = opts.op = 'updateAll'; - self.dbg(op, mapper, props, query, opts); - return jsData.utils.resolve(self._updateAll(mapper, props, query, opts)); + _this14.dbg(op, mapper, props, query, opts); + return jsData.utils.resolve(_this14._updateAll(mapper, props, query, opts)); }).then(function (results) { - var _results10 = babelHelpers.slicedToArray(results, 2); + var _results10 = slicedToArray(results, 2); var data = _results10[0]; var result = _results10[1]; @@ -1574,13 +1513,12 @@ result || (result = {}); var response = new Response(data, result, 'updateAll'); response.updated = data.length; - response = self.respond(response, opts); + response = _this14.respond(response, opts); // afterUpdateAll lifecycle hook op = opts.op = 'afterUpdateAll'; - return jsData.utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this14[op](mapper, props, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); }, @@ -1599,7 +1537,8 @@ * @return {Promise} */ updateMany: function updateMany(mapper, records, opts) { - var self = this; + var _this15 = this; + records || (records = []); opts || (opts = {}); var op = void 0; @@ -1611,17 +1550,17 @@ // beforeUpdateMany lifecycle hook op = opts.op = 'beforeUpdateMany'; - return jsData.utils.resolve(self[op](mapper, records, opts)).then(function (_records) { + return jsData.utils.resolve(this[op](mapper, records, opts)).then(function (_records) { // Allow for re-assignment from lifecycle hook - records = jsData.utils.isUndefined(_records) ? records : _records; + records = _records === undefined ? records : _records; records = records.map(function (record) { return withoutRelations(mapper, record, opts); }); op = opts.op = 'updateMany'; - self.dbg(op, mapper, records, opts); - return jsData.utils.resolve(self._updateMany(mapper, records, opts)); + _this15.dbg(op, mapper, records, opts); + return jsData.utils.resolve(_this15._updateMany(mapper, records, opts)); }).then(function (results) { - var _results11 = babelHelpers.slicedToArray(results, 2); + var _results11 = slicedToArray(results, 2); var data = _results11[0]; var result = _results11[1]; @@ -1630,13 +1569,12 @@ result || (result = {}); var response = new Response(data, result, 'updateMany'); response.updated = data.length; - response = self.respond(response, opts); + response = _this15.respond(response, opts); // afterUpdateMany lifecycle hook op = opts.op = 'afterUpdateMany'; - return jsData.utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) { - // Allow for re-assignment from lifecycle hook - return jsData.utils.isUndefined(_response) ? response : _response; + return jsData.utils.resolve(_this15[op](mapper, records, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); }); } @@ -1646,9 +1584,11 @@ exports.noop2 = noop2; exports.unique = unique; exports.withoutRelations = withoutRelations; - exports.Adapter = Adapter; exports.reserved = reserved; exports.Response = Response; + exports.Adapter = Adapter; + + Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=js-data-adapter.js.map \ No newline at end of file diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index 8c56be7..cd1b84c 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["\nimport {utils} from 'js-data'\n\nexport const noop = function (...args) {\n const self = this\n const opts = args[args.length - 1]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const self = this\n const opts = args[args.length - 2]\n self.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter(function (value) {\n return opts.with.indexOf(value) === -1\n })\n return utils.omit(props, toStrip)\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n const self = this\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(self, opts)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n const self = this\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n self.data = data\n\n utils.fillIn(self, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n self.op = op\n}\n\n/**\n * Alternative to ES6 class syntax for extending `Adapter`.\n *\n * @name Adapter.extend\n * @method\n * @param {Object} [instanceProps] Properties that will be added to the\n * prototype of the subclass.\n * @param {Object} [classProps] Properties that will be added as static\n * properties to the subclass itself.\n * @return {Object} Subclass of `Adapter`.\n */\nAdapter.extend = utils.extend\n\nutils.addHiddenPropsToTarget(Adapter.prototype, {\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Shortcut for `#log('debug'[, arg1[, arg2[, argn]]])`.\n *\n * @name Adapter#dbg\n * @method\n */\n dbg (...args) {\n this.log('debug', ...args)\n },\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._count(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._create(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n const self = this\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(self[op](mapper, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = props.map(function (record) {\n return withoutRelations(mapper, record, opts)\n })\n op = opts.op = 'createMany'\n self.dbg(op, mapper, props, opts)\n return utils.resolve(self._createMany(mapper, props, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = self.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(self[op](mapper, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n const self = this\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'destroy'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._destroy(mapper, id, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = self.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n const self = this\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'destroyAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._destroyAll(mapper, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = self.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const self = this\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return self.find(relationDef, self.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records.map(function (record) {\n return self.makeBelongsToForeignKey(mapper, def, record)\n }).filter(function (key) {\n return key\n })\n return self.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n relatedItems.forEach(function (relatedItem) {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n const self = this\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(self[op](mapper, id, opts)).then(function () {\n op = opts.op = 'find'\n self.dbg(op, mapper, id, opts)\n return utils.resolve(self._find(mapper, id, opts))\n }).then(function (results) {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = self.loadHasOne(mapper, def, record, __opts)\n } else {\n task = self.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = self.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(self[op](mapper, id, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n const self = this\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(self[op](mapper, query, opts)).then(function () {\n op = opts.op = 'findAll'\n self.dbg(op, mapper, query, opts)\n return utils.resolve(self._findAll(mapper, query, opts))\n }).then(function (results) {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, function (def, __opts) {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = self.loadHasMany(mapper, def, records, __opts)\n } else {\n task = self.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = self.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = self.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = self.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return Promise.all(tasks)\n }).then(function () {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = self.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(self[op](mapper, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return utils.isUndefined(opts[opt]) ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n const self = this\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map(function (record) {\n return self.makeHasManyForeignKey(mapper, def, record)\n })\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter(function (id) {\n return id\n })\n }\n return self.findAll(def.getRelation(), query, __opts).then(function (relatedItems) {\n records.forEach(function (record) {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach(function (relatedItem) {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n const self = this\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': self.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach(function (record) {\n localKeys = localKeys.concat(self.self.makeHasManyLocalKeys(mapper, def, record))\n })\n return self.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter(function (x) { return x })\n }\n }\n }, __opts).then(function (relatedItems) {\n records.forEach(function (item) {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach(function (relatedItem) {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const self = this\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return self.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': self.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then(function (relatedItems) {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return self.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map(function (record) {\n return self.makeHasManyForeignKeys(mapper, def, record)\n })\n }\n }\n }, __opts).then(function (relatedItems) {\n const foreignKeysField = def.foreignKeys\n records.forEach(function (record) {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach(function (relatedItem) {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(function () {\n records.forEach(function (record) {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Logging utility method. Override this method if you want to send log\n * messages to something other than the console.\n *\n * @name Adapter#log\n * @method\n * @param {string} level Log level.\n * @param {...*} values Values to log.\n */\n log (level, ...args) {\n if (level && !args.length) {\n args.push(level)\n level = 'debug'\n }\n if (level === 'debug' && !this.debug) {\n return\n }\n const prefix = `${level.toUpperCase()}: (Adapter)`\n if (console[level]) {\n console[level](prefix, ...args)\n } else {\n console.log(prefix, ...args)\n }\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter(function (x) { return x })\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n const self = this\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(self[op](mapper, field, query, opts)).then(function () {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n self.dbg(op, mapper, field, query, opts)\n return utils.resolve(self._sum(mapper, field, query, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = self.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(self[op](mapper, field, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n const self = this\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(self[op](mapper, id, props, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n self.dbg(op, mapper, id, props, opts)\n return utils.resolve(self._update(mapper, id, props, opts))\n }).then(function (results) {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = self.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(self[op](mapper, id, props, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n const self = this\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts)).then(function (_props) {\n // Allow for re-assignment from lifecycle hook\n props = utils.isUndefined(_props) ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n self.dbg(op, mapper, props, query, opts)\n return utils.resolve(self._updateAll(mapper, props, query, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(self[op](mapper, props, query, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n const self = this\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter(function (record) {\n return utils.get(record, idAttribute)\n })\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(self[op](mapper, records, opts)).then(function (_records) {\n // Allow for re-assignment from lifecycle hook\n records = utils.isUndefined(_records) ? records : _records\n records = records.map(function (record) {\n return withoutRelations(mapper, record, opts)\n })\n op = opts.op = 'updateMany'\n self.dbg(op, mapper, records, opts)\n return utils.resolve(self._updateMany(mapper, records, opts))\n }).then(function (results) {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = self.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(self[op](mapper, records, opts, response)).then(function (_response) {\n // Allow for re-assignment from lifecycle hook\n return utils.isUndefined(_response) ? response : _response\n })\n })\n }\n})\n"],"names":["utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGO,IAAM,OAAO,SAAP,IAAO,GAAmB;AACrC,EAAA,MAAM,OAAO,IAAb;;AADqC,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAErC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AACtC,EAAA,MAAM,OAAO,IAAb;;AADsC,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AAEtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CALM;;AAOP,EAAO,IAAM,SAAS,SAAT,MAAS,CAAU,KAAV,EAAiB;AACrC,EAAA,MAAM,OAAO,EAAb;AACA,EAAA,MAAM,QAAQ,EAAd;AACA,EAAA,QAAM,OAAN,CAAc,UAAU,IAAV,EAAgB;AAC5B,EAAA,QAAI,QAAQ,IAAZ,EAAkB;AAChB,EAAA;AACD,EAAA;AACD,EAAA,UAAM,IAAN,CAAW,IAAX;AACA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AvBM,CAAP;AAwBD,EAAA;AAr1C6C,EAAA,CAAhD;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CAJM;;AAMP,AAAO,EAAA,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AAAA,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAA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Q,GAAR,CAAY,UAAC,MAAD;AAAA,EAAA,eAAY,iBAAiB,MAAjB,EAAyB,MAAzB,EAAiC,IAAjC,CAAZ;AAAA,EAAA,OAAZ,CAAV;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,YAAf;AACA,EAAA,cAAK,GAAL,CAAS,EAAT,EAAa,MAAb,EAAqB,OAArB,EAA8B,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KARI,EASJ,IATI,CASC,UAAC,OAAD,EAAa;AAAA,EAAA,qCACI,OADJ;;AAAA,EAAA,UACZ,IADY;AAAA,EAAA,UACN,MADM;;AAEjB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,QAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;;AAGA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EACJ,IADI,CACC,UAAC,SAAD;AAAA,EAAA,eAAe,cAAc,SAAd,GAA0B,QAA1B,GAAqC,SAApD;AAAA,EAAA,OADD,CAAP;AAED,EAAA,KArBI,CAAP;AAsBD,EAAA;AA1xCc,EAAA,CAAjB;;;;;;;;;;;;"} \ No newline at end of file From 2cb44a4fd73affc949a205c0c464be26891b3690 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 10 Aug 2016 23:00:58 -0700 Subject: [PATCH 10/14] 8.0.0 --- dist/js-data-adapter-tests.js | 472 +++++++++++++++++------------- dist/js-data-adapter-tests.js.map | 2 +- dist/js-data-adapter.js | 16 +- dist/js-data-adapter.js.map | 2 +- 4 files changed, 276 insertions(+), 216 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index cb6e053..8d1553b 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -2890,14 +2890,68 @@ }, _callee, this); }))); + it('should filter users with raw option', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var props, result, users, user, userId, result2, users2; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + props = { name: 'John' }; + + assert.debug('findAll', User.name, { age: 30 }); + _context2.next = 4; + return adapter.findAll(User, { age: 30 }, { raw: true }); + + case 4: + result = _context2.sent; + users = result.data; + + assert.debug('found', User.name, users); + assert.equal(result.mock, true, 'should have metadata'); + assert.equal(users.length, 0, 'users.length'); + + assert.debug('create', User.name, props); + _context2.next = 12; + return adapter.create(User, props); + + case 12: + user = _context2.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + + assert.debug('findAll', User.name, { name: 'John' }); + _context2.next = 18; + return adapter.findAll(User, { name: 'John' }, { raw: true }); + + case 18: + result2 = _context2.sent; + users2 = result2.data; + + assert.equal(result2.mock, true, 'should have metadata'); + assert.debug('found', User.name, users2); + + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', users2[0].name); + + case 25: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + if (options.hasFeature('findAllInOp')) { - it('should filter users using the "in" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + it('should filter users using the "in" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { var users, user, id, users2; - return regeneratorRuntime.wrap(function _callee2$(_context2) { + return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { - switch (_context2.prev = _context2.next) { + switch (_context3.prev = _context3.next) { case 0: - _context2.next = 2; + _context3.next = 2; return adapter.findAll(User, { where: { age: { @@ -2907,21 +2961,21 @@ }); case 2: - users = _context2.sent; + users = _context3.sent; assert.equal(users.length, 0, 'users.length'); - _context2.next = 6; + _context3.next = 6; return adapter.create(User, { name: 'John' }); case 6: - user = _context2.sent; + user = _context3.sent; id = user[User.idAttribute]; - _context2.next = 10; + _context3.next = 10; return adapter.findAll(User, { name: 'John' }); case 10: - users2 = _context2.sent; + users2 = _context3.sent; assert.equal(users2.length, 1, 'users2.length'); assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]'); @@ -2929,21 +2983,21 @@ case 14: case 'end': - return _context2.stop(); + return _context3.stop(); } } - }, _callee2, this); + }, _callee3, this); }))); } if (options.hasFeature('findAllLikeOp')) { - it('should filter users using the "like" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + it('should filter users using the "like" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { var users, user, id, users2; - return regeneratorRuntime.wrap(function _callee3$(_context3) { + return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { - switch (_context3.prev = _context3.next) { + switch (_context4.prev = _context4.next) { case 0: - _context3.next = 2; + _context4.next = 2; return adapter.findAll(User, { where: { name: { @@ -2953,17 +3007,17 @@ }); case 2: - users = _context3.sent; + users = _context4.sent; assert.equal(users.length, 0); - _context3.next = 6; + _context4.next = 6; return adapter.create(User, { name: 'John' }); case 6: - user = _context3.sent; + user = _context4.sent; id = user.id; - _context3.next = 10; + _context4.next = 10; return adapter.findAll(User, { where: { name: { @@ -2973,7 +3027,7 @@ }); case 10: - users2 = _context3.sent; + users2 = _context4.sent; assert.equal(users2.length, 1); assert.equal(users2[0].id, id); @@ -2981,10 +3035,10 @@ case 14: case 'end': - return _context3.stop(); + return _context4.stop(); } } - }, _callee3, this); + }, _callee4, this); }))); } @@ -3005,11 +3059,11 @@ } if (options.hasFeature('findAllBelongsTo')) { - it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { var props, user, profile, post, comment, user2, post2, comment2, comments; - return regeneratorRuntime.wrap(function _callee4$(_context4) { + return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { - switch (_context4.prev = _context4.next) { + switch (_context5.prev = _context5.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); @@ -3017,80 +3071,80 @@ props = { name: 'John' }; assert.debug('create', User.name, props); - _context4.next = 7; + _context5.next = 7; return adapter.create(User, props); case 7: - user = _context4.sent; + user = _context5.sent; assert.debug('created', User.name, user); props = { email: 'foo@test.com', userId: user[User.idAttribute] }; assert.debug('create', Profile.name, props); - _context4.next = 13; + _context5.next = 13; return adapter.create(Profile, props); case 13: - profile = _context4.sent; + profile = _context5.sent; assert.debug('created', Profile.name, profile); props = { content: 'foo', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context4.next = 19; + _context5.next = 19; return adapter.create(Post, props); case 19: - post = _context4.sent; + post = _context5.sent; assert.debug('created', Post.name, post); props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; assert.debug('create', Comment.name, props); - _context4.next = 25; + _context5.next = 25; return adapter.create(Comment, props); case 25: - comment = _context4.sent; + comment = _context5.sent; assert.debug('created', Comment.name, comment); props = { name: 'Sally' }; assert.debug('create', User.name, props); - _context4.next = 31; + _context5.next = 31; return adapter.create(User, props); case 31: - user2 = _context4.sent; + user2 = _context5.sent; assert.debug('created', User.name, user2); props = { content: 'bar', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context4.next = 37; + _context5.next = 37; return adapter.create(Post, props); case 37: - post2 = _context4.sent; + post2 = _context5.sent; assert.debug('created', Post.name, post2); props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; assert.debug('create', Comment.name, props); - _context4.next = 43; + _context5.next = 43; return adapter.create(Comment, props); case 43: - comment2 = _context4.sent; + comment2 = _context5.sent; assert.debug('created', Comment.name, comment2); assert.debug('findAll', Comment.name, {}); - _context4.next = 48; + _context5.next = 48; return adapter.findAll(Comment, {}, { 'with': ['user', 'post'] }); case 48: - comments = _context4.sent; + comments = _context5.sent; assert.debug('found', Comment.name, comments); @@ -3101,87 +3155,87 @@ case 54: case 'end': - return _context4.stop(); + return _context5.stop(); } } - }, _callee4, this); + }, _callee5, this); }))); - it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { var props, user, user2, post, post2, post3, post4, users; - return regeneratorRuntime.wrap(function _callee5$(_context5) { + return regeneratorRuntime.wrap(function _callee6$(_context6) { while (1) { - switch (_context5.prev = _context5.next) { + switch (_context6.prev = _context6.next) { case 0: this.toClear.push('Post'); this.toClear.push('Comment'); props = { name: 'John' }; assert.debug('create', User.name, props); - _context5.next = 6; + _context6.next = 6; return adapter.create(User, props); case 6: - user = _context5.sent; + user = _context6.sent; assert.debug('created', User.name, user); props = { name: 'Sally' }; assert.debug('create', User.name, props); - _context5.next = 12; + _context6.next = 12; return adapter.create(User, props); case 12: - user2 = _context5.sent; + user2 = _context6.sent; assert.debug('created', User.name, user); props = { status: 'draft', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context5.next = 18; + _context6.next = 18; return adapter.create(Post, props); case 18: - post = _context5.sent; + post = _context6.sent; assert.debug('created', Post.name, post); props = { status: 'published', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context5.next = 24; + _context6.next = 24; return adapter.create(Post, props); case 24: - post2 = _context5.sent; + post2 = _context6.sent; assert.debug('created', Post.name, post2); props = { status: 'draft', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context5.next = 30; + _context6.next = 30; return adapter.create(Post, props); case 30: - post3 = _context5.sent; + post3 = _context6.sent; assert.debug('created', Post.name, post3); props = { status: 'published', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context5.next = 36; + _context6.next = 36; return adapter.create(Post, props); case 36: - post4 = _context5.sent; + post4 = _context6.sent; assert.debug('created', Post.name, post4); assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context5.next = 41; + _context6.next = 41; return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); case 41: - users = _context5.sent; + users = _context6.sent; assert.debug('found', User.name, users); @@ -3190,7 +3244,7 @@ assert.equal(users[0].posts.length, 2, 'users[0].posts.length'); assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context5.next = 49; + _context6.next = 49; return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', query: { @@ -3199,7 +3253,7 @@ }] }); case 49: - users = _context5.sent; + users = _context6.sent; assert.debug('found', User.name, users); @@ -3208,7 +3262,7 @@ assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context5.next = 57; + _context6.next = 57; return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', replace: true, @@ -3218,7 +3272,7 @@ }] }); case 57: - users = _context5.sent; + users = _context6.sent; assert.debug('found', User.name, users); @@ -3228,19 +3282,19 @@ case 62: case 'end': - return _context5.stop(); + return _context6.stop(); } } - }, _callee5, this); + }, _callee6, this); }))); } if (options.hasFeature('findAllBelongsToNested')) { - it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { var props, user, profile, post, comment, user2, post2, comment2, comments; - return regeneratorRuntime.wrap(function _callee6$(_context6) { + return regeneratorRuntime.wrap(function _callee7$(_context7) { while (1) { - switch (_context6.prev = _context6.next) { + switch (_context7.prev = _context7.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); @@ -3248,80 +3302,80 @@ props = { name: 'John' }; assert.debug('create', User.name, props); - _context6.next = 7; + _context7.next = 7; return adapter.create(User, props); case 7: - user = _context6.sent; + user = _context7.sent; assert.debug('created', User.name, user); props = { email: 'foo@test.com', userId: user[User.idAttribute] }; assert.debug('create', Profile.name, props); - _context6.next = 13; + _context7.next = 13; return adapter.create(Profile, props); case 13: - profile = _context6.sent; + profile = _context7.sent; assert.debug('created', Profile.name, profile); props = { content: 'foo', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context6.next = 19; + _context7.next = 19; return adapter.create(Post, props); case 19: - post = _context6.sent; + post = _context7.sent; assert.debug('created', Post.name, post); props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; assert.debug('create', Comment.name, props); - _context6.next = 25; + _context7.next = 25; return adapter.create(Comment, props); case 25: - comment = _context6.sent; + comment = _context7.sent; assert.debug('created', Comment.name, comment); props = { name: 'Sally' }; assert.debug('create', User.name, props); - _context6.next = 31; + _context7.next = 31; return adapter.create(User, props); case 31: - user2 = _context6.sent; + user2 = _context7.sent; assert.debug('created', User.name, user2); props = { content: 'bar', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context6.next = 37; + _context7.next = 37; return adapter.create(Post, props); case 37: - post2 = _context6.sent; + post2 = _context7.sent; assert.debug('created', Post.name, post2); props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; assert.debug('create', Comment.name, props); - _context6.next = 43; + _context7.next = 43; return adapter.create(Comment, props); case 43: - comment2 = _context6.sent; + comment2 = _context7.sent; assert.debug('created', Comment.name, comment2); assert.debug('findAll', Comment.name, {}); - _context6.next = 48; + _context7.next = 48; return adapter.findAll(Comment, {}, { 'with': ['user', 'user.profile', 'post', 'post.user'] }); case 48: - comments = _context6.sent; + comments = _context7.sent; assert.debug('found', Comment.name, comments); @@ -3335,19 +3389,19 @@ case 57: case 'end': - return _context6.stop(); + return _context7.stop(); } } - }, _callee6, this); + }, _callee7, this); }))); } if (options.hasFeature('findAllBelongsToHasMany')) { - it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { var props, user, profile, post, comment, user2, post2, comment2, posts; - return regeneratorRuntime.wrap(function _callee7$(_context7) { + return regeneratorRuntime.wrap(function _callee8$(_context8) { while (1) { - switch (_context7.prev = _context7.next) { + switch (_context8.prev = _context8.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); @@ -3355,80 +3409,80 @@ props = { name: 'John' }; assert.debug('create', User.name, props); - _context7.next = 7; + _context8.next = 7; return adapter.create(User, props); case 7: - user = _context7.sent; + user = _context8.sent; assert.debug('created', User.name, user); props = { email: 'foo@test.com', userId: user[User.idAttribute] }; assert.debug('create', Profile.name, props); - _context7.next = 13; + _context8.next = 13; return adapter.create(Profile, props); case 13: - profile = _context7.sent; + profile = _context8.sent; assert.debug('created', Profile.name, profile); props = { content: 'foo', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context7.next = 19; + _context8.next = 19; return adapter.create(Post, props); case 19: - post = _context7.sent; + post = _context8.sent; assert.debug('created', Post.name, post); props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; assert.debug('create', Comment.name, props); - _context7.next = 25; + _context8.next = 25; return adapter.create(Comment, props); case 25: - comment = _context7.sent; + comment = _context8.sent; assert.debug('created', Comment.name, comment); props = { name: 'Sally' }; assert.debug('create', User.name, props); - _context7.next = 31; + _context8.next = 31; return adapter.create(User, props); case 31: - user2 = _context7.sent; + user2 = _context8.sent; assert.debug('created', User.name, user2); props = { content: 'bar', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context7.next = 37; + _context8.next = 37; return adapter.create(Post, props); case 37: - post2 = _context7.sent; + post2 = _context8.sent; assert.debug('created', Post.name, post2); props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; assert.debug('create', Comment.name, props); - _context7.next = 43; + _context8.next = 43; return adapter.create(Comment, props); case 43: - comment2 = _context7.sent; + comment2 = _context8.sent; assert.debug('created', Comment.name, comment2); assert.debug('find', Post.name, {}); - _context7.next = 48; + _context8.next = 48; return adapter.findAll(Post, {}, { 'with': ['user', 'comment'] }); case 48: - posts = _context7.sent; + posts = _context8.sent; assert.debug('found', Post.name, posts); @@ -3439,19 +3493,19 @@ case 54: case 'end': - return _context7.stop(); + return _context8.stop(); } } - }, _callee7, this); + }, _callee8, this); }))); } if (options.hasFeature('findAllBelongsToHasManyNested')) { - it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { var props, user, profile, post, comment, user2, post2, comment2, posts; - return regeneratorRuntime.wrap(function _callee8$(_context8) { + return regeneratorRuntime.wrap(function _callee9$(_context9) { while (1) { - switch (_context8.prev = _context8.next) { + switch (_context9.prev = _context9.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); @@ -3459,80 +3513,80 @@ props = { name: 'John' }; assert.debug('create', User.name, props); - _context8.next = 7; + _context9.next = 7; return adapter.create(User, props); case 7: - user = _context8.sent; + user = _context9.sent; assert.debug('created', User.name, user); props = { email: 'foo@test.com', userId: user[User.idAttribute] }; assert.debug('create', Profile.name, props); - _context8.next = 13; + _context9.next = 13; return adapter.create(Profile, props); case 13: - profile = _context8.sent; + profile = _context9.sent; assert.debug('created', Profile.name, profile); props = { content: 'foo', userId: user[User.idAttribute] }; assert.debug('create', Post.name, props); - _context8.next = 19; + _context9.next = 19; return adapter.create(Post, props); case 19: - post = _context8.sent; + post = _context9.sent; assert.debug('created', Post.name, post); props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; assert.debug('create', Comment.name, props); - _context8.next = 25; + _context9.next = 25; return adapter.create(Comment, props); case 25: - comment = _context8.sent; + comment = _context9.sent; assert.debug('created', Comment.name, comment); props = { name: 'Sally' }; assert.debug('create', User.name, props); - _context8.next = 31; + _context9.next = 31; return adapter.create(User, props); case 31: - user2 = _context8.sent; + user2 = _context9.sent; assert.debug('created', User.name, user2); props = { content: 'bar', userId: user2[User.idAttribute] }; assert.debug('create', Post.name, props); - _context8.next = 37; + _context9.next = 37; return adapter.create(Post, props); case 37: - post2 = _context8.sent; + post2 = _context9.sent; assert.debug('created', Post.name, post2); props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; assert.debug('create', Comment.name, props); - _context8.next = 43; + _context9.next = 43; return adapter.create(Comment, props); case 43: - comment2 = _context8.sent; + comment2 = _context9.sent; assert.debug('created', Comment.name, comment2); assert.debug('find', Post.name, {}); - _context8.next = 48; + _context9.next = 48; return adapter.findAll(Post, {}, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); case 48: - posts = _context8.sent; + posts = _context9.sent; assert.debug('found', Post.name, posts); @@ -3546,61 +3600,61 @@ case 57: case 'end': - return _context8.stop(); + return _context9.stop(); } } - }, _callee8, this); + }, _callee9, this); }))); } if (options.hasFeature('filterOnRelations')) { - it('should filter using belongsTo relation', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + it('should filter using belongsTo relation', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { var profile1, user1, post1, user2, post2, users; - return regeneratorRuntime.wrap(function _callee9$(_context9) { + return regeneratorRuntime.wrap(function _callee10$(_context10) { while (1) { - switch (_context9.prev = _context9.next) { + switch (_context10.prev = _context10.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); this.toClear.push('Comment'); - _context9.next = 5; + _context10.next = 5; return adapter.create(Profile, { email: 'foo@test.com' }); case 5: - profile1 = _context9.sent; - _context9.next = 8; + profile1 = _context10.sent; + _context10.next = 8; return adapter.create(User, { name: 'John', profileId: profile1.id }); case 8: - user1 = _context9.sent; - _context9.next = 11; + user1 = _context10.sent; + _context10.next = 11; return adapter.create(Post, { content: 'foo', userId: user1.id }); case 11: - post1 = _context9.sent; - _context9.next = 14; + post1 = _context10.sent; + _context10.next = 14; return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); case 14: - _context9.next = 16; + _context10.next = 16; return adapter.create(User, { name: 'Sally' }); case 16: - user2 = _context9.sent; - _context9.next = 19; + user2 = _context10.sent; + _context10.next = 19; return adapter.create(Post, { content: 'bar', userId: user2.id }); case 19: - post2 = _context9.sent; - _context9.next = 22; + post2 = _context10.sent; + _context10.next = 22; return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); case 22: - _context9.next = 24; + _context10.next = 24; return adapter.findAll(User, { 'profile.email': 'foo@test.com' }); case 24: - users = _context9.sent; + users = _context10.sent; assert.equal(users.length, 1); assert.equal(users[0].profileId, profile1.id); @@ -3608,64 +3662,64 @@ case 28: case 'end': - return _context9.stop(); + return _context10.stop(); } } - }, _callee9, this); + }, _callee10, this); }))); - it('should filter through multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + it('should filter through multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { var profile1, user1, post1, profile2, user2, post2, comments; - return regeneratorRuntime.wrap(function _callee10$(_context10) { + return regeneratorRuntime.wrap(function _callee11$(_context11) { while (1) { - switch (_context10.prev = _context10.next) { + switch (_context11.prev = _context11.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); this.toClear.push('Comment'); - _context10.next = 5; + _context11.next = 5; return adapter.create(Profile, { email: 'foo@test.com' }); case 5: - profile1 = _context10.sent; - _context10.next = 8; + profile1 = _context11.sent; + _context11.next = 8; return adapter.create(User, { name: 'John', profileId: profile1.id }); case 8: - user1 = _context10.sent; - _context10.next = 11; + user1 = _context11.sent; + _context11.next = 11; return adapter.create(Post, { content: 'foo', userId: user1.id }); case 11: - post1 = _context10.sent; - _context10.next = 14; + post1 = _context11.sent; + _context11.next = 14; return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); case 14: - _context10.next = 16; + _context11.next = 16; return adapter.create(Profile, { email: 'bar@test.com' }); case 16: - profile2 = _context10.sent; - _context10.next = 19; + profile2 = _context11.sent; + _context11.next = 19; return adapter.create(User, { name: 'Sally', profileId: profile2.id }); case 19: - user2 = _context10.sent; - _context10.next = 22; + user2 = _context11.sent; + _context11.next = 22; return adapter.create(Post, { content: 'bar', userId: user2.id }); case 22: - post2 = _context10.sent; - _context10.next = 25; + post2 = _context11.sent; + _context11.next = 25; return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); case 25: - _context10.next = 27; + _context11.next = 27; return adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' }); case 27: - comments = _context10.sent; + comments = _context11.sent; assert.equal(comments.length, 1); assert.equal(comments[0].userId, user1.id); @@ -3673,64 +3727,64 @@ case 31: case 'end': - return _context10.stop(); + return _context11.stop(); } } - }, _callee10, this); + }, _callee11, this); }))); - it('should filter using multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + it('should filter using multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { var profile1, user1, post1, profile2, user2, post2, comments; - return regeneratorRuntime.wrap(function _callee11$(_context11) { + return regeneratorRuntime.wrap(function _callee12$(_context12) { while (1) { - switch (_context11.prev = _context11.next) { + switch (_context12.prev = _context12.next) { case 0: this.toClear.push('Post'); this.toClear.push('Profile'); this.toClear.push('Comment'); - _context11.next = 5; + _context12.next = 5; return adapter.create(Profile, { email: 'foo@test.com' }); case 5: - profile1 = _context11.sent; - _context11.next = 8; + profile1 = _context12.sent; + _context12.next = 8; return adapter.create(User, { name: 'John', profileId: profile1.id }); case 8: - user1 = _context11.sent; - _context11.next = 11; + user1 = _context12.sent; + _context12.next = 11; return adapter.create(Post, { content: 'foo', userId: user1.id }); case 11: - post1 = _context11.sent; - _context11.next = 14; + post1 = _context12.sent; + _context12.next = 14; return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); case 14: - _context11.next = 16; + _context12.next = 16; return adapter.create(Profile, { email: 'bar@test.com' }); case 16: - profile2 = _context11.sent; - _context11.next = 19; + profile2 = _context12.sent; + _context12.next = 19; return adapter.create(User, { name: 'Sally', profileId: profile2.id }); case 19: - user2 = _context11.sent; - _context11.next = 22; + user2 = _context12.sent; + _context12.next = 22; return adapter.create(Post, { content: 'bar', userId: user2.id }); case 22: - post2 = _context11.sent; - _context11.next = 25; + post2 = _context12.sent; + _context12.next = 25; return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); case 25: - _context11.next = 27; + _context12.next = 27; return adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' }); case 27: - comments = _context11.sent; + comments = _context12.sent; assert.equal(comments.length, 1); assert.equal(comments[0].userId, user1.id); @@ -3738,42 +3792,42 @@ case 31: case 'end': - return _context11.stop(); + return _context12.stop(); } } - }, _callee11, this); + }, _callee12, this); }))); } - it('should allow passing limit and offset as strings', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { - return regeneratorRuntime.wrap(function _callee12$(_context12) { + it('should allow passing limit and offset as strings', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + return regeneratorRuntime.wrap(function _callee13$(_context13) { while (1) { - switch (_context12.prev = _context12.next) { + switch (_context13.prev = _context13.next) { case 0: - _context12.next = 2; + _context13.next = 2; return adapter.findAll(User, { limit: '10', offset: '20' }); case 2: case 'end': - return _context12.stop(); + return _context13.stop(); } } - }, _callee12, this); + }, _callee13, this); }))); if (options.hasFeature('findAllGroupedWhere')) { - it('should support filtering grouped "where" clauses', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + it('should support filtering grouped "where" clauses', asyncToGenerator(regeneratorRuntime.mark(function _callee14() { var posts, query; - return regeneratorRuntime.wrap(function _callee13$(_context13) { + return regeneratorRuntime.wrap(function _callee14$(_context14) { while (1) { - switch (_context13.prev = _context13.next) { + switch (_context14.prev = _context14.next) { case 0: this.toClear.push('Post'); - _context13.next = 3; + _context14.next = 3; return adapter.createMany(Post, [{ status: 'draft', content: 'foo' }, { status: 'broken', content: 'bar' }, { status: 'published', content: 'hi' }, { status: 'flagged', content: 'hello world' }, { status: 'flagged', content: 'test' }]); case 3: - posts = _context13.sent; + posts = _context14.sent; query = { where: [[{ content: { @@ -3796,22 +3850,22 @@ }], orderBy: 'status' }; - _context13.t0 = assert; - _context13.next = 8; + _context14.t0 = assert; + _context14.next = 8; return adapter.findAll(Post, query); case 8: - _context13.t1 = _context13.sent; - _context13.t2 = [posts[0], posts[4], posts[2]]; + _context14.t1 = _context14.sent; + _context14.t2 = [posts[0], posts[4], posts[2]]; - _context13.t0.objectsEqual.call(_context13.t0, _context13.t1, _context13.t2); + _context14.t0.objectsEqual.call(_context14.t0, _context14.t1, _context14.t2); case 11: case 'end': - return _context13.stop(); + return _context14.stop(); } } - }, _callee13, this); + }, _callee14, this); }))); } }); @@ -4731,4 +4785,4 @@ return index; })); -//# sourceMappingURL=js-data-adapter-tests.js.map \ No newline at end of file +//# sourceMappingURL=js-data-adapter-tests.js.map diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index 7093171..199a964 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,SAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,2CAA8B;AAAA,EAAA,UACtB,OADsB,EAEtB,IAFsB,EAGtB,KAHsB,EAWtB,IAXsB,EAmBtB,IAnBsB;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,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AA5B,EAAmC,YAAY,EAA/C,CAnOzB;AAqOb,EAAA,0CAAwC,CAAC,IAAD,EAAO,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;AAuOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(result.mock, true, 'should have metadata')\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.equal(result2.mock, true, 'should have metadata')\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;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2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index 83b558a..f717da0 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -956,6 +956,7 @@ var record = void 0, op = void 0; + var meta = {}; opts || (opts = {}); opts.with || (opts.with = []); @@ -966,14 +967,16 @@ _this7.dbg(op, mapper, id, opts); return jsData.utils.resolve(_this7._find(mapper, id, opts)); }).then(function (results) { - var _results6 = slicedToArray(results, 1); + var _results6 = slicedToArray(results, 2); var _record = _results6[0]; + var _meta = _results6[1]; if (!_record) { return; } record = _record; + meta = _meta; var tasks = []; jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { @@ -998,7 +1001,7 @@ return jsData.utils.Promise.all(tasks); }).then(function () { - var response = new Response(record, {}, 'find'); + var response = new Response(record, meta, 'find'); response.found = record ? 1 : 0; response = _this7.respond(response, opts); @@ -1037,6 +1040,7 @@ opts.with || (opts.with = []); var records = []; + var meta = {}; var op = void 0; var activeWith = opts._activeWith; @@ -1056,12 +1060,14 @@ _this8.dbg(op, mapper, query, opts); return jsData.utils.resolve(_this8._findAll(mapper, query, opts)); }).then(function (results) { - var _results7 = slicedToArray(results, 1); + var _results7 = slicedToArray(results, 2); var _records = _results7[0]; + var _meta = _results7[1]; _records || (_records = []); records = _records; + meta = _meta; var tasks = []; jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { var task = void 0; @@ -1084,7 +1090,7 @@ }); return jsData.utils.Promise.all(tasks); }).then(function () { - var response = new Response(records, {}, 'findAll'); + var response = new Response(records, meta, 'findAll'); response.found = records.length; response = _this8.respond(response, opts); @@ -1591,4 +1597,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); })); -//# sourceMappingURL=js-data-adapter.js.map \ No newline at end of file +//# sourceMappingURL=js-data-adapter.js.map diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index cd1b84c..84f14c1 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record] = results\n if (!_record) {\n return\n }\n record = _record\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, {}, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records] = results\n _records || (_records = [])\n records = _records\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, {}, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IA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AA,KArBI,CAAP;AAsBD,EAAA;AA1xCc,EAAA,CAAjB;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CAJM;;AAMP,AAAO,EAAA,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AAAA,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACtC,EAAA,MAAM,OAAO,KAAK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,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KARI,EASJ,IATI,CASC,UAAC,OAAD,EAAa;AAAA,EAAA,qCACI,OADJ;;AAAA,EAAA,UACZ,IADY;AAAA,EAAA,UACN,MADM;;AAEjB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,QAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;AAEA,EAAA;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EACJ,IADI,CACC,UAAC,SAAD;AAAA,EAAA,eAAe,cAAc,SAAd,GAA0B,QAA1B,GAAqC,SAApD;AAAA,EAAA,OADD,CAAP;AAED,EAAA,KArBI,CAAP;AAsBD,EAAA;AA9xCc,EAAA,CAAjB,EAiyCA;;;;;;;;;;;;"} \ No newline at end of file From d6326ebe8161c28f0d3433859e94b742f0f53d1d Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Sat, 13 Aug 2016 21:03:04 -0700 Subject: [PATCH 11/14] 0.8.1 --- dist/js-data-adapter.js | 2 +- dist/js-data-adapter.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index f717da0..19d305e 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -169,7 +169,7 @@ */ function Adapter(opts) { jsData.utils.classCallCheck(this, Adapter); - jsData.Component.call(this); + jsData.Component.call(this, opts); opts || (opts = {}); jsData.utils.fillIn(opts, DEFAULTS); jsData.utils.fillIn(this, opts); diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index 84f14c1..f6ef209 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CAJM;;AAMP,AAAO,EAAA,IAAM,Q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AAV;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,YAAf;AACA,EAAA,cAAK,GAAL,CAAS,EAAT,EAAa,MAAb,EAAqB,OAArB,EAA8B,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KARI,EASJ,IATI,CASC,UAAC,OAAD,EAAa;AAAA,EAAA,qCACI,OADJ;;AAAA,EAAA,UACZ,IADY;AAAA,EAAA,UACN,MADM;;AAEjB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,QAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;AAEA,EAAA;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EACJ,IADI,CACC,UAAC,SAAD;AAAA,EAAA,eAAe,cAAc,SAAd,GAA0B,QAA1B,GAAqC,SAApD;AAAA,EAAA,OADD,CAAP;AAED,EAAA,KArBI,CAAP;AAsBD,EAAA;AA9xCc,EAAA,CAAjB,EAiyCA;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this, opts)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CAJM;;AAMP,AAAO,EAAA,IAAM,QAAQ,SAAR,KAAQ,GAAmB;AAAA,EAAA,qCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACtC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OAAN,EAAP;AACD,EAAA,CAJM;;AAMP,AAAO,EAAA,IAAM,SAAS,SAAT,MAAS,CAAU,KAAV,EAAiB;AACrC,EAAA,MAAM,OAAO,EAAb;AACA,EAAA,MAAM,QAAQ,EAAd;AACA,EAAA,QAAM,OAAN,CAAc,UAAU,IAAV,EAAgB;AAC5B,EAAA,QAAI,QAAQ,IAAZ,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AAA;AA9xCc,EAAA,CAAjB,EAiyCA;;;;;;;;;;;;"} \ No newline at end of file From 7fa53ec5422c5664809469dea32e449e03f0bf2b Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 15 Aug 2016 14:52:08 -0700 Subject: [PATCH 12/14] 0.8.2 --- dist/js-data-adapter-tests.js | 12 +++++------- dist/js-data-adapter-tests.js.map | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index 8d1553b..0d21a1d 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -2907,14 +2907,13 @@ users = result.data; assert.debug('found', User.name, users); - assert.equal(result.mock, true, 'should have metadata'); assert.equal(users.length, 0, 'users.length'); assert.debug('create', User.name, props); - _context2.next = 12; + _context2.next = 11; return adapter.create(User, props); - case 12: + case 11: user = _context2.sent; assert.debug('created', User.name, user); @@ -2922,21 +2921,20 @@ assert.debug('findAll', User.name, { name: 'John' }); - _context2.next = 18; + _context2.next = 17; return adapter.findAll(User, { name: 'John' }, { raw: true }); - case 18: + case 17: result2 = _context2.sent; users2 = result2.data; - assert.equal(result2.mock, true, 'should have metadata'); assert.debug('found', User.name, users2); assert.equal(users2.length, 1, 'users2.length'); assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); assert.equal(users2[0].name, 'John', users2[0].name); - case 25: + case 23: case 'end': return _context2.stop(); } diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index 199a964..86cf560 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(result.mock, true, 'should have metadata')\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.equal(result2.mock, true, 'should have metadata')\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,SAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,2CAA8B;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBAHsB,GAGd,EAAE,MAAM,MAAR,EAHc;;;AAK5B,EAAA,oBAAM,IAAN,CAAW,OAAX,EAAoB,aAApB,EAAmC,UAAU,MAAV,EAAkB,KAAlB,EAAyB,IAAzB,EAA+B;AAChE,EAAA,uBAAO,SAAP,CAAiB,IAAjB,EAAuB,0CAAvB;AACA,EAAA,uBAAO,KAAP,CAAa,KAAK,EAAlB,EAAsB,aAAtB,EAAqC,SAArC;AACD,EAAA,eAHD;;AAKA,EAAA,qBAAO,KAAP,CAAa,QAAb,EAAuB,KAAK,IAA5B,EAAkC,KAAlC;AAV4B,EAAA;AAAA,EAAA,qBAWT,QAAQ,MAAR,CAAe,IAAf,EAAqB,KAArB,CAXS;;AAAA,EAAA;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AD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAA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ry Date: Mon, 7 Nov 2016 19:28:26 -0800 Subject: [PATCH 13/14] 0.8.3 --- dist/js-data-adapter-tests.js | 8020 +++++++++++++++-------------- dist/js-data-adapter-tests.js.map | 2 +- dist/js-data-adapter.js | 3210 ++++++------ dist/js-data-adapter.js.map | 2 +- 4 files changed, 5825 insertions(+), 5409 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index 0d21a1d..7da19e6 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -2,2161 +2,3252 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chai'), require('sinon')) : typeof define === 'function' && define.amd ? define('js-data-adapter-tests', ['chai', 'sinon'], factory) : (global.JSDataAdapterTests = factory(global.chai,global.sinon)); -}(this, function (chai,sinon$1) { 'use strict'; +}(this, (function (chai,sinon$1) { 'use strict'; - sinon$1 = 'default' in sinon$1 ? sinon$1['default'] : sinon$1; +sinon$1 = 'default' in sinon$1 ? sinon$1['default'] : sinon$1; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; - }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +}; + + + + + +var asyncGenerator = function () { + function AwaitValue(value) { + this.value = value; + } + + function AsyncGenerator(gen) { + var front, back; - var asyncToGenerator = function (fn) { - return function () { - var gen = fn.apply(this, arguments); + function send(key, arg) { return new Promise(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; - if (info.done) { - resolve(value); - } else { - return Promise.resolve(value).then(function (value) { - return step("next", value); - }, function (err) { - return step("throw", err); - }); - } + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); } - - return step("next"); }); - }; - }; + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; - var classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); + if (value instanceof AwaitValue) { + Promise.resolve(value.value).then(function (arg) { + resume("next", arg); + }, function (arg) { + resume("throw", arg); + }); + } else { + settle(result.done ? "return" : "normal", result.value); + } + } catch (err) { + settle("throw", err); + } } - }; - var createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; } } - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - var defineProperty = function (obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; + this._invoke = send; + + if (typeof gen.return !== "function") { + this.return = undefined; } + } - return obj; + if (typeof Symbol === "function" && Symbol.asyncIterator) { + AsyncGenerator.prototype[Symbol.asyncIterator] = function () { + return this; + }; + } + + AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); + }; + + AsyncGenerator.prototype.throw = function (arg) { + return this._invoke("throw", arg); + }; + + AsyncGenerator.prototype.return = function (arg) { + return this._invoke("return", arg); }; - var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + return { + wrap: function (fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + }, + await: function (value) { + return new AwaitValue(value); } + }; +}(); + + - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true +var asyncToGenerator = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new Promise(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return Promise.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } } + + return step("next"); }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; +}; - var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); +var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); } + } - return call && (typeof call === "object" || typeof call === "function") ? call : self; + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; }; +}(); - /* global assert:true */ - function afterCreateTest (options) { - describe('Adapter#afterCreate', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.afterCreate), 'function', 'adapter should have a "afterCreate" method'); - }); - it('should call afterCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'afterCreate should have received options'); - assert.equal(opts.op, 'afterCreate', 'opts.op'); - }); - assert.debug('create', User.name, props); - _context.next = 7; - return adapter.create(User, props); - case 7: - user = _context.sent; +var defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } - assert.debug('created', User.name, user); + return obj; +}; - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); +var get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); - assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); - args = adapter.afterCreate.firstCall.args; + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; - assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); - assert.isObject(args[2], 'afterCreate should have received options'); - assert.isObject(args[3], 'afterCreate should have received record'); - adapter.afterCreate.restore(); + if (getter === undefined) { + return undefined; + } - case 19: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + return getter.call(receiver); + } +}; +var inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'afterCreate should have received options'); - assert.equal(opts.op, 'afterCreate', 'opts.op'); - return 'foo'; - }); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +}; - assert.debug('create', User.name, props); - _context2.next = 7; - return adapter.create(User, props); - case 7: - user = _context2.sent; - assert.debug('created', User.name, user); - assert.equal(user, 'foo', 'result should be "foo"'); - assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); - args = adapter.afterCreate.firstCall.args; - assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); - assert.isObject(args[2], 'afterCreate should have received options'); - assert.isObject(args[3], 'afterCreate should have received record'); - adapter.afterCreate.restore(); - case 18: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - }))); - it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) { - assert.isDefined(opts, 'afterCreate should have received options'); - assert.equal(opts.op, 'afterCreate', 'opts.op'); - return Promise.resolve(); - }); - assert.debug('create', User.name, props); - _context3.next = 7; - return adapter.create(User, props); +var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } - case 7: - user = _context3.sent; + return call && (typeof call === "object" || typeof call === "function") ? call : self; +}; - assert.debug('created', User.name, user); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); - assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); +var set = function set(object, property, value, receiver) { + var desc = Object.getOwnPropertyDescriptor(object, property); - args = adapter.afterCreate.firstCall.args; + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); - assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); - assert.isDefined(args[2], 'afterCreate should have received options'); - assert.isObject(args[3], 'afterCreate should have received record'); - adapter.afterCreate.restore(); + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ("value" in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; - case 19: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - }))); - it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + if (setter !== undefined) { + setter.call(receiver, value); + } + } + return value; +}; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'afterCreate should have received options'); - assert.equal(opts.op, 'afterCreate', 'opts.op'); - return 'foo'; - }); +/* global assert:true */ +var afterCreateTest = function (options) { + describe('Adapter#afterCreate', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.afterCreate), 'function', 'adapter should have a "afterCreate" method'); + }); + it('should call afterCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - assert.debug('create', User.name, props); - _context4.next = 7; - return adapter.create(User, props); - case 7: - user = _context4.sent; + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + }); - assert.debug('created', User.name, user); + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); - assert.equal(user, 'foo', 'result should be "foo"'); + case 7: + user = _context.sent; - assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + assert.debug('created', User.name, user); - args = adapter.afterCreate.firstCall.args; + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); - assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); - assert.isObject(args[2], 'afterCreate should have received options'); - assert.isObject(args[3], 'afterCreate should have received record'); - adapter.afterCreate.restore(); + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); - case 18: - case 'end': - return _context4.stop(); - } + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); + + case 19: + case 'end': + return _context.stop(); } - }, _callee4, this); - }))); - it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { - var adapter, User, props, result, args; - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + } + }, _callee, this); + }))); + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user, 'foo', 'result should be "foo"'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); + + case 18: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isDefined(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); + + case 19: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + + assert.debug('created', User.name, user); + + assert.equal(user, 'foo', 'result should be "foo"'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received record'); + adapter.afterCreate.restore(); + + case 18: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, props, result, args; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'afterCreate should have received options'); + assert.equal(opts.op, 'afterCreate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props, { raw: true }); + + case 7: + result = _context5.sent; + + assert.debug('created', User.name, result); + + assert.equal(result.created, 1, 'result.created'); + assert.equal(result.data.name, props.name, 'result.data.name'); + assert.isDefined(result.data[User.idAttribute], 'result.data[' + User.idAttribute + ']'); + + assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + + args = adapter.afterCreate.firstCall.args; + + assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); + assert.isObject(args[2], 'afterCreate should have received options'); + assert.isObject(args[3], 'afterCreate should have received result'); + assert.equal(args[3].created, 1, 'result.created'); + assert.isObject(args[3].data, 'result.data'); + adapter.afterCreate.restore(); + + case 22: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); +}; + +/* global assert:true */ +var afterUpdateTest = function (options) { + describe('Adapter#afterUpdate', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.afterUpdate), 'function', 'adapter should have a "afterUpdate" method'); + }); + it('should call afterUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); + + case 7: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); + + case 31: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, result, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context2.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }, { raw: true }); + + case 15: + result = _context2.sent; + + assert.debug('updated', User.name, result); + assert.isDefined(result.data, 'result.data'); + assert.equal(result.data.name, 'Johnny', result.data.name); + assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received update result'); + assert.equal(args[4].updated, 1, 'args[4].updated'); + assert.isDefined(args[4].data, 'args[4].data'); + assert.equal(args[4].data[User.idAttribute], userId, 'args[4].data.' + User.idAttribute); + assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name'); + adapter.afterUpdate.restore(); + + case 34: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return 'foo'; + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context3.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context3.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); + + case 30: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context4.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context4.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); + + case 31: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'afterUpdate should have received options'); + assert.equal(opts.op, 'afterUpdate', 'opts.op'); + return Promise.resolve('foo'); + }); + + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props); + + case 7: + user = _context5.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context5.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context5.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + + assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + + args = adapter.afterUpdate.firstCall.args; + + assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); + assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); + assert.isDefined(args[3], 'afterUpdate should have received options'); + assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); + assert.isDefined(args[4], 'afterUpdate should have received updated record'); + assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); + assert.equal(args[4].name, 'Johnny', 'args[4].name'); + adapter.afterUpdate.restore(); + + case 30: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); +}; + +/* global assert:true */ +var beforeCreateTest = function (options) { + describe('Adapter#beforeCreate', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.beforeCreate), 'function', 'adapter should have a "beforeCreate" method'); + }); + it('should call beforeCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'afterCreate should have received options'); - assert.equal(opts.op, 'afterCreate', 'opts.op'); - }); + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + }); - assert.debug('create', User.name, props); - _context5.next = 7; - return adapter.create(User, props, { raw: true }); + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); - case 7: - result = _context5.sent; + case 7: + user = _context.sent; - assert.debug('created', User.name, result); + assert.debug('created', User.name, user); - assert.equal(result.created, 1, 'result.created'); - assert.equal(result.data.name, props.name, 'result.data.name'); - assert.isDefined(result.data[User.idAttribute], 'result.data[' + User.idAttribute + ']'); + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); - assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once'); + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); - args = adapter.afterCreate.firstCall.args; + args = adapter.beforeCreate.firstCall.args; - assert.equal(args.length, 4, 'afterCreate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'afterCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props'); - assert.isObject(args[2], 'afterCreate should have received options'); - assert.isObject(args[3], 'afterCreate should have received result'); - assert.equal(args[3].created, 1, 'result.created'); - assert.isObject(args[3].data, 'result.data'); - adapter.afterCreate.restore(); + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); - case 22: - case 'end': - return _context5.stop(); - } + case 18: + case 'end': + return _context.stop(); } - }, _callee5, this); - }))); + } + }, _callee, this); + }))); + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return { name: 'Sally' }; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); + + case 18: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isDefined(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); + + case 18: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + assert.isDefined(opts, 'beforeCreate should have received options'); + assert.equal(opts.op, 'beforeCreate', 'opts.op'); + return Promise.resolve({ name: 'Sally' }); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + + args = adapter.beforeCreate.firstCall.args; + + assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); + assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); + assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); + assert.isObject(args[2], 'beforeCreate should have received options'); + adapter.beforeCreate.restore(); + + case 18: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); +}; + +/* global assert:true */ +var beforeUpdateTest = function (options) { + describe('Adapter#beforeUpdate', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.beforeUpdate), 'function', 'adapter should have a "beforeUpdate" method'); }); - } - - /* global assert:true */ - function afterUpdateTest (options) { - describe('Adapter#afterUpdate', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.afterUpdate), 'function', 'adapter should have a "afterUpdate" method'); - }); - it('should call afterUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + it('should call beforeUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'afterUpdate should have received options'); - assert.equal(opts.op, 'afterUpdate', 'opts.op'); - }); + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + }); - assert.debug('create', User.name, props); - _context.next = 7; - return adapter.create(User, props); + assert.debug('create', User.name, props); + _context.next = 7; + return adapter.create(User, props); - case 7: - user = _context.sent; - userId = user[User.idAttribute]; + case 7: + user = _context.sent; + userId = user[User.idAttribute]; - assert.debug('created', User.name, user); + assert.debug('created', User.name, user); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); - case 15: - updatedUser = _context.sent; + case 15: + updatedUser = _context.sent; - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Johnny'); - assert.equal(updatedUser[User.idAttribute], userId); + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); - assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); - args = adapter.afterUpdate.firstCall.args; + args = adapter.beforeUpdate.firstCall.args; - assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); - assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); - assert.isDefined(args[3], 'afterUpdate should have received options'); - assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); - assert.isDefined(args[4], 'afterUpdate should have received updated record'); - assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); - assert.equal(args[4].name, 'Johnny', 'args[4].name'); - adapter.afterUpdate.restore(); + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); - case 31: - case 'end': - return _context.stop(); - } + case 27: + case 'end': + return _context.stop(); } - }, _callee, this); - }))); - it('should receive raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, userId, result, args; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + } + }, _callee, this); + }))); + it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return { name: 'Sally' }; + }); + + assert.debug('create', User.name, props); + _context2.next = 7; + return adapter.create(User, props); + + case 7: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context2.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context2.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Sally'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); + + case 27: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return Promise.resolve(); + }); + + assert.debug('create', User.name, props); + _context3.next = 7; + return adapter.create(User, props); + + case 7: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context3.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context3.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); + + case 27: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, props, user, userId, updatedUser, args; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + assert.isDefined(opts, 'beforeUpdate should have received options'); + assert.equal(opts.op, 'beforeUpdate', 'opts.op'); + return Promise.resolve({ name: 'Sally' }); + }); + + assert.debug('create', User.name, props); + _context4.next = 7; + return adapter.create(User, props); + + case 7: + user = _context4.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, userId, { name: 'Johnny' }); + _context4.next = 15; + return adapter.update(User, userId, { name: 'Johnny' }); + + case 15: + updatedUser = _context4.sent; + + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Sally'); + assert.equal(updatedUser[User.idAttribute], userId); + + assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + + args = adapter.beforeUpdate.firstCall.args; + + assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); + assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); + assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); + assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); + assert.isObject(args[3], 'beforeUpdate should have received options'); + adapter.beforeUpdate.restore(); + + case 27: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); +}; + +/* global assert:true */ +var countTest = function (options) { + describe('Adapter#count', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.count), 'function', 'adapter should have a "count" method'); + }); + it('should count users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, count, user, user2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'afterUpdate should have received options'); - assert.equal(opts.op, 'afterUpdate', 'opts.op'); - }); + assert.debug('count', User.name, {}); + _context.next = 6; + return adapter.count(User); - assert.debug('create', User.name, props); - _context2.next = 7; - return adapter.create(User, props); + case 6: + count = _context.sent; - case 7: - user = _context2.sent; - userId = user[User.idAttribute]; + assert.debug('counted', User.name, count); + assert.equal(count, 0); - assert.debug('created', User.name, user); + assert.debug('count', User.name, { name: 'John' }); + _context.next = 12; + return adapter.count(User, { name: 'John' }); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + case 12: + count = _context.sent; - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context2.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }, { raw: true }); + assert.debug('counted', User.name, count); + assert.equal(count, 0); - case 15: - result = _context2.sent; + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 18; + return adapter.count(User, { name: 'Sally' }); - assert.debug('updated', User.name, result); - assert.isDefined(result.data, 'result.data'); - assert.equal(result.data.name, 'Johnny', result.data.name); - assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); + case 18: + count = _context.sent; - assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + assert.debug('counted', User.name, count); + assert.equal(count, 0); - args = adapter.afterUpdate.firstCall.args; + assert.debug('create', User.name, props); + _context.next = 24; + return adapter.create(User, props); - assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); - assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); - assert.isDefined(args[3], 'afterUpdate should have received options'); - assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); - assert.isDefined(args[4], 'afterUpdate should have received update result'); - assert.equal(args[4].updated, 1, 'args[4].updated'); - assert.isDefined(args[4].data, 'args[4].data'); - assert.equal(args[4].data[User.idAttribute], userId, 'args[4].data.' + User.idAttribute); - assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name'); - adapter.afterUpdate.restore(); + case 24: + user = _context.sent; - case 34: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - }))); - it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('created', User.name, user); + assert.debug('count', User.name, {}); + _context.next = 29; + return adapter.count(User); - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'afterUpdate should have received options'); - assert.equal(opts.op, 'afterUpdate', 'opts.op'); - return 'foo'; - }); + case 29: + count = _context.sent; - assert.debug('create', User.name, props); - _context3.next = 7; - return adapter.create(User, props); + assert.debug('counted', User.name, count); + assert.equal(count, 1); - case 7: - user = _context3.sent; - userId = user[User.idAttribute]; + assert.debug('count', User.name, { name: 'John' }); + _context.next = 35; + return adapter.count(User, { name: 'John' }); - assert.debug('created', User.name, user); + case 35: + count = _context.sent; - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.debug('counted', User.name, count); + assert.equal(count, 1); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context3.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 41; + return adapter.count(User, { name: 'Sally' }); - case 15: - updatedUser = _context3.sent; + case 41: + count = _context.sent; - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + assert.debug('counted', User.name, count); + assert.equal(count, 0); - assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 47; + return adapter.create(User, { name: 'Sally' }); - args = adapter.afterUpdate.firstCall.args; + case 47: + user2 = _context.sent; - assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); - assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); - assert.isDefined(args[3], 'afterUpdate should have received options'); - assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); - assert.isDefined(args[4], 'afterUpdate should have received updated record'); - assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); - assert.equal(args[4].name, 'Johnny', 'args[4].name'); - adapter.afterUpdate.restore(); + assert.debug('created', User.name, user2); - case 30: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - }))); - it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('count', User.name, {}); + _context.next = 52; + return adapter.count(User); + case 52: + count = _context.sent; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'afterUpdate should have received options'); - assert.equal(opts.op, 'afterUpdate', 'opts.op'); - return Promise.resolve(); - }); + assert.debug('counted', User.name, count); + assert.equal(count, 2); - assert.debug('create', User.name, props); - _context4.next = 7; - return adapter.create(User, props); + assert.debug('count', User.name, { name: 'John' }); + _context.next = 58; + return adapter.count(User, { name: 'John' }); - case 7: - user = _context4.sent; - userId = user[User.idAttribute]; + case 58: + count = _context.sent; - assert.debug('created', User.name, user); + assert.debug('counted', User.name, count); + assert.equal(count, 1); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.debug('count', User.name, { name: 'Sally' }); + _context.next = 64; + return adapter.count(User, { name: 'Sally' }); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context4.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + case 64: + count = _context.sent; - case 15: - updatedUser = _context4.sent; + assert.debug('counted', User.name, count); + assert.equal(count, 1); - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Johnny'); - assert.equal(updatedUser[User.idAttribute], userId); + case 67: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should count users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); - args = adapter.afterUpdate.firstCall.args; + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); - assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); - assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); - assert.isDefined(args[3], 'afterUpdate should have received options'); - assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); - assert.isDefined(args[4], 'afterUpdate should have received updated record'); - assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); - assert.equal(args[4].name, 'Johnny', 'args[4].name'); - adapter.afterUpdate.restore(); + case 6: + user = _context2.sent; - case 31: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('created', User.name, user); + assert.debug('count', User.name, props); + _context2.next = 11; + return adapter.count(User, props, { raw: true }); - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'afterUpdate should have received options'); - assert.equal(opts.op, 'afterUpdate', 'opts.op'); - return Promise.resolve('foo'); - }); + case 11: + result = _context2.sent; - assert.debug('create', User.name, props); - _context5.next = 7; - return adapter.create(User, props); + assert.debug('counted', User.name, result); + assert.equal(result.data, 1, 'result.data'); - case 7: - user = _context5.sent; - userId = user[User.idAttribute]; + case 14: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + }); +}; + +/* global assert:true */ +var createTest = function (options) { + describe('Adapter#create', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.create), 'function', 'adapter should have a "create" method'); + }); + it('should create a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, foundUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - assert.debug('created', User.name, user); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context5.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + case 6: + user = _context.sent; + userId = user[User.idAttribute]; - case 15: - updatedUser = _context5.sent; + assert.debug('created', User.name, user); - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser, 'foo', 'should have received re-assigned value'); + assert.equal(user.name, props.name, 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); - assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once'); + assert.debug('find', User.name, userId); + _context.next = 14; + return adapter.find(User, userId); - args = adapter.afterUpdate.firstCall.args; + case 14: + foundUser = _context.sent; - assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments'); - assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'afterUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props'); - assert.isDefined(args[3], 'afterUpdate should have received options'); - assert.equal(args[3].op, 'afterUpdate', 'args[3].op'); - assert.isDefined(args[4], 'afterUpdate should have received updated record'); - assert.equal(args[4][User.idAttribute], userId, 'args[4].' + User.idAttribute); - assert.equal(args[4].name, 'Johnny', 'args[4].name'); - adapter.afterUpdate.restore(); + assert.debug('found', User.name, foundUser); - case 30: - case 'end': - return _context5.stop(); - } + assert.equal(foundUser.name, props.name, 'foundUser.name'); + assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]'); + assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); + + case 19: + case 'end': + return _context.stop(); } - }, _callee5, this); - }))); + } + }, _callee, this); + }))); + }); +}; + +/* global assert:true */ +var createManyTest = function (options) { + describe('Adapter#createMany', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.createMany), 'function', 'adapter should have a "createMany" method'); }); - } + it('should create multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, user1, user2, users, users3; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + user1 = { name: 'John', age: 20 }; + user2 = { name: 'John', age: 30 }; + + + assert.debug('createMany', User.name, [user1, user2]); + _context.next = 7; + return adapter.createMany(User, [user1, user2]); + + case 7: + users = _context.sent; + + assert.debug('created', User.name, users); + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.isDefined(users[0][User.idAttribute]); + assert.isDefined(users[1][User.idAttribute]); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('findAll', User.name, { age: 20 }); + _context.next = 17; + return adapter.findAll(User, { age: 20 }); + + case 17: + users3 = _context.sent; + + assert.debug('found', User.name, users3); + assert.equal(users3.length, 1); + + case 20: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); +}; + +/* global assert:true */ +var destroyTest = function (options) { + describe('Adapter#destroy', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.destroy), 'function', 'adapter should have a "destroy" method'); + }); + it('should destroy a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + beforeDestroyCalled = false; + afterDestroyCalled = false; + + // Test beforeDestroy and afterDestroy + + adapter.beforeDestroy = function (mapper, id, opts) { + beforeDestroyCalled = true; + assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); + assert.isDefined(id, 'beforeDestroy should have received id argument'); + assert.isObject(opts, 'beforeDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + adapter.afterDestroy = function (mapper, id, opts) { + afterDestroyCalled = true; + assert.isObject(mapper, 'afterDestroy should have received mapper argument'); + assert.isDefined(id, 'afterDestroy should have received id argument'); + assert.isObject(opts, 'afterDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + + assert.debug('destroy', User.name, userId); + _context.next = 16; + return adapter.destroy(User, userId); + + case 16: + destroyedUser = _context.sent; + + assert.debug('destroyed', User.name, destroyedUser); + assert.isUndefined(destroyedUser, 'destroyedUser'); + assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); + assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); + + case 21: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should destroy a user and allow afterDestroy re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + beforeDestroyCalled = false; + afterDestroyCalled = false; + + // Test beforeDestroy and afterDestroy + + adapter.beforeDestroy = function (mapper, id, opts) { + beforeDestroyCalled = true; + assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); + assert.isDefined(id, 'beforeDestroy should have received id argument'); + assert.isObject(opts, 'beforeDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve(); + }; + adapter.afterDestroy = function (mapper, id, opts) { + afterDestroyCalled = true; + assert.isObject(mapper, 'afterDestroy should have received mapper argument'); + assert.isDefined(id, 'afterDestroy should have received id argument'); + assert.isObject(opts, 'afterDestroy should have received opts argument'); + // Test re-assignment + return Promise.resolve('foo'); + }; + + assert.debug('destroy', User.name, userId); + _context2.next = 16; + return adapter.destroy(User, userId, { raw: true }); + + case 16: + destroyedUser = _context2.sent; + + assert.debug('destroyed', User.name, destroyedUser); + assert.equal(destroyedUser, 'foo', 'destroyedUser'); + assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); + assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); + + case 21: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should destroy a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, props, user, userId, result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context3.next = 6; + return adapter.create(User, props); + + case 6: + user = _context3.sent; + userId = user[User.idAttribute]; + + assert.debug('created', User.name, user); + + assert.debug('destroy', User.name, userId); + _context3.next = 12; + return adapter.destroy(User, userId, { raw: true }); + + case 12: + result = _context3.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 1, 'result.deleted'); + } - /* global assert:true */ - function beforeCreateTest (options) { - describe('Adapter#beforeCreate', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.beforeCreate), 'function', 'adapter should have a "beforeCreate" method'); - }); - it('should call beforeCreate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + case 16: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroy', User.name, 'non-existent-id'); + _context4.next = 5; + return adapter.destroy(User, 'non-existent-id'); + + case 5: + result = _context4.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result, 'result'); + + case 8: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroy', User.name, 'non-existent-id'); + _context5.next = 5; + return adapter.destroy(User, 'non-existent-id', { raw: true }); + + case 5: + result = _context5.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 0, 'result.deleted'); + } + + case 9: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); + }); +}; + +/* global assert:true */ +var destroyAllTest = function (options) { + describe('Adapter#destroyAll', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.destroyAll), 'function', 'adapter should have a "destroyAll" method'); + }); + it('should destroy all users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, userId, user2, foundUsers, destroyedUsers; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'beforeCreate should have received options'); - assert.equal(opts.op, 'beforeCreate', 'opts.op'); - }); + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); - assert.debug('create', User.name, props); - _context.next = 7; - return adapter.create(User, props); + case 6: + user = _context.sent; + userId = user[User.idAttribute]; - case 7: - user = _context.sent; + assert.debug('created', User.name, user); - assert.debug('created', User.name, user); + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 12; + return adapter.create(User, { name: 'Sally' }); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + case 12: + user2 = _context.sent; - assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + assert.debug('created', User.name, user2); - args = adapter.beforeCreate.firstCall.args; + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 17; + return adapter.findAll(User, { name: 'John' }); - assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); - assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); - assert.isObject(args[2], 'beforeCreate should have received options'); - adapter.beforeCreate.restore(); + case 17: + foundUsers = _context.sent; - case 18: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 1, 'foundUsers.length'); + assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]'); + assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name'); + assert.debug('destroyAll', User.name, { name: 'John' }); + _context.next = 25; + return adapter.destroyAll(User, { name: 'John' }); - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'beforeCreate should have received options'); - assert.equal(opts.op, 'beforeCreate', 'opts.op'); - return { name: 'Sally' }; - }); + case 25: + destroyedUsers = _context.sent; - assert.debug('create', User.name, props); - _context2.next = 7; - return adapter.create(User, props); + assert.debug('destroyed', User.name, destroyedUsers); + assert.isUndefined(destroyedUsers, 'destroyedUsers'); - case 7: - user = _context2.sent; + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 31; + return adapter.findAll(User, { name: 'John' }); - assert.debug('created', User.name, user); + case 31: + foundUsers = _context.sent; - assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 0); - assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + assert.debug('findAll', User.name, {}); + _context.next = 37; + return adapter.findAll(User, {}); - args = adapter.beforeCreate.firstCall.args; + case 37: + foundUsers = _context.sent; - assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); - assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); - assert.isObject(args[2], 'beforeCreate should have received options'); - adapter.beforeCreate.restore(); + assert.debug('found', User.name, foundUsers); + assert.equal(foundUsers.length, 1); - case 18: - case 'end': - return _context2.stop(); - } + case 40: + case 'end': + return _context.stop(); } - }, _callee2, this); - }))); - it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + } + }, _callee, this); + }))); + it('should destroy users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.debug('destroyAll', User.name, props); + _context2.next = 11; + return adapter.destroyAll(User, props, { raw: true }); + + case 11: + result = _context2.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 1, 'result.deleted'); + } + case 15: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroyAll', User.name, {}); + _context3.next = 5; + return adapter.destroyAll(User, {}); + + case 5: + result = _context3.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result, 'result'); + + case 8: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, User, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('destroyAll', User.name, {}); + _context4.next = 5; + return adapter.destroyAll(User, {}, { raw: true }); + + case 5: + result = _context4.sent; + + assert.debug('destroyed', User.name, result); + assert.isUndefined(result.data, 'result.data'); + if (result.hasOwnProperty('deleted')) { + assert.isDefined(result.deleted, 'result.deleted'); + assert.equal(result.deleted, 0, 'result.deleted'); + } - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'beforeCreate should have received options'); - assert.equal(opts.op, 'beforeCreate', 'opts.op'); - return Promise.resolve(); - }); + case 9: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); +}; + +/* global assert:true */ +var extendTest = function (options) { + describe('Adapter.extend', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.constructor.extend), 'function', 'adapter constructor function should have an "extend" method'); + }); + it('should return a subclass of the adapter class using extend', function () { + var Adapter = this.$$adapter.constructor; - assert.debug('create', User.name, props); - _context3.next = 7; - return adapter.create(User, props); + var SubAdapter = Adapter.extend({ + foo: function foo() { + return 'foo'; + } + }, { + bar: function bar() { + return 'bar'; + } + }); - case 7: - user = _context3.sent; + assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); + try { + assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); + } catch (err) { + assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); + } - assert.debug('created', User.name, user); + var subAdapter = new SubAdapter(); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); + assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); + }); + it('should return a subclass of the adapter class using ES6 classes', function () { + var Adapter = this.$$adapter.constructor; - assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + var SubAdapter = function (_Adapter) { + inherits(SubAdapter, _Adapter); - args = adapter.beforeCreate.firstCall.args; + function SubAdapter() { + classCallCheck(this, SubAdapter); + return possibleConstructorReturn(this, (SubAdapter.__proto__ || Object.getPrototypeOf(SubAdapter)).apply(this, arguments)); + } - assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); - assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); - assert.isDefined(args[2], 'beforeCreate should have received options'); - adapter.beforeCreate.restore(); + createClass(SubAdapter, [{ + key: 'foo', + value: function foo() { + return 'foo'; + } + }], [{ + key: 'bar', + value: function bar() { + return 'bar'; + } + }]); + return SubAdapter; + }(Adapter); + + assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); + try { + assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); + } catch (err) { + try { + assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); + } catch (err) { + var obj = {}; + if (obj.setPrototypeOf) { + throw err; + } + } + } - case 18: - case 'end': - return _context3.stop(); - } + var subAdapter = new SubAdapter(); + + assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); + assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); + }); + }); +}; + +/* global assert:true */ +var findTest = function (options) { + describe('Adapter#find', function () { + var adapter, User, Profile, Post, Comment, Tag; + + beforeEach(function () { + adapter = this.$$adapter; + User = this.$$User; + Profile = this.$$Profile; + Post = this.$$Post; + Comment = this.$$Comment; + Tag = this.$$Tag; + }); + + it('should exist', function () { + assert.equal(_typeof(adapter.find), 'function', 'adapter should have a "find" method'); + }); + + it('should find a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var props, user, userId, beforeFindCalled, afterFindCalled, foundUser, post, postId, comments, foundPost; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user = _context.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + assert.equal(user.name, 'John', 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + + // Test beforeFind and afterFind + beforeFindCalled = false; + afterFindCalled = false; + + adapter.beforeFind = function (mapper, id, opts) { + beforeFindCalled = true; + assert.isObject(mapper, 'beforeFind should have received mapper argument'); + assert.isDefined(id, 'beforeFind should have received id argument'); + assert.equal(id, userId, 'beforeFind should have received correct id argument'); + assert.isObject(opts, 'beforeFind should have received opts argument'); + // Optionally return a promise for async + return Promise.resolve(); + }; + adapter.afterFind = function (mapper, id, opts, record) { + afterFindCalled = true; + assert.isObject(mapper, 'afterFind should have received mapper argument'); + assert.isDefined(id, 'afterFind should have received id argument'); + assert.equal(id, userId, 'afterFind should have received correct id argument'); + assert.isObject(opts, 'afterFind should have received opts argument'); + assert.isObject(record, 'afterFind should have received record argument'); + // Optionally return a promise for async + return Promise.resolve(); + }; + + assert.debug('find', User.name, userId); + _context.next = 18; + return adapter.find(User, userId); + + case 18: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'John', 'name of found user should be "John"'); + assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id'); + assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); + assert.isTrue(afterFindCalled, 'afterFind should have been called'); + + // should allow re-assignment + beforeFindCalled = false; + afterFindCalled = false; + adapter.afterFind = function (mapper, id, opts, record) { + afterFindCalled = true; + assert.isObject(mapper, 'afterFind should have received mapper argument'); + assert.isDefined(id, 'afterFind should have received id argument'); + assert.equal(id, userId, 'afterFind should have received correct id argument'); + assert.isObject(opts, 'afterFind should have received opts argument'); + assert.isObject(record, 'afterFind should have received record argument'); + // Test re-assignment + return Promise.resolve(defineProperty({ name: 'Sally' }, User.idAttribute, userId)); + }; + + assert.debug('find', User.name, userId); + _context.next = 30; + return adapter.find(User, userId); + + case 30: + foundUser = _context.sent; + + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'Sally', 'foundUser.name'); + assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); + assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); + assert.isTrue(afterFindCalled, 'afterFind should have been called'); + // clear hooks + delete adapter.beforeFind; + delete adapter.afterFind; + + props = { content: 'test', userId: userId }; + assert.debug('create', Post.name, props); + _context.next = 42; + return adapter.create(Post, props); + + case 42: + post = _context.sent; + + assert.debug('created', Post.name, post); + postId = post[Post.idAttribute]; + + + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]'); + assert.equal(post.userId, userId, 'post.userId'); + + props = [{ + content: 'test2', + postId: postId, + userId: userId + }, { + content: 'test3', + postId: postId, + userId: userId + }]; + assert.debug('create', Comment.name, props); + _context.next = 52; + return Promise.all([adapter.create(Comment, props[0]), adapter.create(Comment, props[1])]); + + case 52: + comments = _context.sent; + + assert.debug('created', Comment.name, comments); + + comments.sort(function (a, b) { + return a.content > b.content; + }); + + assert.debug('find', Post.name, postId); + _context.next = 58; + return adapter.find(Post, postId, { with: ['user', 'comment'] }); + + case 58: + foundPost = _context.sent; + + assert.debug('found', Post.name, foundPost); + foundPost.comments.sort(function (a, b) { + return a.content > b.content; + }); + assert.equalObjects(foundPost.user, user, 'foundPost.user'); + assert.equalObjects(foundPost.comments, comments, 'foundPost.comments'); + + case 63: + case 'end': + return _context.stop(); } - }, _callee3, this); - }))); - it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, props, user, args; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + } + }, _callee, this); + }))); + + it('should return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var props, user, userId, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context2.next = 4; + return adapter.create(User, props); + + case 4: + user = _context2.sent; + + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; + + assert.equal(user.name, 'John', 'user.name'); + assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + + assert.debug('find', User.name, userId); + _context2.next = 12; + return adapter.find(User, userId, { raw: true }); + + case 12: + result = _context2.sent; + + assert.debug('found', User.name, result); + assert.isDefined(result.data, 'result.data'); + assert.isDefined(result.found, 'result.found'); + assert.equal(result.data.name, 'John', 'result.data.name'); + assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); + assert.equal(result.found, 1, 'result.found'); + + case 19: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + + it('should return nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var result; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + assert.debug('find', User.name, 'non-existent-id'); + _context3.next = 3; + return adapter.find(User, 'non-existent-id'); + + case 3: + result = _context3.sent; + + assert.debug('found', User.name, result); + assert.isUndefined(result, 'result'); + + case 6: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + }))); + + it('should return raw and nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + assert.debug('find', User.name, 'non-existent-id'); + _context4.next = 3; + return adapter.find(User, 'non-existent-id', { raw: true }); + + case 3: + result = _context4.sent; + + assert.debug('found', User.name, result); + assert.isUndefined(result.data, 'result.data'); + assert.isDefined(result.found, 'result.found'); + assert.equal(result.found, 0, 'result.found'); + + case 8: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { + var props, user, profile, post, comment; + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { - assert.isDefined(opts, 'beforeCreate should have received options'); - assert.equal(opts.op, 'beforeCreate', 'opts.op'); - return Promise.resolve({ name: 'Sally' }); - }); + assert.debug('create', User.name, props); + _context5.next = 7; + return adapter.create(User, props); - assert.debug('create', User.name, props); - _context4.next = 7; - return adapter.create(User, props); + case 7: + user = _context5.sent; - case 7: - user = _context4.sent; + assert.debug('created', User.name, user); - assert.debug('created', User.name, user); + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context5.next = 13; + return adapter.create(Profile, props); - assert.equal(user.name, 'Sally', 'name of user should be "Sally"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + case 13: + profile = _context5.sent; - assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once'); + assert.debug('created', Profile.name, profile); - args = adapter.beforeCreate.firstCall.args; + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 19; + return adapter.create(Post, props); - assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments'); - assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper'); - assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props'); - assert.isObject(args[2], 'beforeCreate should have received options'); - adapter.beforeCreate.restore(); + case 19: + post = _context5.sent; - case 18: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - }); - } + assert.debug('created', Post.name, post); - /* global assert:true */ - function beforeUpdateTest (options) { - describe('Adapter#beforeUpdate', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.beforeUpdate), 'function', 'adapter should have a "beforeUpdate" method'); - }); - it('should call beforeUpdate', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context5.next = 25; + return adapter.create(Comment, props); + case 25: + comment = _context5.sent; - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'beforeUpdate should have received options'); - assert.equal(opts.op, 'beforeUpdate', 'opts.op'); - }); + assert.debug('created', Comment.name, comment); - assert.debug('create', User.name, props); - _context.next = 7; - return adapter.create(User, props); + assert.debug('find', Comment.name, comment[Comment.idAttribute]); + _context5.next = 30; + return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'post'] }); - case 7: - user = _context.sent; - userId = user[User.idAttribute]; + case 30: + comment = _context5.sent; - assert.debug('created', User.name, user); + assert.debug('found', Comment.name, comment); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + assert.isDefined(comment, 'comment'); + assert.isDefined(comment.post, 'comment.post'); + assert.isDefined(comment.user, 'comment.user'); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + case 35: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + }))); - case 15: - updatedUser = _context.sent; + it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { + var props, user, user2, post, post2, post3, post4; + return regeneratorRuntime.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + props = { name: 'John' }; - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Johnny'); - assert.equal(updatedUser[User.idAttribute], userId); + assert.debug('create', User.name, props); + _context6.next = 6; + return adapter.create(User, props); - assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + case 6: + user = _context6.sent; - args = adapter.beforeUpdate.firstCall.args; + assert.debug('created', User.name, user); - assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeUpdate should have received options'); - adapter.beforeUpdate.restore(); + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context6.next = 12; + return adapter.create(User, props); - case 27: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - it('should allow re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + case 12: + user2 = _context6.sent; + assert.debug('created', User.name, user); - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'beforeUpdate should have received options'); - assert.equal(opts.op, 'beforeUpdate', 'opts.op'); - return { name: 'Sally' }; - }); + props = { status: 'draft', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 18; + return adapter.create(Post, props); - assert.debug('create', User.name, props); - _context2.next = 7; - return adapter.create(User, props); + case 18: + post = _context6.sent; - case 7: - user = _context2.sent; - userId = user[User.idAttribute]; + assert.debug('created', Post.name, post); - assert.debug('created', User.name, user); + props = { status: 'published', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 24; + return adapter.create(Post, props); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + case 24: + post2 = _context6.sent; - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context2.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + assert.debug('created', Post.name, post2); - case 15: - updatedUser = _context2.sent; + props = { status: 'draft', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 30; + return adapter.create(Post, props); - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Sally'); - assert.equal(updatedUser[User.idAttribute], userId); + case 30: + post3 = _context6.sent; - assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + assert.debug('created', Post.name, post3); - args = adapter.beforeUpdate.firstCall.args; + props = { status: 'published', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context6.next = 36; + return adapter.create(Post, props); - assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeUpdate should have received options'); - adapter.beforeUpdate.restore(); + case 36: + post4 = _context6.sent; - case 27: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - }))); - it('should allow returning a promise', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('created', Post.name, post4); + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 41; + return adapter.find(User, user[User.idAttribute], { 'with': ['post'] }); - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'beforeUpdate should have received options'); - assert.equal(opts.op, 'beforeUpdate', 'opts.op'); - return Promise.resolve(); - }); + case 41: + user = _context6.sent; - assert.debug('create', User.name, props); - _context3.next = 7; - return adapter.create(User, props); + assert.debug('found', User.name, user); - case 7: - user = _context3.sent; - userId = user[User.idAttribute]; + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 2, 'user.posts.length'); - assert.debug('created', User.name, user); + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 49; + return adapter.find(User, user[User.idAttribute], { 'with': [{ + relation: 'post', + query: { + status: 'published' + } + }] }); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + case 49: + user = _context6.sent; - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context3.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + assert.debug('found', User.name, user); - case 15: - updatedUser = _context3.sent; + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 1, 'user.posts.length'); - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Johnny'); - assert.equal(updatedUser[User.idAttribute], userId); + assert.debug('find', User.name, user[User.idAttribute]); + _context6.next = 57; + return adapter.find(User, user[User.idAttribute], { 'with': [{ + relation: 'post', + replace: true, + query: { + status: 'published' + } + }] }); - assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + case 57: + user = _context6.sent; - args = adapter.beforeUpdate.firstCall.args; + assert.debug('found', User.name, user); - assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeUpdate should have received options'); - adapter.beforeUpdate.restore(); + assert.isDefined(user, 'user'); + assert.isDefined(user.posts, 'user.posts'); + assert.equal(user.posts.length, 2, 'user.posts.length'); - case 27: - case 'end': - return _context3.stop(); - } + case 62: + case 'end': + return _context6.stop(); } - }, _callee3, this); - }))); - it('should allow returning a promise and re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, props, user, userId, updatedUser, args; - return regeneratorRuntime.wrap(function _callee4$(_context4) { + } + }, _callee6, this); + }))); + + if (options.hasFeature('findBelongsToNested')) { + it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + var props, user, profile, post, comment; + return regeneratorRuntime.wrap(function _callee7$(_context7) { while (1) { - switch (_context4.prev = _context4.next) { + switch (_context7.prev = _context7.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); props = { name: 'John' }; - - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { - assert.isDefined(opts, 'beforeUpdate should have received options'); - assert.equal(opts.op, 'beforeUpdate', 'opts.op'); - return Promise.resolve({ name: 'Sally' }); - }); - assert.debug('create', User.name, props); - _context4.next = 7; + _context7.next = 7; return adapter.create(User, props); case 7: - user = _context4.sent; - userId = user[User.idAttribute]; + user = _context7.sent; assert.debug('created', User.name, user); - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context7.next = 13; + return adapter.create(Profile, props); - assert.debug('update', User.name, userId, { name: 'Johnny' }); - _context4.next = 15; - return adapter.update(User, userId, { name: 'Johnny' }); + case 13: + profile = _context7.sent; - case 15: - updatedUser = _context4.sent; + assert.debug('created', Profile.name, profile); - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Sally'); - assert.equal(updatedUser[User.idAttribute], userId); + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 19; + return adapter.create(Post, props); - assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once'); + case 19: + post = _context7.sent; - args = adapter.beforeUpdate.firstCall.args; + assert.debug('created', Post.name, post); - assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments'); - assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper'); - assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id'); - assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props'); - assert.isObject(args[3], 'beforeUpdate should have received options'); - adapter.beforeUpdate.restore(); + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 25; + return adapter.create(Comment, props); - case 27: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - }); - } + case 25: + comment = _context7.sent; - /* global assert:true */ - function countTest (options) { - describe('Adapter#count', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.count), 'function', 'adapter should have a "count" method'); - }); - it('should count users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, count, user, user2; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('created', Comment.name, comment); + assert.debug('find', Comment.name, comment[Comment.idAttribute]); + _context7.next = 30; + return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'user.profile', 'post', 'post.user'] }); - assert.debug('count', User.name, {}); - _context.next = 6; - return adapter.count(User); + case 30: + comment = _context7.sent; - case 6: - count = _context.sent; + assert.debug('found', Comment.name, comment); - assert.debug('counted', User.name, count); - assert.equal(count, 0); + assert.isDefined(comment, 'comment'); + assert.isDefined(comment.post, 'comment.post'); + assert.isDefined(comment.post.user, 'comment.post.user'); + assert.isDefined(comment.user, 'comment.user'); + assert.isDefined(comment.user.profile, 'comment.user.profile'); - assert.debug('count', User.name, { name: 'John' }); - _context.next = 12; - return adapter.count(User, { name: 'John' }); + case 37: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + }))); + } - case 12: - count = _context.sent; + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { + var props, user, profile, post, postId, comment; + return regeneratorRuntime.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; - assert.debug('counted', User.name, count); - assert.equal(count, 0); + assert.debug('create', User.name, props); + _context8.next = 7; + return adapter.create(User, props); - assert.debug('count', User.name, { name: 'Sally' }); - _context.next = 18; - return adapter.count(User, { name: 'Sally' }); + case 7: + user = _context8.sent; - case 18: - count = _context.sent; + assert.debug('created', User.name, user); - assert.debug('counted', User.name, count); - assert.equal(count, 0); + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context8.next = 13; + return adapter.create(Profile, props); - assert.debug('create', User.name, props); - _context.next = 24; - return adapter.create(User, props); + case 13: + profile = _context8.sent; - case 24: - user = _context.sent; + assert.debug('created', Profile.name, profile); - assert.debug('created', User.name, user); + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context8.next = 19; + return adapter.create(Post, props); - assert.debug('count', User.name, {}); - _context.next = 29; - return adapter.count(User); + case 19: + post = _context8.sent; + postId = post[Post.idAttribute]; - case 29: - count = _context.sent; + assert.debug('created', Post.name, post); - assert.debug('counted', User.name, count); - assert.equal(count, 1); + props = { content: 'test2', postId: postId, userId: post.userId }; + assert.debug('create', Comment.name, props); + _context8.next = 26; + return adapter.create(Comment, props); - assert.debug('count', User.name, { name: 'John' }); - _context.next = 35; - return adapter.count(User, { name: 'John' }); + case 26: + comment = _context8.sent; - case 35: - count = _context.sent; + assert.debug('created', Comment.name, comment); - assert.debug('counted', User.name, count); - assert.equal(count, 1); + assert.debug('find', Post.name, postId); + _context8.next = 31; + return adapter.find(Post, postId, { 'with': ['user', 'comment'] }); - assert.debug('count', User.name, { name: 'Sally' }); - _context.next = 41; - return adapter.count(User, { name: 'Sally' }); + case 31: + post = _context8.sent; - case 41: - count = _context.sent; + assert.debug('found', Post.name, post); - assert.debug('counted', User.name, count); - assert.equal(count, 0); + assert.isDefined(post.comments, 'post.comments'); + assert.isDefined(post.user, 'post.user'); - assert.debug('create', User.name, { name: 'Sally' }); - _context.next = 47; - return adapter.create(User, { name: 'Sally' }); + case 35: + case 'end': + return _context8.stop(); + } + } + }, _callee8, this); + }))); - case 47: - user2 = _context.sent; + if (options.hasFeature('findBelongsToHasManyNested')) { + it('should load hasMany and belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + var props, user, profile, post, postId, comment; + return regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Comment'); + this.toClear.push('Profile'); + props = { name: 'John' }; - assert.debug('created', User.name, user2); + assert.debug('create', User.name, props); + _context9.next = 7; + return adapter.create(User, props); - assert.debug('count', User.name, {}); - _context.next = 52; - return adapter.count(User); + case 7: + user = _context9.sent; - case 52: - count = _context.sent; + assert.debug('created', User.name, user); - assert.debug('counted', User.name, count); - assert.equal(count, 2); - - assert.debug('count', User.name, { name: 'John' }); - _context.next = 58; - return adapter.count(User, { name: 'John' }); - - case 58: - count = _context.sent; + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context9.next = 13; + return adapter.create(Profile, props); - assert.debug('counted', User.name, count); - assert.equal(count, 1); + case 13: + profile = _context9.sent; - assert.debug('count', User.name, { name: 'Sally' }); - _context.next = 64; - return adapter.count(User, { name: 'Sally' }); + assert.debug('created', Profile.name, profile); - case 64: - count = _context.sent; + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context9.next = 19; + return adapter.create(Post, props); - assert.debug('counted', User.name, count); - assert.equal(count, 1); + case 19: + post = _context9.sent; + postId = post[Post.idAttribute]; - case 67: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - it('should count users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, result; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('created', Post.name, post); + props = { content: 'test2', postId: postId, userId: post.userId }; + assert.debug('create', Comment.name, props); + _context9.next = 26; + return adapter.create(Comment, props); - assert.debug('create', User.name, props); - _context2.next = 6; - return adapter.create(User, props); + case 26: + comment = _context9.sent; - case 6: - user = _context2.sent; + assert.debug('created', Comment.name, comment); - assert.debug('created', User.name, user); + assert.debug('find', Post.name, postId); + _context9.next = 31; + return adapter.find(Post, postId, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); - assert.debug('count', User.name, props); - _context2.next = 11; - return adapter.count(User, props, { raw: true }); + case 31: + post = _context9.sent; - case 11: - result = _context2.sent; + assert.debug('found', Post.name, post); - assert.debug('counted', User.name, result); - assert.equal(result.data, 1, 'result.data'); + assert.isDefined(post.comments, 'post.comments'); + assert.isDefined(post.comments[0].user, 'post.comments[0].user'); + assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile'); + assert.isDefined(post.user, 'post.user'); - case 14: + case 37: case 'end': - return _context2.stop(); + return _context9.stop(); } } - }, _callee2, this); + }, _callee9, this); }))); - }); - } + } - /* global assert:true */ - function createTest (options) { - describe('Adapter#create', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.create), 'function', 'adapter should have a "create" method'); - }); - it('should create a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, userId, foundUser; - return regeneratorRuntime.wrap(function _callee$(_context) { + if (options.hasFeature('findHasManyLocalKeys')) { + it('should load hasMany localKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + var props, tag, tag2, post, postId; + return regeneratorRuntime.wrap(function _callee10$(_context10) { while (1) { - switch (_context.prev = _context.next) { + switch (_context10.prev = _context10.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); + assert.debug('create', Tag.name, props); + _context10.next = 6; + return adapter.create(Tag, props); case 6: - user = _context.sent; - userId = user[User.idAttribute]; - - assert.debug('created', User.name, user); + tag = _context10.sent; - assert.equal(user.name, props.name, 'user.name'); - assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); + assert.debug('created', Tag.name, tag); - assert.debug('find', User.name, userId); - _context.next = 14; - return adapter.find(User, userId); + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context10.next = 12; + return adapter.create(Tag, props); - case 14: - foundUser = _context.sent; - - assert.debug('found', User.name, foundUser); - - assert.equal(foundUser.name, props.name, 'foundUser.name'); - assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]'); - assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); - - case 19: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - }); - } + case 12: + tag2 = _context10.sent; - /* global assert:true */ - function createManyTest (options) { - describe('Adapter#createMany', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.createMany), 'function', 'adapter should have a "createMany" method'); - }); - it('should create multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, user1, user2, users, users3; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - user1 = { name: 'John', age: 20 }; - user2 = { name: 'John', age: 30 }; + assert.debug('created', Tag.name, tag2); + props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }; + assert.debug('create', Post.name, props); + _context10.next = 18; + return adapter.create(Post, props); - assert.debug('createMany', User.name, [user1, user2]); - _context.next = 7; - return adapter.createMany(User, [user1, user2]); + case 18: + post = _context10.sent; + postId = post[Post.idAttribute]; - case 7: - users = _context.sent; + assert.debug('created', Post.name, post); - assert.debug('created', User.name, users); - users.sort(function (a, b) { - return a.age - b.age; - }); - assert.isDefined(users[0][User.idAttribute]); - assert.isDefined(users[1][User.idAttribute]); - assert.equal(users.filter(function (x) { - return x.age === 20; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.age === 30; - }).length, 1); + assert.debug('find', Post.name, postId); + _context10.next = 24; + return adapter.find(Post, postId, { 'with': ['tag'] }); - assert.debug('findAll', User.name, { age: 20 }); - _context.next = 17; - return adapter.findAll(User, { age: 20 }); + case 24: + post = _context10.sent; - case 17: - users3 = _context.sent; + assert.debug('found', Post.name, post); - assert.debug('found', User.name, users3); - assert.equal(users3.length, 1); + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); + assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); - case 20: + case 30: case 'end': - return _context.stop(); + return _context10.stop(); } } - }, _callee, this); + }, _callee10, this); }))); - }); - } - - /* global assert:true */ - function destroyTest (options) { - describe('Adapter#destroy', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.destroy), 'function', 'adapter should have a "destroy" method'); - }); - it('should destroy a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; - return regeneratorRuntime.wrap(function _callee$(_context) { + it('should load hasMany localKeys (empty array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + var props, post, postId; + return regeneratorRuntime.wrap(function _callee11$(_context11) { while (1) { - switch (_context.prev = _context.next) { + switch (_context11.prev = _context11.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - + this.toClear.push('Post'); + props = { content: 'test' }; - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); + assert.debug('create', Post.name, props); + _context11.next = 5; + return adapter.create(Post, props); - case 6: - user = _context.sent; - userId = user[User.idAttribute]; + case 5: + post = _context11.sent; + postId = post[Post.idAttribute]; - assert.debug('created', User.name, user); + assert.debug('created', Post.name, post); - beforeDestroyCalled = false; - afterDestroyCalled = false; + assert.debug('find', Post.name, postId); + _context11.next = 11; + return adapter.find(Post, postId, { 'with': ['tag'] }); - // Test beforeDestroy and afterDestroy + case 11: + post = _context11.sent; - adapter.beforeDestroy = function (mapper, id, opts) { - beforeDestroyCalled = true; - assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); - assert.isDefined(id, 'beforeDestroy should have received id argument'); - assert.isObject(opts, 'beforeDestroy should have received opts argument'); - // Test re-assignment - return Promise.resolve(); - }; - adapter.afterDestroy = function (mapper, id, opts) { - afterDestroyCalled = true; - assert.isObject(mapper, 'afterDestroy should have received mapper argument'); - assert.isDefined(id, 'afterDestroy should have received id argument'); - assert.isObject(opts, 'afterDestroy should have received opts argument'); - // Test re-assignment - return Promise.resolve(); - }; + assert.debug('found', Post.name, post); - assert.debug('destroy', User.name, userId); - _context.next = 16; - return adapter.destroy(User, userId); + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.deepEqual(post.tags, [], 'post.tags'); case 16: - destroyedUser = _context.sent; - - assert.debug('destroyed', User.name, destroyedUser); - assert.isUndefined(destroyedUser, 'destroyedUser'); - assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); - assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); - - case 21: case 'end': - return _context.stop(); + return _context11.stop(); } } - }, _callee, this); + }, _callee11, this); }))); - it('should destroy a user and allow afterDestroy re-assignment', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, userId, beforeDestroyCalled, afterDestroyCalled, destroyedUser; - return regeneratorRuntime.wrap(function _callee2$(_context2) { + it('should load hasMany localKeys (object) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + var _tagIds; + + var props, tag, tag2, post, postId; + return regeneratorRuntime.wrap(function _callee12$(_context12) { while (1) { - switch (_context2.prev = _context2.next) { + switch (_context12.prev = _context12.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; - assert.debug('create', User.name, props); - _context2.next = 6; - return adapter.create(User, props); + assert.debug('create', Tag.name, props); + _context12.next = 6; + return adapter.create(Tag, props); case 6: - user = _context2.sent; - userId = user[User.idAttribute]; + tag = _context12.sent; - assert.debug('created', User.name, user); + assert.debug('created', Tag.name, tag); + + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context12.next = 12; + return adapter.create(Tag, props); - beforeDestroyCalled = false; - afterDestroyCalled = false; + case 12: + tag2 = _context12.sent; - // Test beforeDestroy and afterDestroy + assert.debug('created', Tag.name, tag2); - adapter.beforeDestroy = function (mapper, id, opts) { - beforeDestroyCalled = true; - assert.isObject(mapper, 'beforeDestroy should have received mapper argument'); - assert.isDefined(id, 'beforeDestroy should have received id argument'); - assert.isObject(opts, 'beforeDestroy should have received opts argument'); - // Test re-assignment - return Promise.resolve(); - }; - adapter.afterDestroy = function (mapper, id, opts) { - afterDestroyCalled = true; - assert.isObject(mapper, 'afterDestroy should have received mapper argument'); - assert.isDefined(id, 'afterDestroy should have received id argument'); - assert.isObject(opts, 'afterDestroy should have received opts argument'); - // Test re-assignment - return Promise.resolve('foo'); - }; + props = { content: 'test', tagIds: (_tagIds = {}, defineProperty(_tagIds, tag[Tag.idAttribute], true), defineProperty(_tagIds, tag2[Tag.idAttribute], true), _tagIds) }; + assert.debug('create', Post.name, props); + _context12.next = 18; + return adapter.create(Post, props); - assert.debug('destroy', User.name, userId); - _context2.next = 16; - return adapter.destroy(User, userId, { raw: true }); + case 18: + post = _context12.sent; + postId = post[Post.idAttribute]; - case 16: - destroyedUser = _context2.sent; + assert.debug('created', Post.name, post); + + assert.debug('find', Post.name, postId); + _context12.next = 24; + return adapter.find(Post, postId, { 'with': ['tag'] }); + + case 24: + post = _context12.sent; + + assert.debug('found', Post.name); - assert.debug('destroyed', User.name, destroyedUser); - assert.equal(destroyedUser, 'foo', 'destroyedUser'); - assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called'); - assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called'); + assert.isDefined(post.tags, 'post.tags'); + assert.equal(post.content, 'test', 'post.content'); + assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); + assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); - case 21: + case 30: case 'end': - return _context2.stop(); + return _context12.stop(); } } - }, _callee2, this); + }, _callee12, this); }))); - it('should destroy a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, props, user, userId, result; - return regeneratorRuntime.wrap(function _callee3$(_context3) { + } + + if (options.hasFeature('findHasManyForeignKeys')) { + it('should load hasMany foreignKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + var props, tag, tagId, tag2, tag2Id, post, post2; + return regeneratorRuntime.wrap(function _callee13$(_context13) { while (1) { - switch (_context3.prev = _context3.next) { + switch (_context13.prev = _context13.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - + this.toClear.push('Post'); + this.toClear.push('Tag'); + props = { value: 'big data' }; - assert.debug('create', User.name, props); - _context3.next = 6; - return adapter.create(User, props); + assert.debug('create', Tag.name, props); + _context13.next = 6; + return adapter.create(Tag, props); case 6: - user = _context3.sent; - userId = user[User.idAttribute]; + tag = _context13.sent; + tagId = tag[Tag.idAttribute]; - assert.debug('created', User.name, user); + assert.debug('created', Tag.name, tag); - assert.debug('destroy', User.name, userId); - _context3.next = 12; - return adapter.destroy(User, userId, { raw: true }); + props = { value: 'servers' }; + assert.debug('create', Tag.name, props); + _context13.next = 13; + return adapter.create(Tag, props); - case 12: - result = _context3.sent; + case 13: + tag2 = _context13.sent; + tag2Id = tag2[Tag.idAttribute]; - assert.debug('destroyed', User.name, result); - assert.isUndefined(result.data, 'result.data'); - if (result.hasOwnProperty('deleted')) { - assert.isDefined(result.deleted, 'result.deleted'); - assert.equal(result.deleted, 1, 'result.deleted'); - } + assert.debug('created', Tag.name, tag2); - case 16: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - }))); - it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, result; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; + props = { content: 'test', tagIds: [tagId] }; + assert.debug('create', Post.name, props); + _context13.next = 20; + return adapter.create(Post, props); + + case 20: + post = _context13.sent; + assert.debug('created', Post.name, post); - assert.debug('destroy', User.name, 'non-existent-id'); - _context4.next = 5; - return adapter.destroy(User, 'non-existent-id'); + props = { content: 'test2', tagIds: [tagId, tag2Id] }; + assert.debug('create', Post.name, props); + _context13.next = 26; + return adapter.create(Post, props); - case 5: - result = _context4.sent; + case 26: + post2 = _context13.sent; - assert.debug('destroyed', User.name, result); - assert.isUndefined(result, 'result'); + assert.debug('created', Post.name, post2); - case 8: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { - var adapter, User, result; - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; + assert.debug('find', Tag.name, tagId); + _context13.next = 31; + return adapter.find(Tag, tagId, { 'with': ['post'] }); + case 31: + tag = _context13.sent; - assert.debug('destroy', User.name, 'non-existent-id'); - _context5.next = 5; - return adapter.destroy(User, 'non-existent-id', { raw: true }); + assert.debug('found', Tag.name, tag); - case 5: - result = _context5.sent; + assert.isDefined(tag.posts, 'tag.posts'); + assert.equal(tag.value, 'big data', 'tag.value'); + assert.equal(tag.posts.length, 2, 'tag.posts.length'); - assert.debug('destroyed', User.name, result); - assert.isUndefined(result.data, 'result.data'); - if (result.hasOwnProperty('deleted')) { - assert.isDefined(result.deleted, 'result.deleted'); - assert.equal(result.deleted, 0, 'result.deleted'); - } + assert.debug('find', Tag.name, tag2Id); + _context13.next = 39; + return adapter.find(Tag, tag2Id, { 'with': ['post'] }); - case 9: + case 39: + tag2 = _context13.sent; + + assert.debug('found', Tag.name, tag2); + + assert.isDefined(tag2.posts, 'tag2.posts'); + assert.equal(tag2.value, 'servers', 'tag2.value'); + assert.equal(tag2.posts.length, 1, 'tag2.posts.length'); + assert.objectsEqual(tag2.posts, [post2], 'tag2.posts'); + + case 45: case 'end': - return _context5.stop(); + return _context13.stop(); } } - }, _callee5, this); + }, _callee13, this); }))); + } + }); +}; + +/* global assert:true */ +var findAllTest = function (options) { + describe('Adapter#findAll', function () { + var adapter, User, Profile, Post, Comment; + + beforeEach(function () { + adapter = this.$$adapter; + User = this.$$User; + Profile = this.$$Profile; + Post = this.$$Post; + Comment = this.$$Comment; }); - } - - /* global assert:true */ - function destroyAllTest (options) { - describe('Adapter#destroyAll', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.destroyAll), 'function', 'adapter should have a "destroyAll" method'); - }); - it('should destroy all users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, userId, user2, foundUsers, destroyedUsers; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + it('should exist', function () { + assert.equal(_typeof(adapter.findAll), 'function', 'adapter should have a "findAll" method'); + }); - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); - - case 6: - user = _context.sent; - userId = user[User.idAttribute]; + it('should filter users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var props, users, user, userId, users2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + props = { name: 'John' }; - assert.debug('created', User.name, user); + assert.debug('findAll', User.name, { age: 30 }); + _context.next = 4; + return adapter.findAll(User, { age: 30 }); - assert.debug('create', User.name, { name: 'Sally' }); - _context.next = 12; - return adapter.create(User, { name: 'Sally' }); + case 4: + users = _context.sent; - case 12: - user2 = _context.sent; + assert.debug('found', User.name, users); + assert.equal(users.length, 0, 'users.length'); - assert.debug('created', User.name, user2); + assert.debug('create', User.name, props); + _context.next = 10; + return adapter.create(User, props); - assert.debug('findAll', User.name, { name: 'John' }); - _context.next = 17; - return adapter.findAll(User, { name: 'John' }); + case 10: + user = _context.sent; - case 17: - foundUsers = _context.sent; + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; - assert.debug('found', User.name, foundUsers); - assert.equal(foundUsers.length, 1, 'foundUsers.length'); - assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]'); - assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name'); - assert.debug('destroyAll', User.name, { name: 'John' }); - _context.next = 25; - return adapter.destroyAll(User, { name: 'John' }); + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 16; + return adapter.findAll(User, { name: 'John' }); - case 25: - destroyedUsers = _context.sent; + case 16: + users2 = _context.sent; - assert.debug('destroyed', User.name, destroyedUsers); - assert.isUndefined(destroyedUsers, 'destroyedUsers'); + assert.debug('found', User.name, users2); - assert.debug('findAll', User.name, { name: 'John' }); - _context.next = 31; - return adapter.findAll(User, { name: 'John' }); + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', users2[0].name); - case 31: - foundUsers = _context.sent; + case 21: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); - assert.debug('found', User.name, foundUsers); - assert.equal(foundUsers.length, 0); + it('should filter users with raw option', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var props, result, users, user, userId, result2, users2; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + props = { name: 'John' }; - assert.debug('findAll', User.name, {}); - _context.next = 37; - return adapter.findAll(User, {}); + assert.debug('findAll', User.name, { age: 30 }); + _context2.next = 4; + return adapter.findAll(User, { age: 30 }, { raw: true }); - case 37: - foundUsers = _context.sent; + case 4: + result = _context2.sent; + users = result.data; - assert.debug('found', User.name, foundUsers); - assert.equal(foundUsers.length, 1); + assert.debug('found', User.name, users); + assert.equal(users.length, 0, 'users.length'); - case 40: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - it('should destroy users and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, result; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; + assert.debug('create', User.name, props); + _context2.next = 11; + return adapter.create(User, props); + case 11: + user = _context2.sent; - assert.debug('create', User.name, props); - _context2.next = 6; - return adapter.create(User, props); + assert.debug('created', User.name, user); + userId = user[User.idAttribute]; - case 6: - user = _context2.sent; - assert.debug('created', User.name, user); + assert.debug('findAll', User.name, { name: 'John' }); + _context2.next = 17; + return adapter.findAll(User, { name: 'John' }, { raw: true }); - assert.debug('destroyAll', User.name, props); - _context2.next = 11; - return adapter.destroyAll(User, props, { raw: true }); + case 17: + result2 = _context2.sent; + users2 = result2.data; - case 11: - result = _context2.sent; + assert.debug('found', User.name, users2); - assert.debug('destroyed', User.name, result); - assert.isUndefined(result.data, 'result.data'); - if (result.hasOwnProperty('deleted')) { - assert.isDefined(result.deleted, 'result.deleted'); - assert.equal(result.deleted, 1, 'result.deleted'); - } + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', users2[0].name); - case 15: - case 'end': - return _context2.stop(); - } + case 23: + case 'end': + return _context2.stop(); } - }, _callee2, this); - }))); - it('should destroy nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User, result; + } + }, _callee2, this); + }))); + + if (options.hasFeature('findAllInOp')) { + it('should filter users using the "in" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var users, user, id, users2; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; + _context3.next = 2; + return adapter.findAll(User, { + where: { + age: { + 'in': [30] + } + } + }); + + case 2: + users = _context3.sent; + assert.equal(users.length, 0, 'users.length'); - assert.debug('destroyAll', User.name, {}); - _context3.next = 5; - return adapter.destroyAll(User, {}); + _context3.next = 6; + return adapter.create(User, { name: 'John' }); - case 5: - result = _context3.sent; + case 6: + user = _context3.sent; + id = user[User.idAttribute]; + _context3.next = 10; + return adapter.findAll(User, { name: 'John' }); + + case 10: + users2 = _context3.sent; - assert.debug('destroyed', User.name, result); - assert.isUndefined(result, 'result'); + assert.equal(users2.length, 1, 'users2.length'); + assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]'); + assert.equal(users2[0].name, 'John', 'users2[0].name'); - case 8: + case 14: case 'end': return _context3.stop(); } } }, _callee3, this); }))); - it('should destroy nothing and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, User, result; + } + + if (options.hasFeature('findAllLikeOp')) { + it('should filter users using the "like" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var users, user, id, users2; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: - adapter = this.$$adapter; - User = this.$$User; + _context4.next = 2; + return adapter.findAll(User, { + where: { + name: { + 'like': '%J%' + } + } + }); + case 2: + users = _context4.sent; - assert.debug('destroyAll', User.name, {}); - _context4.next = 5; - return adapter.destroyAll(User, {}, { raw: true }); + assert.equal(users.length, 0); - case 5: - result = _context4.sent; + _context4.next = 6; + return adapter.create(User, { name: 'John' }); - assert.debug('destroyed', User.name, result); - assert.isUndefined(result.data, 'result.data'); - if (result.hasOwnProperty('deleted')) { - assert.isDefined(result.deleted, 'result.deleted'); - assert.equal(result.deleted, 0, 'result.deleted'); - } + case 6: + user = _context4.sent; + id = user.id; + _context4.next = 10; + return adapter.findAll(User, { + where: { + name: { + 'like': '%J%' + } + } + }); - case 9: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - }); - } - - /* global assert:true */ - function extendTest (options) { - describe('Adapter.extend', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.constructor.extend), 'function', 'adapter constructor function should have an "extend" method'); - }); - it('should return a subclass of the adapter class using extend', function () { - var Adapter = this.$$adapter.constructor; - - var SubAdapter = Adapter.extend({ - foo: function foo() { - return 'foo'; - } - }, { - bar: function bar() { - return 'bar'; - } - }); - - assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); - try { - assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); - } catch (err) { - assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); - } - - var subAdapter = new SubAdapter(); - - assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); - assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); - }); - it('should return a subclass of the adapter class using ES6 classes', function () { - var Adapter = this.$$adapter.constructor; - - var SubAdapter = function (_Adapter) { - inherits(SubAdapter, _Adapter); - - function SubAdapter() { - classCallCheck(this, SubAdapter); - return possibleConstructorReturn(this, Object.getPrototypeOf(SubAdapter).apply(this, arguments)); - } - - createClass(SubAdapter, [{ - key: 'foo', - value: function foo() { - return 'foo'; - } - }], [{ - key: 'bar', - value: function bar() { - return 'bar'; - } - }]); - return SubAdapter; - }(Adapter); - - assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return "bar"'); - try { - assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods'); - } catch (err) { - try { - assert.equal(_typeof(SubAdapter.extend), 'function', 'should have same static methods'); - } catch (err) { - var obj = {}; - if (obj.setPrototypeOf) { - throw err; - } - } - } - - var subAdapter = new SubAdapter(); - - assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return "foo"'); - assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods'); - }); - }); - } - - /* global assert:true */ - function findTest (options) { - describe('Adapter#find', function () { - var adapter, User, Profile, Post, Comment, Tag; - - beforeEach(function () { - adapter = this.$$adapter; - User = this.$$User; - Profile = this.$$Profile; - Post = this.$$Post; - Comment = this.$$Comment; - Tag = this.$$Tag; - }); - - it('should exist', function () { - assert.equal(_typeof(adapter.find), 'function', 'adapter should have a "find" method'); - }); - - it('should find a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var props, user, userId, beforeFindCalled, afterFindCalled, foundUser, post, postId, comments, foundPost; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Comment'); - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); - - case 6: - user = _context.sent; - - assert.debug('created', User.name, user); - userId = user[User.idAttribute]; - - assert.equal(user.name, 'John', 'user.name'); - assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); - - // Test beforeFind and afterFind - beforeFindCalled = false; - afterFindCalled = false; - - adapter.beforeFind = function (mapper, id, opts) { - beforeFindCalled = true; - assert.isObject(mapper, 'beforeFind should have received mapper argument'); - assert.isDefined(id, 'beforeFind should have received id argument'); - assert.equal(id, userId, 'beforeFind should have received correct id argument'); - assert.isObject(opts, 'beforeFind should have received opts argument'); - // Optionally return a promise for async - return Promise.resolve(); - }; - adapter.afterFind = function (mapper, id, opts, record) { - afterFindCalled = true; - assert.isObject(mapper, 'afterFind should have received mapper argument'); - assert.isDefined(id, 'afterFind should have received id argument'); - assert.equal(id, userId, 'afterFind should have received correct id argument'); - assert.isObject(opts, 'afterFind should have received opts argument'); - assert.isObject(record, 'afterFind should have received record argument'); - // Optionally return a promise for async - return Promise.resolve(); - }; - - assert.debug('find', User.name, userId); - _context.next = 18; - return adapter.find(User, userId); - - case 18: - foundUser = _context.sent; - - assert.debug('found', User.name, foundUser); - assert.equal(foundUser.name, 'John', 'name of found user should be "John"'); - assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id'); - assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); - assert.isTrue(afterFindCalled, 'afterFind should have been called'); - - // should allow re-assignment - beforeFindCalled = false; - afterFindCalled = false; - adapter.afterFind = function (mapper, id, opts, record) { - afterFindCalled = true; - assert.isObject(mapper, 'afterFind should have received mapper argument'); - assert.isDefined(id, 'afterFind should have received id argument'); - assert.equal(id, userId, 'afterFind should have received correct id argument'); - assert.isObject(opts, 'afterFind should have received opts argument'); - assert.isObject(record, 'afterFind should have received record argument'); - // Test re-assignment - return Promise.resolve(defineProperty({ name: 'Sally' }, User.idAttribute, userId)); - }; - - assert.debug('find', User.name, userId); - _context.next = 30; - return adapter.find(User, userId); - - case 30: - foundUser = _context.sent; - - assert.debug('found', User.name, foundUser); - assert.equal(foundUser.name, 'Sally', 'foundUser.name'); - assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]'); - assert.isTrue(beforeFindCalled, 'beforeFind should have been called'); - assert.isTrue(afterFindCalled, 'afterFind should have been called'); - // clear hooks - delete adapter.beforeFind; - delete adapter.afterFind; - - props = { content: 'test', userId: userId }; - assert.debug('create', Post.name, props); - _context.next = 42; - return adapter.create(Post, props); - - case 42: - post = _context.sent; - - assert.debug('created', Post.name, post); - postId = post[Post.idAttribute]; - - - assert.equal(post.content, 'test', 'post.content'); - assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]'); - assert.equal(post.userId, userId, 'post.userId'); - - props = [{ - content: 'test2', - postId: postId, - userId: userId - }, { - content: 'test3', - postId: postId, - userId: userId - }]; - assert.debug('create', Comment.name, props); - _context.next = 52; - return Promise.all([adapter.create(Comment, props[0]), adapter.create(Comment, props[1])]); - - case 52: - comments = _context.sent; - - assert.debug('created', Comment.name, comments); - - comments.sort(function (a, b) { - return a.content > b.content; - }); - - assert.debug('find', Post.name, postId); - _context.next = 58; - return adapter.find(Post, postId, { with: ['user', 'comment'] }); - - case 58: - foundPost = _context.sent; - - assert.debug('found', Post.name, foundPost); - foundPost.comments.sort(function (a, b) { - return a.content > b.content; - }); - assert.equalObjects(foundPost.user, user, 'foundPost.user'); - assert.equalObjects(foundPost.comments, comments, 'foundPost.comments'); - - case 63: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); - - it('should return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var props, user, userId, result; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context2.next = 4; - return adapter.create(User, props); - - case 4: - user = _context2.sent; - - assert.debug('created', User.name, user); - userId = user[User.idAttribute]; - - assert.equal(user.name, 'John', 'user.name'); - assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]'); - - assert.debug('find', User.name, userId); - _context2.next = 12; - return adapter.find(User, userId, { raw: true }); - - case 12: - result = _context2.sent; - - assert.debug('found', User.name, result); - assert.isDefined(result.data, 'result.data'); - assert.isDefined(result.found, 'result.found'); - assert.equal(result.data.name, 'John', 'result.data.name'); - assert.equal(result.data[User.idAttribute], userId, 'result.data.' + User.idAttribute); - assert.equal(result.found, 1, 'result.found'); - - case 19: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - }))); - - it('should return nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var result; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - assert.debug('find', User.name, 'non-existent-id'); - _context3.next = 3; - return adapter.find(User, 'non-existent-id'); - - case 3: - result = _context3.sent; + case 10: + users2 = _context4.sent; - assert.debug('found', User.name, result); - assert.isUndefined(result, 'result'); + assert.equal(users2.length, 1); + assert.equal(users2[0].id, id); + assert.equal(users2[0].name, 'John'); - case 6: + case 14: case 'end': - return _context3.stop(); + return _context4.stop(); } } - }, _callee3, this); + }, _callee4, this); }))); + } - it('should return raw and nothing', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var result; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - assert.debug('find', User.name, 'non-existent-id'); - _context4.next = 3; - return adapter.find(User, 'non-existent-id', { raw: true }); - - case 3: - result = _context4.sent; - - assert.debug('found', User.name, result); - assert.isUndefined(result.data, 'result.data'); - assert.isDefined(result.found, 'result.found'); - assert.equal(result.found, 0, 'result.found'); - - case 8: - case 'end': - return _context4.stop(); + if (options.hasFeature('findAllOpNotFound')) { + it('should throw "Operator not found" error', function () { + return adapter.findAll(User, { + where: { + name: { + op: 'John' } } - }, _callee4, this); - }))); + }).then(function () { + throw new Error('should have failed!'); + }, function (err) { + assert.equal(err.message, 'Operator op not supported!'); + }); + }); + } + if (options.hasFeature('findAllBelongsTo')) { it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { - var props, user, profile, post, comment; + var props, user, profile, post, comment, user2, post2, comment2, comments; return regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: this.toClear.push('Post'); - this.toClear.push('Comment'); this.toClear.push('Profile'); + this.toClear.push('Comment'); props = { name: 'John' }; assert.debug('create', User.name, props); @@ -2198,20 +3289,51 @@ assert.debug('created', Comment.name, comment); - assert.debug('find', Comment.name, comment[Comment.idAttribute]); - _context5.next = 30; - return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'post'] }); + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context5.next = 31; + return adapter.create(User, props); - case 30: - comment = _context5.sent; + case 31: + user2 = _context5.sent; - assert.debug('found', Comment.name, comment); + assert.debug('created', User.name, user2); - assert.isDefined(comment, 'comment'); - assert.isDefined(comment.post, 'comment.post'); - assert.isDefined(comment.user, 'comment.user'); + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context5.next = 37; + return adapter.create(Post, props); + + case 37: + post2 = _context5.sent; - case 35: + assert.debug('created', Post.name, post2); + + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context5.next = 43; + return adapter.create(Comment, props); + + case 43: + comment2 = _context5.sent; + + assert.debug('created', Comment.name, comment2); + + assert.debug('findAll', Comment.name, {}); + _context5.next = 48; + return adapter.findAll(Comment, {}, { 'with': ['user', 'post'] }); + + case 48: + comments = _context5.sent; + + assert.debug('found', Comment.name, comments); + + assert.isDefined(comments[0].post, 'comments[0].post'); + assert.isDefined(comments[0].user, 'comments[0].user'); + assert.isDefined(comments[1].post, 'comments[1].post'); + assert.isDefined(comments[1].user, 'comments[1].user'); + + case 54: case 'end': return _context5.stop(); } @@ -2220,7 +3342,7 @@ }))); it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { - var props, user, user2, post, post2, post3, post4; + var props, user, user2, post, post2, post3, post4, users; return regeneratorRuntime.wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { @@ -2288,22 +3410,22 @@ assert.debug('created', Post.name, post4); - assert.debug('find', User.name, user[User.idAttribute]); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context6.next = 41; - return adapter.find(User, user[User.idAttribute], { 'with': ['post'] }); + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); case 41: - user = _context6.sent; + users = _context6.sent; - assert.debug('found', User.name, user); + assert.debug('found', User.name, users); - assert.isDefined(user, 'user'); - assert.isDefined(user.posts, 'user.posts'); - assert.equal(user.posts.length, 2, 'user.posts.length'); + assert.isDefined(users, 'users'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 2, 'users[0].posts.length'); - assert.debug('find', User.name, user[User.idAttribute]); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context6.next = 49; - return adapter.find(User, user[User.idAttribute], { 'with': [{ + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', query: { status: 'published' @@ -2311,17 +3433,17 @@ }] }); case 49: - user = _context6.sent; + users = _context6.sent; - assert.debug('found', User.name, user); + assert.debug('found', User.name, users); - assert.isDefined(user, 'user'); - assert.isDefined(user.posts, 'user.posts'); - assert.equal(user.posts.length, 1, 'user.posts.length'); + assert.isDefined(users, 'users'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); - assert.debug('find', User.name, user[User.idAttribute]); + assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); _context6.next = 57; - return adapter.find(User, user[User.idAttribute], { 'with': [{ + return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ relation: 'post', replace: true, query: { @@ -2330,13 +3452,13 @@ }] }); case 57: - user = _context6.sent; + users = _context6.sent; - assert.debug('found', User.name, user); + assert.debug('found', User.name, users); assert.isDefined(user, 'user'); - assert.isDefined(user.posts, 'user.posts'); - assert.equal(user.posts.length, 2, 'user.posts.length'); + assert.isDefined(users[0].posts, 'users[0].posts'); + assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); case 62: case 'end': @@ -2345,91 +3467,125 @@ } }, _callee6, this); }))); + } + + if (options.hasFeature('findAllBelongsToNested')) { + it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { + var props, user, profile, post, comment, user2, post2, comment2, comments; + return regeneratorRuntime.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; + + assert.debug('create', User.name, props); + _context7.next = 7; + return adapter.create(User, props); + + case 7: + user = _context7.sent; + + assert.debug('created', User.name, user); + + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context7.next = 13; + return adapter.create(Profile, props); - if (options.hasFeature('findBelongsToNested')) { - it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { - var props, user, profile, post, comment; - return regeneratorRuntime.wrap(function _callee7$(_context7) { - while (1) { - switch (_context7.prev = _context7.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Comment'); - this.toClear.push('Profile'); - props = { name: 'John' }; + case 13: + profile = _context7.sent; - assert.debug('create', User.name, props); - _context7.next = 7; - return adapter.create(User, props); + assert.debug('created', Profile.name, profile); - case 7: - user = _context7.sent; + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 19; + return adapter.create(Post, props); - assert.debug('created', User.name, user); + case 19: + post = _context7.sent; - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context7.next = 13; - return adapter.create(Profile, props); + assert.debug('created', Post.name, post); - case 13: - profile = _context7.sent; + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 25; + return adapter.create(Comment, props); - assert.debug('created', Profile.name, profile); + case 25: + comment = _context7.sent; - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context7.next = 19; - return adapter.create(Post, props); + assert.debug('created', Comment.name, comment); - case 19: - post = _context7.sent; + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context7.next = 31; + return adapter.create(User, props); - assert.debug('created', Post.name, post); + case 31: + user2 = _context7.sent; - props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; - assert.debug('create', Comment.name, props); - _context7.next = 25; - return adapter.create(Comment, props); + assert.debug('created', User.name, user2); - case 25: - comment = _context7.sent; + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context7.next = 37; + return adapter.create(Post, props); - assert.debug('created', Comment.name, comment); + case 37: + post2 = _context7.sent; - assert.debug('find', Comment.name, comment[Comment.idAttribute]); - _context7.next = 30; - return adapter.find(Comment, comment[Comment.idAttribute], { 'with': ['user', 'user.profile', 'post', 'post.user'] }); + assert.debug('created', Post.name, post2); - case 30: - comment = _context7.sent; + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context7.next = 43; + return adapter.create(Comment, props); - assert.debug('found', Comment.name, comment); + case 43: + comment2 = _context7.sent; - assert.isDefined(comment, 'comment'); - assert.isDefined(comment.post, 'comment.post'); - assert.isDefined(comment.post.user, 'comment.post.user'); - assert.isDefined(comment.user, 'comment.user'); - assert.isDefined(comment.user.profile, 'comment.user.profile'); + assert.debug('created', Comment.name, comment2); - case 37: - case 'end': - return _context7.stop(); - } + assert.debug('findAll', Comment.name, {}); + _context7.next = 48; + return adapter.findAll(Comment, {}, { 'with': ['user', 'user.profile', 'post', 'post.user'] }); + + case 48: + comments = _context7.sent; + + assert.debug('found', Comment.name, comments); + + assert.isDefined(comments[0].post, 'comments[0].post'); + assert.isDefined(comments[0].post.user, 'comments[0].post.user'); + assert.isDefined(comments[0].user, 'comments[0].user'); + assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile'); + assert.isDefined(comments[1].post, 'comments[1].post'); + assert.isDefined(comments[1].post.user, 'comments[1].post.user'); + assert.isDefined(comments[1].user, 'comments[1].user'); + + case 57: + case 'end': + return _context7.stop(); } - }, _callee7, this); - }))); - } + } + }, _callee7, this); + }))); + } + if (options.hasFeature('findAllBelongsToHasMany')) { it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { - var props, user, profile, post, postId, comment; + var props, user, profile, post, comment, user2, post2, comment2, posts; return regeneratorRuntime.wrap(function _callee8$(_context8) { while (1) { switch (_context8.prev = _context8.next) { case 0: this.toClear.push('Post'); - this.toClear.push('Comment'); this.toClear.push('Profile'); + this.toClear.push('Comment'); props = { name: 'John' }; assert.debug('create', User.name, props); @@ -2458,2329 +3614,1355 @@ case 19: post = _context8.sent; - postId = post[Post.idAttribute]; assert.debug('created', Post.name, post); - props = { content: 'test2', postId: postId, userId: post.userId }; + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; assert.debug('create', Comment.name, props); - _context8.next = 26; + _context8.next = 25; return adapter.create(Comment, props); - case 26: + case 25: comment = _context8.sent; assert.debug('created', Comment.name, comment); - assert.debug('find', Post.name, postId); + props = { name: 'Sally' }; + assert.debug('create', User.name, props); _context8.next = 31; - return adapter.find(Post, postId, { 'with': ['user', 'comment'] }); + return adapter.create(User, props); case 31: - post = _context8.sent; + user2 = _context8.sent; - assert.debug('found', Post.name, post); + assert.debug('created', User.name, user2); - assert.isDefined(post.comments, 'post.comments'); - assert.isDefined(post.user, 'post.user'); + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context8.next = 37; + return adapter.create(Post, props); - case 35: - case 'end': - return _context8.stop(); - } - } - }, _callee8, this); - }))); - - if (options.hasFeature('findBelongsToHasManyNested')) { - it('should load hasMany and belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { - var props, user, profile, post, postId, comment; - return regeneratorRuntime.wrap(function _callee9$(_context9) { - while (1) { - switch (_context9.prev = _context9.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Comment'); - this.toClear.push('Profile'); - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context9.next = 7; - return adapter.create(User, props); - - case 7: - user = _context9.sent; - - assert.debug('created', User.name, user); - - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context9.next = 13; - return adapter.create(Profile, props); - - case 13: - profile = _context9.sent; - - assert.debug('created', Profile.name, profile); - - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context9.next = 19; - return adapter.create(Post, props); - - case 19: - post = _context9.sent; - postId = post[Post.idAttribute]; + case 37: + post2 = _context8.sent; - assert.debug('created', Post.name, post); + assert.debug('created', Post.name, post2); - props = { content: 'test2', postId: postId, userId: post.userId }; - assert.debug('create', Comment.name, props); - _context9.next = 26; - return adapter.create(Comment, props); + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context8.next = 43; + return adapter.create(Comment, props); - case 26: - comment = _context9.sent; + case 43: + comment2 = _context8.sent; - assert.debug('created', Comment.name, comment); + assert.debug('created', Comment.name, comment2); - assert.debug('find', Post.name, postId); - _context9.next = 31; - return adapter.find(Post, postId, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); + assert.debug('find', Post.name, {}); + _context8.next = 48; + return adapter.findAll(Post, {}, { 'with': ['user', 'comment'] }); - case 31: - post = _context9.sent; + case 48: + posts = _context8.sent; - assert.debug('found', Post.name, post); + assert.debug('found', Post.name, posts); - assert.isDefined(post.comments, 'post.comments'); - assert.isDefined(post.comments[0].user, 'post.comments[0].user'); - assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile'); - assert.isDefined(post.user, 'post.user'); + assert.isDefined(posts[0].comments, 'posts[0].comments'); + assert.isDefined(posts[0].user, 'posts[0].user'); + assert.isDefined(posts[1].comments, 'posts[1].comments'); + assert.isDefined(posts[1].user, 'posts[1].user'); - case 37: - case 'end': - return _context9.stop(); - } + case 54: + case 'end': + return _context8.stop(); } - }, _callee9, this); - }))); - } - - if (options.hasFeature('findHasManyLocalKeys')) { - it('should load hasMany localKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { - var props, tag, tag2, post, postId; - return regeneratorRuntime.wrap(function _callee10$(_context10) { - while (1) { - switch (_context10.prev = _context10.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Tag'); - props = { value: 'big data' }; - - assert.debug('create', Tag.name, props); - _context10.next = 6; - return adapter.create(Tag, props); - - case 6: - tag = _context10.sent; + } + }, _callee8, this); + }))); + } - assert.debug('created', Tag.name, tag); + if (options.hasFeature('findAllBelongsToHasManyNested')) { + it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { + var props, user, profile, post, comment, user2, post2, comment2, posts; + return regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + props = { name: 'John' }; - props = { value: 'servers' }; - assert.debug('create', Tag.name, props); - _context10.next = 12; - return adapter.create(Tag, props); + assert.debug('create', User.name, props); + _context9.next = 7; + return adapter.create(User, props); - case 12: - tag2 = _context10.sent; + case 7: + user = _context9.sent; - assert.debug('created', Tag.name, tag2); + assert.debug('created', User.name, user); - props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }; - assert.debug('create', Post.name, props); - _context10.next = 18; - return adapter.create(Post, props); + props = { email: 'foo@test.com', userId: user[User.idAttribute] }; + assert.debug('create', Profile.name, props); + _context9.next = 13; + return adapter.create(Profile, props); - case 18: - post = _context10.sent; - postId = post[Post.idAttribute]; + case 13: + profile = _context9.sent; - assert.debug('created', Post.name, post); + assert.debug('created', Profile.name, profile); - assert.debug('find', Post.name, postId); - _context10.next = 24; - return adapter.find(Post, postId, { 'with': ['tag'] }); + props = { content: 'foo', userId: user[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context9.next = 19; + return adapter.create(Post, props); - case 24: - post = _context10.sent; + case 19: + post = _context9.sent; - assert.debug('found', Post.name, post); + assert.debug('created', Post.name, post); - assert.isDefined(post.tags, 'post.tags'); - assert.equal(post.content, 'test', 'post.content'); - assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); - assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); + props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; + assert.debug('create', Comment.name, props); + _context9.next = 25; + return adapter.create(Comment, props); - case 30: - case 'end': - return _context10.stop(); - } - } - }, _callee10, this); - }))); - it('should load hasMany localKeys (empty array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { - var props, post, postId; - return regeneratorRuntime.wrap(function _callee11$(_context11) { - while (1) { - switch (_context11.prev = _context11.next) { - case 0: - this.toClear.push('Post'); - props = { content: 'test' }; - - assert.debug('create', Post.name, props); - _context11.next = 5; - return adapter.create(Post, props); - - case 5: - post = _context11.sent; - postId = post[Post.idAttribute]; - - assert.debug('created', Post.name, post); - - assert.debug('find', Post.name, postId); - _context11.next = 11; - return adapter.find(Post, postId, { 'with': ['tag'] }); - - case 11: - post = _context11.sent; - - assert.debug('found', Post.name, post); - - assert.isDefined(post.tags, 'post.tags'); - assert.equal(post.content, 'test', 'post.content'); - assert.deepEqual(post.tags, [], 'post.tags'); - - case 16: - case 'end': - return _context11.stop(); - } - } - }, _callee11, this); - }))); - it('should load hasMany localKeys (object) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { - var _tagIds; + case 25: + comment = _context9.sent; - var props, tag, tag2, post, postId; - return regeneratorRuntime.wrap(function _callee12$(_context12) { - while (1) { - switch (_context12.prev = _context12.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Tag'); - props = { value: 'big data' }; + assert.debug('created', Comment.name, comment); - assert.debug('create', Tag.name, props); - _context12.next = 6; - return adapter.create(Tag, props); + props = { name: 'Sally' }; + assert.debug('create', User.name, props); + _context9.next = 31; + return adapter.create(User, props); - case 6: - tag = _context12.sent; + case 31: + user2 = _context9.sent; - assert.debug('created', Tag.name, tag); + assert.debug('created', User.name, user2); - props = { value: 'servers' }; - assert.debug('create', Tag.name, props); - _context12.next = 12; - return adapter.create(Tag, props); + props = { content: 'bar', userId: user2[User.idAttribute] }; + assert.debug('create', Post.name, props); + _context9.next = 37; + return adapter.create(Post, props); - case 12: - tag2 = _context12.sent; + case 37: + post2 = _context9.sent; - assert.debug('created', Tag.name, tag2); + assert.debug('created', Post.name, post2); - props = { content: 'test', tagIds: (_tagIds = {}, defineProperty(_tagIds, tag[Tag.idAttribute], true), defineProperty(_tagIds, tag2[Tag.idAttribute], true), _tagIds) }; - assert.debug('create', Post.name, props); - _context12.next = 18; - return adapter.create(Post, props); + props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; + assert.debug('create', Comment.name, props); + _context9.next = 43; + return adapter.create(Comment, props); - case 18: - post = _context12.sent; - postId = post[Post.idAttribute]; + case 43: + comment2 = _context9.sent; - assert.debug('created', Post.name, post); + assert.debug('created', Comment.name, comment2); - assert.debug('find', Post.name, postId); - _context12.next = 24; - return adapter.find(Post, postId, { 'with': ['tag'] }); + assert.debug('find', Post.name, {}); + _context9.next = 48; + return adapter.findAll(Post, {}, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); - case 24: - post = _context12.sent; + case 48: + posts = _context9.sent; - assert.debug('found', Post.name); + assert.debug('found', Post.name, posts); - assert.isDefined(post.tags, 'post.tags'); - assert.equal(post.content, 'test', 'post.content'); - assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]'); - assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]'); + assert.isDefined(posts[0].comments, 'posts[0].comments'); + assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user'); + assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile'); + assert.isDefined(posts[0].user, 'posts[0].user'); + assert.isDefined(posts[1].comments, 'posts[1].comments'); + assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user'); + assert.isDefined(posts[1].user, 'posts[1].user'); - case 30: - case 'end': - return _context12.stop(); - } + case 57: + case 'end': + return _context9.stop(); } - }, _callee12, this); - }))); - } - - if (options.hasFeature('findHasManyForeignKeys')) { - it('should load hasMany foreignKeys (array) relations', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { - var props, tag, tagId, tag2, tag2Id, post, post2; - return regeneratorRuntime.wrap(function _callee13$(_context13) { - while (1) { - switch (_context13.prev = _context13.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Tag'); - props = { value: 'big data' }; - - assert.debug('create', Tag.name, props); - _context13.next = 6; - return adapter.create(Tag, props); - - case 6: - tag = _context13.sent; - tagId = tag[Tag.idAttribute]; - - assert.debug('created', Tag.name, tag); - - props = { value: 'servers' }; - assert.debug('create', Tag.name, props); - _context13.next = 13; - return adapter.create(Tag, props); - - case 13: - tag2 = _context13.sent; - tag2Id = tag2[Tag.idAttribute]; - - assert.debug('created', Tag.name, tag2); - - props = { content: 'test', tagIds: [tagId] }; - assert.debug('create', Post.name, props); - _context13.next = 20; - return adapter.create(Post, props); - - case 20: - post = _context13.sent; - - assert.debug('created', Post.name, post); - - props = { content: 'test2', tagIds: [tagId, tag2Id] }; - assert.debug('create', Post.name, props); - _context13.next = 26; - return adapter.create(Post, props); + } + }, _callee9, this); + }))); + } - case 26: - post2 = _context13.sent; + if (options.hasFeature('filterOnRelations')) { + it('should filter using belongsTo relation', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { + var profile1, user1, post1, user2, post2, users; + return regeneratorRuntime.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context10.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); - assert.debug('created', Post.name, post2); + case 5: + profile1 = _context10.sent; + _context10.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); - assert.debug('find', Tag.name, tagId); - _context13.next = 31; - return adapter.find(Tag, tagId, { 'with': ['post'] }); + case 8: + user1 = _context10.sent; + _context10.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); - case 31: - tag = _context13.sent; + case 11: + post1 = _context10.sent; + _context10.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - assert.debug('found', Tag.name, tag); + case 14: + _context10.next = 16; + return adapter.create(User, { name: 'Sally' }); - assert.isDefined(tag.posts, 'tag.posts'); - assert.equal(tag.value, 'big data', 'tag.value'); - assert.equal(tag.posts.length, 2, 'tag.posts.length'); + case 16: + user2 = _context10.sent; + _context10.next = 19; + return adapter.create(Post, { content: 'bar', userId: user2.id }); - assert.debug('find', Tag.name, tag2Id); - _context13.next = 39; - return adapter.find(Tag, tag2Id, { 'with': ['post'] }); + case 19: + post2 = _context10.sent; + _context10.next = 22; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - case 39: - tag2 = _context13.sent; + case 22: + _context10.next = 24; + return adapter.findAll(User, { 'profile.email': 'foo@test.com' }); - assert.debug('found', Tag.name, tag2); + case 24: + users = _context10.sent; - assert.isDefined(tag2.posts, 'tag2.posts'); - assert.equal(tag2.value, 'servers', 'tag2.value'); - assert.equal(tag2.posts.length, 1, 'tag2.posts.length'); - assert.objectsEqual(tag2.posts, [post2], 'tag2.posts'); + assert.equal(users.length, 1); + assert.equal(users[0].profileId, profile1.id); + assert.equal(users[0].name, 'John'); - case 45: - case 'end': - return _context13.stop(); - } + case 28: + case 'end': + return _context10.stop(); } - }, _callee13, this); - }))); - } - }); - } - - /* global assert:true */ - function findAllTest (options) { - describe('Adapter#findAll', function () { - var adapter, User, Profile, Post, Comment; - - beforeEach(function () { - adapter = this.$$adapter; - User = this.$$User; - Profile = this.$$Profile; - Post = this.$$Post; - Comment = this.$$Comment; - }); - - it('should exist', function () { - assert.equal(_typeof(adapter.findAll), 'function', 'adapter should have a "findAll" method'); - }); + } + }, _callee10, this); + }))); - it('should filter users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var props, users, user, userId, users2; - return regeneratorRuntime.wrap(function _callee$(_context) { + it('should filter through multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { + var profile1, user1, post1, profile2, user2, post2, comments; + return regeneratorRuntime.wrap(function _callee11$(_context11) { while (1) { - switch (_context.prev = _context.next) { + switch (_context11.prev = _context11.next) { case 0: - props = { name: 'John' }; - - assert.debug('findAll', User.name, { age: 30 }); - _context.next = 4; - return adapter.findAll(User, { age: 30 }); + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context11.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); - case 4: - users = _context.sent; + case 5: + profile1 = _context11.sent; + _context11.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); - assert.debug('found', User.name, users); - assert.equal(users.length, 0, 'users.length'); + case 8: + user1 = _context11.sent; + _context11.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); - assert.debug('create', User.name, props); - _context.next = 10; - return adapter.create(User, props); + case 11: + post1 = _context11.sent; + _context11.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - case 10: - user = _context.sent; + case 14: + _context11.next = 16; + return adapter.create(Profile, { email: 'bar@test.com' }); - assert.debug('created', User.name, user); - userId = user[User.idAttribute]; + case 16: + profile2 = _context11.sent; + _context11.next = 19; + return adapter.create(User, { name: 'Sally', profileId: profile2.id }); + case 19: + user2 = _context11.sent; + _context11.next = 22; + return adapter.create(Post, { content: 'bar', userId: user2.id }); - assert.debug('findAll', User.name, { name: 'John' }); - _context.next = 16; - return adapter.findAll(User, { name: 'John' }); + case 22: + post2 = _context11.sent; + _context11.next = 25; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - case 16: - users2 = _context.sent; + case 25: + _context11.next = 27; + return adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' }); - assert.debug('found', User.name, users2); + case 27: + comments = _context11.sent; - assert.equal(users2.length, 1, 'users2.length'); - assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); - assert.equal(users2[0].name, 'John', users2[0].name); + assert.equal(comments.length, 1); + assert.equal(comments[0].userId, user1.id); + assert.equal(comments[0].content, 'test1'); - case 21: + case 31: case 'end': - return _context.stop(); + return _context11.stop(); } } - }, _callee, this); + }, _callee11, this); }))); - it('should filter users with raw option', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var props, result, users, user, userId, result2, users2; - return regeneratorRuntime.wrap(function _callee2$(_context2) { + it('should filter using multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { + var profile1, user1, post1, profile2, user2, post2, comments; + return regeneratorRuntime.wrap(function _callee12$(_context12) { while (1) { - switch (_context2.prev = _context2.next) { + switch (_context12.prev = _context12.next) { case 0: - props = { name: 'John' }; - - assert.debug('findAll', User.name, { age: 30 }); - _context2.next = 4; - return adapter.findAll(User, { age: 30 }, { raw: true }); - - case 4: - result = _context2.sent; - users = result.data; + this.toClear.push('Post'); + this.toClear.push('Profile'); + this.toClear.push('Comment'); + _context12.next = 5; + return adapter.create(Profile, { email: 'foo@test.com' }); - assert.debug('found', User.name, users); - assert.equal(users.length, 0, 'users.length'); + case 5: + profile1 = _context12.sent; + _context12.next = 8; + return adapter.create(User, { name: 'John', profileId: profile1.id }); - assert.debug('create', User.name, props); - _context2.next = 11; - return adapter.create(User, props); + case 8: + user1 = _context12.sent; + _context12.next = 11; + return adapter.create(Post, { content: 'foo', userId: user1.id }); case 11: - user = _context2.sent; + post1 = _context12.sent; + _context12.next = 14; + return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - assert.debug('created', User.name, user); - userId = user[User.idAttribute]; + case 14: + _context12.next = 16; + return adapter.create(Profile, { email: 'bar@test.com' }); + case 16: + profile2 = _context12.sent; + _context12.next = 19; + return adapter.create(User, { name: 'Sally', profileId: profile2.id }); + + case 19: + user2 = _context12.sent; + _context12.next = 22; + return adapter.create(Post, { content: 'bar', userId: user2.id }); - assert.debug('findAll', User.name, { name: 'John' }); - _context2.next = 17; - return adapter.findAll(User, { name: 'John' }, { raw: true }); + case 22: + post2 = _context12.sent; + _context12.next = 25; + return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - case 17: - result2 = _context2.sent; - users2 = result2.data; + case 25: + _context12.next = 27; + return adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' }); - assert.debug('found', User.name, users2); + case 27: + comments = _context12.sent; - assert.equal(users2.length, 1, 'users2.length'); - assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]'); - assert.equal(users2[0].name, 'John', users2[0].name); + assert.equal(comments.length, 1); + assert.equal(comments[0].userId, user1.id); + assert.equal(comments[0].content, 'test1'); - case 23: + case 31: case 'end': - return _context2.stop(); + return _context12.stop(); } } - }, _callee2, this); + }, _callee12, this); }))); + } - if (options.hasFeature('findAllInOp')) { - it('should filter users using the "in" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var users, user, id, users2; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.next = 2; - return adapter.findAll(User, { - where: { - age: { - 'in': [30] - } - } - }); - - case 2: - users = _context3.sent; - - assert.equal(users.length, 0, 'users.length'); - - _context3.next = 6; - return adapter.create(User, { name: 'John' }); - - case 6: - user = _context3.sent; - id = user[User.idAttribute]; - _context3.next = 10; - return adapter.findAll(User, { name: 'John' }); - - case 10: - users2 = _context3.sent; - - assert.equal(users2.length, 1, 'users2.length'); - assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]'); - assert.equal(users2[0].name, 'John', 'users2[0].name'); + it('should allow passing limit and offset as strings', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { + return regeneratorRuntime.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + _context13.next = 2; + return adapter.findAll(User, { limit: '10', offset: '20' }); + + case 2: + case 'end': + return _context13.stop(); + } + } + }, _callee13, this); + }))); - case 14: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - }))); - } + if (options.hasFeature('findAllGroupedWhere')) { + it('should support filtering grouped "where" clauses', asyncToGenerator(regeneratorRuntime.mark(function _callee14() { + var posts, query; + return regeneratorRuntime.wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + this.toClear.push('Post'); + _context14.next = 3; + return adapter.createMany(Post, [{ status: 'draft', content: 'foo' }, { status: 'broken', content: 'bar' }, { status: 'published', content: 'hi' }, { status: 'flagged', content: 'hello world' }, { status: 'flagged', content: 'test' }]); - if (options.hasFeature('findAllLikeOp')) { - it('should filter users using the "like" operator', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var users, user, id, users2; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return adapter.findAll(User, { - where: { - name: { - 'like': '%J%' - } + case 3: + posts = _context14.sent; + query = { + where: [[{ + content: { + '=': 'foo' + }, + status: { + '=': 'draft' } - }); - - case 2: - users = _context4.sent; - - assert.equal(users.length, 0); - - _context4.next = 6; - return adapter.create(User, { name: 'John' }); - - case 6: - user = _context4.sent; - id = user.id; - _context4.next = 10; - return adapter.findAll(User, { - where: { - name: { - 'like': '%J%' - } + }, 'or', { + status: { + '=': 'published' } - }); - - case 10: - users2 = _context4.sent; + }], 'or', { + content: { + '=': 'test' + }, + status: { + '=': 'flagged' + } + }], + orderBy: 'status' + }; + _context14.t0 = assert; + _context14.next = 8; + return adapter.findAll(Post, query); - assert.equal(users2.length, 1); - assert.equal(users2[0].id, id); - assert.equal(users2[0].name, 'John'); + case 8: + _context14.t1 = _context14.sent; + _context14.t2 = [posts[0], posts[4], posts[2]]; - case 14: - case 'end': - return _context4.stop(); - } - } - }, _callee4, this); - }))); - } + _context14.t0.objectsEqual.call(_context14.t0, _context14.t1, _context14.t2); - if (options.hasFeature('findAllOpNotFound')) { - it('should throw "Operator not found" error', function () { - return adapter.findAll(User, { - where: { - name: { - op: 'John' - } + case 11: + case 'end': + return _context14.stop(); } - }).then(function () { - throw new Error('should have failed!'); - }, function (err) { - assert.equal(err.message, 'Operator op not supported!'); - }); - }); - } - - if (options.hasFeature('findAllBelongsTo')) { - it('should load belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee5() { - var props, user, profile, post, comment, user2, post2, comment2, comments; - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context5.next = 7; - return adapter.create(User, props); - - case 7: - user = _context5.sent; - - assert.debug('created', User.name, user); - - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context5.next = 13; - return adapter.create(Profile, props); - - case 13: - profile = _context5.sent; - - assert.debug('created', Profile.name, profile); - - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context5.next = 19; - return adapter.create(Post, props); - - case 19: - post = _context5.sent; - - assert.debug('created', Post.name, post); - - props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; - assert.debug('create', Comment.name, props); - _context5.next = 25; - return adapter.create(Comment, props); - - case 25: - comment = _context5.sent; - - assert.debug('created', Comment.name, comment); - - props = { name: 'Sally' }; - assert.debug('create', User.name, props); - _context5.next = 31; - return adapter.create(User, props); - - case 31: - user2 = _context5.sent; - - assert.debug('created', User.name, user2); - - props = { content: 'bar', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context5.next = 37; - return adapter.create(Post, props); - - case 37: - post2 = _context5.sent; + } + }, _callee14, this); + }))); + } + }); +}; + +/* global assert:true */ +var sumTest = function (options) { + describe('Adapter#sum', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.sum), 'function', 'adapter should have a "sum" method'); + }); + it('should sum users\' age', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, sum, user, user2; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 30 }; - assert.debug('created', Post.name, post2); - props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; - assert.debug('create', Comment.name, props); - _context5.next = 43; - return adapter.create(Comment, props); + assert.debug('sum', User.name, {}); + _context.next = 6; + return adapter.sum(User, 'age'); - case 43: - comment2 = _context5.sent; + case 6: + sum = _context.sent; - assert.debug('created', Comment.name, comment2); + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); - assert.debug('findAll', Comment.name, {}); - _context5.next = 48; - return adapter.findAll(Comment, {}, { 'with': ['user', 'post'] }); + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 12; + return adapter.sum(User, 'age', { name: 'John' }); - case 48: - comments = _context5.sent; + case 12: + sum = _context.sent; - assert.debug('found', Comment.name, comments); + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); - assert.isDefined(comments[0].post, 'comments[0].post'); - assert.isDefined(comments[0].user, 'comments[0].user'); - assert.isDefined(comments[1].post, 'comments[1].post'); - assert.isDefined(comments[1].user, 'comments[1].user'); + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 18; + return adapter.sum(User, 'age', { name: 'Sally' }); - case 54: - case 'end': - return _context5.stop(); - } - } - }, _callee5, this); - }))); + case 18: + sum = _context.sent; - it('should load belongsTo relations and filter sub queries', asyncToGenerator(regeneratorRuntime.mark(function _callee6() { - var props, user, user2, post, post2, post3, post4, users; - return regeneratorRuntime.wrap(function _callee6$(_context6) { - while (1) { - switch (_context6.prev = _context6.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Comment'); - props = { name: 'John' }; + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); - assert.debug('create', User.name, props); - _context6.next = 6; - return adapter.create(User, props); + assert.debug('create', User.name, props); + _context.next = 24; + return adapter.create(User, props); - case 6: - user = _context6.sent; + case 24: + user = _context.sent; - assert.debug('created', User.name, user); + assert.debug('created', User.name, user); - props = { name: 'Sally' }; - assert.debug('create', User.name, props); - _context6.next = 12; - return adapter.create(User, props); + assert.debug('sum', User.name, {}); + _context.next = 29; + return adapter.sum(User, 'age'); - case 12: - user2 = _context6.sent; + case 29: + sum = _context.sent; - assert.debug('created', User.name, user); + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); - props = { status: 'draft', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context6.next = 18; - return adapter.create(Post, props); + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 35; + return adapter.sum(User, 'age', { name: 'John' }); - case 18: - post = _context6.sent; + case 35: + sum = _context.sent; - assert.debug('created', Post.name, post); + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); - props = { status: 'published', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context6.next = 24; - return adapter.create(Post, props); + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 41; + return adapter.sum(User, 'age', { name: 'Sally' }); - case 24: - post2 = _context6.sent; + case 41: + sum = _context.sent; - assert.debug('created', Post.name, post2); + assert.debug('summed', User.name, sum); + assert.equal(sum, 0); - props = { status: 'draft', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context6.next = 30; - return adapter.create(Post, props); + assert.debug('create', User.name, { name: 'Sally' }); + _context.next = 47; + return adapter.create(User, { name: 'Sally', age: 27 }); - case 30: - post3 = _context6.sent; + case 47: + user2 = _context.sent; - assert.debug('created', Post.name, post3); + assert.debug('created', User.name, user2); - props = { status: 'published', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context6.next = 36; - return adapter.create(Post, props); + assert.debug('sum', User.name, {}); + _context.next = 52; + return adapter.sum(User, 'age'); - case 36: - post4 = _context6.sent; + case 52: + sum = _context.sent; - assert.debug('created', Post.name, post4); + assert.debug('summed', User.name, sum); + assert.equal(sum, 57); - assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context6.next = 41; - return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': ['post'] }); + assert.debug('sum', User.name, { name: 'John' }); + _context.next = 58; + return adapter.sum(User, 'age', { name: 'John' }); - case 41: - users = _context6.sent; + case 58: + sum = _context.sent; - assert.debug('found', User.name, users); + assert.debug('summed', User.name, sum); + assert.equal(sum, 30); - assert.isDefined(users, 'users'); - assert.isDefined(users[0].posts, 'users[0].posts'); - assert.equal(users[0].posts.length, 2, 'users[0].posts.length'); + assert.debug('sum', User.name, { name: 'Sally' }); + _context.next = 64; + return adapter.sum(User, 'age', { name: 'Sally' }); - assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context6.next = 49; - return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ - relation: 'post', - query: { - status: 'published' - } - }] }); + case 64: + sum = _context.sent; - case 49: - users = _context6.sent; + assert.debug('summed', User.name, sum); + assert.equal(sum, 27); - assert.debug('found', User.name, users); + case 67: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should sum users\' age and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 30 }; - assert.isDefined(users, 'users'); - assert.isDefined(users[0].posts, 'users[0].posts'); - assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); - assert.debug('findAll', User.name, defineProperty({}, User.idAttribute, user[User.idAttribute])); - _context6.next = 57; - return adapter.findAll(User, defineProperty({}, User.idAttribute, user[User.idAttribute]), { 'with': [{ - relation: 'post', - replace: true, - query: { - status: 'published' - } - }] }); + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); - case 57: - users = _context6.sent; + case 6: + user = _context2.sent; - assert.debug('found', User.name, users); + assert.debug('created', User.name, user); - assert.isDefined(user, 'user'); - assert.isDefined(users[0].posts, 'users[0].posts'); - assert.equal(users[0].posts.length, 1, 'users[0].posts.length'); + assert.debug('sum', User.name, props); + _context2.next = 11; + return adapter.sum(User, 'age', props, { raw: true }); - case 62: - case 'end': - return _context6.stop(); - } - } - }, _callee6, this); - }))); - } + case 11: + result = _context2.sent; - if (options.hasFeature('findAllBelongsToNested')) { - it('should load belongsTo relations (nested)', asyncToGenerator(regeneratorRuntime.mark(function _callee7() { - var props, user, profile, post, comment, user2, post2, comment2, comments; - return regeneratorRuntime.wrap(function _callee7$(_context7) { - while (1) { - switch (_context7.prev = _context7.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - props = { name: 'John' }; + assert.debug('summed', User.name, result); + assert.equal(result.data, 30, 'result.data'); - assert.debug('create', User.name, props); - _context7.next = 7; - return adapter.create(User, props); + case 14: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + }); +}; + +/* global assert:true */ +var updateTest = function (options) { + describe('Adapter#update', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.update), 'function', 'adapter should have a "update" method'); + }); + it('should update a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user, foundUser, updatedUser; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; - case 7: - user = _context7.sent; - assert.debug('created', User.name, user); + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context7.next = 13; - return adapter.create(Profile, props); + case 6: + user = _context.sent; - case 13: - profile = _context7.sent; + assert.debug('created', User.name, user); - assert.debug('created', Profile.name, profile); + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context7.next = 19; - return adapter.create(Post, props); + assert.debug('find', User.name, user[User.idAttribute]); + _context.next = 13; + return adapter.find(User, user[User.idAttribute]); - case 19: - post = _context7.sent; + case 13: + foundUser = _context.sent; - assert.debug('created', Post.name, post); + assert.debug('found', User.name, foundUser); - props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; - assert.debug('create', Comment.name, props); - _context7.next = 25; - return adapter.create(Comment, props); + assert.equal(foundUser.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(foundUser[User.idAttribute], 'new user should have an id'); + assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); - case 25: - comment = _context7.sent; + assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); + _context.next = 21; + return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }); - assert.debug('created', Comment.name, comment); + case 21: + updatedUser = _context.sent; - props = { name: 'Sally' }; - assert.debug('create', User.name, props); - _context7.next = 31; - return adapter.create(User, props); + assert.debug('updated', User.name, updatedUser); + assert.equal(updatedUser.name, 'Johnny'); + assert.equal(updatedUser[User.idAttribute], user[User.idAttribute]); - case 31: - user2 = _context7.sent; + assert.debug('find', User.name, user[User.idAttribute]); + _context.next = 28; + return adapter.find(User, user[User.idAttribute]); - assert.debug('created', User.name, user2); + case 28: + foundUser = _context.sent; - props = { content: 'bar', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context7.next = 37; - return adapter.create(Post, props); + assert.debug('found', User.name, foundUser); + assert.equal(foundUser.name, 'Johnny'); + assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); - case 37: - post2 = _context7.sent; + case 32: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + it('should update a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { + var adapter, User, props, user, result; + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John' }; + + + assert.debug('create', User.name, props); + _context2.next = 6; + return adapter.create(User, props); + + case 6: + user = _context2.sent; + + assert.debug('created', User.name, user); + + assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); + assert.isDefined(user[User.idAttribute], 'new user should have an id'); + + assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); + _context2.next = 13; + return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true }); + + case 13: + result = _context2.sent; + + assert.debug('updated', User.name, result); + assert.isDefined(result.data, 'result.data is defined'); + assert.isDefined(result.updated, 'result.updated is defined'); + assert.equal(result.data.name, 'Johnny', 'result.data.name should be "Johnny"'); + assert.equal(result.data[User.idAttribute], user[User.idAttribute], 'result.data.' + User.idAttribute + ' should be ' + user[User.idAttribute]); + assert.equal(result.updated, 1, 'result.updated should be 1'); + + case 20: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + }))); + it('should throw when updating non-existent row', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { + var adapter, User; + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + + + assert.debug('update', 'non-existent-id', { name: 'Johnny' }); + _context3.prev = 3; + _context3.next = 6; + return adapter.update(User, 'non-existent-id', { name: 'Johnny' }); + + case 6: + throw new Error('update should have failed!'); + + case 9: + _context3.prev = 9; + _context3.t0 = _context3['catch'](3); + + assert.debug('correctly threw error', _context3.t0.message); + assert.isDefined(_context3.t0.message, 'err.message is defined'); + assert.equal(_context3.t0.message, 'Not Found', 'err.message should be "Not Found"'); + + case 14: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this, [[3, 9]]); + }))); + it('should keep relations specified by "with"', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { + var adapter, store, result; + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + adapter = this.$$adapter; + store = this.$$container; + + + sinon.stub(adapter, '_update', function (mapper, id, props, opts) { + assert.deepEqual(props.posts, [{ + id: 1234, + userId: 1 + }]); + assert.deepEqual(props.profile, { + id: 238, + userId: 1 + }); + assert.equal(props.address, undefined); + assert.equal(props.organization, undefined); + return [props, {}]; + }); + + assert.debug('update', 1, { id: 1 }); + _context4.next = 6; + return store.update('user', 1, { + id: 1, + posts: [{ + id: 1234, + userId: 1 + }], + address: { + id: 412, + userId: 1 + }, + profile: { + id: 238, + userId: 1 + }, + organizationId: 333, + organization: { + id: 333 + } + }, { with: ['posts', 'profile'] }); - assert.debug('created', Post.name, post2); + case 6: + result = _context4.sent; - props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; - assert.debug('create', Comment.name, props); - _context7.next = 43; - return adapter.create(Comment, props); + assert.debug('updated', 1, result); + adapter._update.restore(); - case 43: - comment2 = _context7.sent; + case 9: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + }))); + }); +}; + +/* global assert:true */ +var updateAllTest = function (options) { + describe('Adapter#updateAll', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.updateAll), 'function', 'adapter should have a "updateAll" method'); + }); + it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, props, user1, userId1, user2, userId2, users, users2, users3, users4; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + props = { name: 'John', age: 20 }; + + + assert.debug('create', User.name, props); + _context.next = 6; + return adapter.create(User, props); + + case 6: + user1 = _context.sent; + + assert.debug('created', User.name, user1); + userId1 = user1[User.idAttribute]; + + + props = { name: 'John', age: 30 }; + + assert.debug('create', User.name, props); + _context.next = 13; + return adapter.create(User, props); + + case 13: + user2 = _context.sent; + + assert.debug('created', User.name, user2); + userId2 = user2[User.idAttribute]; + + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 19; + return adapter.findAll(User, { name: 'John' }); + + case 19: + users = _context.sent; + + assert.debug('found', User.name, users); + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users[0].name, 'John'); + assert.equal(users[0].name, 'John'); + assert.equal(users.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' }); + _context.next = 31; + return adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' }); + + case 31: + users2 = _context.sent; + + assert.debug('updated', User.name, users2); + users2.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users2[0].name, 'Johnny'); + assert.equal(users2[0].name, 'Johnny'); + assert.equal(users2.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 30; + }).length, 1); + + assert.debug('findAll', User.name, { name: 'John' }); + _context.next = 43; + return adapter.findAll(User, { name: 'John' }); + + case 43: + users3 = _context.sent; + + assert.debug('found', User.name, users3); + assert.equalObjects(users3, []); + assert.equal(users3.length, 0); + + assert.debug('findAll', User.name, { name: 'Johnny' }); + _context.next = 50; + return adapter.findAll(User, { name: 'Johnny' }); + + case 50: + users4 = _context.sent; + + assert.debug('found', User.name, users4); + + users4.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users4[0].name, 'Johnny'); + assert.equal(users4[0].name, 'Johnny'); + assert.equal(users4.filter(function (x) { + return x[User.idAttribute] === userId1; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x[User.idAttribute] === userId2; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 30; + }).length, 1); + + case 59: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); +}; + +/* global assert:true */ +var updateManyTest = function (options) { + describe('Adapter#updateMany', function () { + it('should exist', function () { + assert.equal(_typeof(this.$$adapter.updateMany), 'function', 'adapter should have a "updateMany" method'); + }); + it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var adapter, User, user1, userId1, user2, userId2, users, users2, users3, users4; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + adapter = this.$$adapter; + User = this.$$User; + _context.next = 4; + return adapter.create(User, { name: 'John', age: 20 }); + + case 4: + user1 = _context.sent; + userId1 = user1.id; + _context.next = 8; + return adapter.create(User, { name: 'John', age: 30 }); + + case 8: + user2 = _context.sent; + userId2 = user2.id; + _context.next = 12; + return adapter.findAll(User, { name: 'John' }); + + case 12: + users = _context.sent; + + users.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users[0].name, 'John'); + assert.equal(users[0].name, 'John'); + assert.equal(users.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.id === userId2; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 20; + }).length, 1); + assert.equal(users.filter(function (x) { + return x.age === 30; + }).length, 1); + + user1.age = 101; + user2.age = 202; + _context.next = 24; + return adapter.updateMany(User, [user1, user2]); + + case 24: + users2 = _context.sent; + + users2.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users2.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.id === userId2; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 101; + }).length, 1); + assert.equal(users2.filter(function (x) { + return x.age === 202; + }).length, 1); + + _context.next = 32; + return adapter.findAll(User, { age: 20 }); + + case 32: + users3 = _context.sent; + + assert.objectsEqual(users3, []); + assert.equal(users3.length, 0); + + _context.next = 37; + return adapter.findAll(User, { age: 101 }); + + case 37: + users4 = _context.sent; + + users4.sort(function (a, b) { + return a.age - b.age; + }); + assert.equal(users4.filter(function (x) { + return x.id === userId1; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.id === userId2; + }).length, 0); + assert.equal(users4.filter(function (x) { + return x.age === 101; + }).length, 1); + assert.equal(users4.filter(function (x) { + return x.age === 202; + }).length, 0); + + case 43: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }))); + }); +}; - assert.debug('created', Comment.name, comment2); +chai.assert.equalObjects = function (a, b, m) { + chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); +}; - assert.debug('findAll', Comment.name, {}); - _context7.next = 48; - return adapter.findAll(Comment, {}, { 'with': ['user', 'user.profile', 'post', 'post.user'] }); +chai.assert.objectsEqual = function (a, b, m) { + chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); +}; - case 48: - comments = _context7.sent; +var debug = false; - assert.debug('found', Comment.name, comments); +chai.assert.debug = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - assert.isDefined(comments[0].post, 'comments[0].post'); - assert.isDefined(comments[0].post.user, 'comments[0].post.user'); - assert.isDefined(comments[0].user, 'comments[0].user'); - assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile'); - assert.isDefined(comments[1].post, 'comments[1].post'); - assert.isDefined(comments[1].post.user, 'comments[1].post.user'); - assert.isDefined(comments[1].user, 'comments[1].user'); + if (debug) { + var _console; - case 57: - case 'end': - return _context7.stop(); - } + args.forEach(function (arg, i) { + args[i] = JSON.stringify(arg, null, 2); + }); + (_console = console).log.apply(_console, ['DEBUG (TEST):'].concat(args)); + } +}; + +var prefix = 'TestRunner.init(options): options'; + +var index = { + init: function init(options) { + options = options || {}; + debug = !!options.debug; + options.hasMethod = function (method) { + options.methods || (options.methods = 'all'); + options.xmethods || (options.xmethods = []); + return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1; + }; + options.hasFeature = function (feature) { + options.features || (options.features = 'all'); + options.xfeatures || (options.xfeatures = []); + return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1; + }; + if (!options.Adapter || typeof options.Adapter !== 'function') { + throw new Error(prefix + '.Adapter: Expected function, Actual: ' + _typeof(options.Adapter)); + } + beforeEach(function () { + this.$$adapter = new options.Adapter(options.adapterConfig); + this.$$container = new options.JSData.Container(options.containerConfig || { + mapperDefaults: { + debug: false + } + }); + this.$$store = new options.JSData.DataStore(options.storeConfig || { + mapperDefaults: { + debug: false + } + }); + this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true }); + this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true }); + var userOptions = { + name: 'user', + relations: { + hasMany: { + post: { + localField: 'posts', + foreignKey: 'userId' } - }, _callee7, this); - }))); - } - - if (options.hasFeature('findAllBelongsToHasMany')) { - it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee8() { - var props, user, profile, post, comment, user2, post2, comment2, posts; - return regeneratorRuntime.wrap(function _callee8$(_context8) { - while (1) { - switch (_context8.prev = _context8.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context8.next = 7; - return adapter.create(User, props); - - case 7: - user = _context8.sent; - - assert.debug('created', User.name, user); - - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context8.next = 13; - return adapter.create(Profile, props); - - case 13: - profile = _context8.sent; - - assert.debug('created', Profile.name, profile); - - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context8.next = 19; - return adapter.create(Post, props); - - case 19: - post = _context8.sent; - - assert.debug('created', Post.name, post); - - props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; - assert.debug('create', Comment.name, props); - _context8.next = 25; - return adapter.create(Comment, props); - - case 25: - comment = _context8.sent; - - assert.debug('created', Comment.name, comment); - - props = { name: 'Sally' }; - assert.debug('create', User.name, props); - _context8.next = 31; - return adapter.create(User, props); - - case 31: - user2 = _context8.sent; - - assert.debug('created', User.name, user2); - - props = { content: 'bar', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context8.next = 37; - return adapter.create(Post, props); - - case 37: - post2 = _context8.sent; - - assert.debug('created', Post.name, post2); - - props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; - assert.debug('create', Comment.name, props); - _context8.next = 43; - return adapter.create(Comment, props); - - case 43: - comment2 = _context8.sent; - - assert.debug('created', Comment.name, comment2); - - assert.debug('find', Post.name, {}); - _context8.next = 48; - return adapter.findAll(Post, {}, { 'with': ['user', 'comment'] }); - - case 48: - posts = _context8.sent; - - assert.debug('found', Post.name, posts); - - assert.isDefined(posts[0].comments, 'posts[0].comments'); - assert.isDefined(posts[0].user, 'posts[0].user'); - assert.isDefined(posts[1].comments, 'posts[1].comments'); - assert.isDefined(posts[1].user, 'posts[1].user'); - - case 54: - case 'end': - return _context8.stop(); - } - } - }, _callee8, this); - }))); - } - - if (options.hasFeature('findAllBelongsToHasManyNested')) { - it('should load hasMany and belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee9() { - var props, user, profile, post, comment, user2, post2, comment2, posts; - return regeneratorRuntime.wrap(function _callee9$(_context9) { - while (1) { - switch (_context9.prev = _context9.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - props = { name: 'John' }; - - assert.debug('create', User.name, props); - _context9.next = 7; - return adapter.create(User, props); - - case 7: - user = _context9.sent; - - assert.debug('created', User.name, user); - - props = { email: 'foo@test.com', userId: user[User.idAttribute] }; - assert.debug('create', Profile.name, props); - _context9.next = 13; - return adapter.create(Profile, props); - - case 13: - profile = _context9.sent; - - assert.debug('created', Profile.name, profile); - - props = { content: 'foo', userId: user[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context9.next = 19; - return adapter.create(Post, props); - - case 19: - post = _context9.sent; - - assert.debug('created', Post.name, post); - - props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }; - assert.debug('create', Comment.name, props); - _context9.next = 25; - return adapter.create(Comment, props); - - case 25: - comment = _context9.sent; - - assert.debug('created', Comment.name, comment); - - props = { name: 'Sally' }; - assert.debug('create', User.name, props); - _context9.next = 31; - return adapter.create(User, props); - - case 31: - user2 = _context9.sent; - - assert.debug('created', User.name, user2); - - props = { content: 'bar', userId: user2[User.idAttribute] }; - assert.debug('create', Post.name, props); - _context9.next = 37; - return adapter.create(Post, props); - - case 37: - post2 = _context9.sent; - - assert.debug('created', Post.name, post2); - - props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }; - assert.debug('create', Comment.name, props); - _context9.next = 43; - return adapter.create(Comment, props); - - case 43: - comment2 = _context9.sent; - - assert.debug('created', Comment.name, comment2); - - assert.debug('find', Post.name, {}); - _context9.next = 48; - return adapter.findAll(Post, {}, { 'with': ['user', 'comment', 'comment.user', 'comment.user.profile'] }); - - case 48: - posts = _context9.sent; - - assert.debug('found', Post.name, posts); - - assert.isDefined(posts[0].comments, 'posts[0].comments'); - assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user'); - assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile'); - assert.isDefined(posts[0].user, 'posts[0].user'); - assert.isDefined(posts[1].comments, 'posts[1].comments'); - assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user'); - assert.isDefined(posts[1].user, 'posts[1].user'); - - case 57: - case 'end': - return _context9.stop(); - } - } - }, _callee9, this); - }))); - } - - if (options.hasFeature('filterOnRelations')) { - it('should filter using belongsTo relation', asyncToGenerator(regeneratorRuntime.mark(function _callee10() { - var profile1, user1, post1, user2, post2, users; - return regeneratorRuntime.wrap(function _callee10$(_context10) { - while (1) { - switch (_context10.prev = _context10.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - _context10.next = 5; - return adapter.create(Profile, { email: 'foo@test.com' }); - - case 5: - profile1 = _context10.sent; - _context10.next = 8; - return adapter.create(User, { name: 'John', profileId: profile1.id }); - - case 8: - user1 = _context10.sent; - _context10.next = 11; - return adapter.create(Post, { content: 'foo', userId: user1.id }); - - case 11: - post1 = _context10.sent; - _context10.next = 14; - return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - - case 14: - _context10.next = 16; - return adapter.create(User, { name: 'Sally' }); - - case 16: - user2 = _context10.sent; - _context10.next = 19; - return adapter.create(Post, { content: 'bar', userId: user2.id }); - - case 19: - post2 = _context10.sent; - _context10.next = 22; - return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - - case 22: - _context10.next = 24; - return adapter.findAll(User, { 'profile.email': 'foo@test.com' }); - - case 24: - users = _context10.sent; - - assert.equal(users.length, 1); - assert.equal(users[0].profileId, profile1.id); - assert.equal(users[0].name, 'John'); - - case 28: - case 'end': - return _context10.stop(); - } - } - }, _callee10, this); - }))); - - it('should filter through multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee11() { - var profile1, user1, post1, profile2, user2, post2, comments; - return regeneratorRuntime.wrap(function _callee11$(_context11) { - while (1) { - switch (_context11.prev = _context11.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - _context11.next = 5; - return adapter.create(Profile, { email: 'foo@test.com' }); - - case 5: - profile1 = _context11.sent; - _context11.next = 8; - return adapter.create(User, { name: 'John', profileId: profile1.id }); - - case 8: - user1 = _context11.sent; - _context11.next = 11; - return adapter.create(Post, { content: 'foo', userId: user1.id }); - - case 11: - post1 = _context11.sent; - _context11.next = 14; - return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - - case 14: - _context11.next = 16; - return adapter.create(Profile, { email: 'bar@test.com' }); - - case 16: - profile2 = _context11.sent; - _context11.next = 19; - return adapter.create(User, { name: 'Sally', profileId: profile2.id }); - - case 19: - user2 = _context11.sent; - _context11.next = 22; - return adapter.create(Post, { content: 'bar', userId: user2.id }); - - case 22: - post2 = _context11.sent; - _context11.next = 25; - return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - - case 25: - _context11.next = 27; - return adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' }); - - case 27: - comments = _context11.sent; - - assert.equal(comments.length, 1); - assert.equal(comments[0].userId, user1.id); - assert.equal(comments[0].content, 'test1'); - - case 31: - case 'end': - return _context11.stop(); - } - } - }, _callee11, this); - }))); - - it('should filter using multiple hasOne/belongsTo relations', asyncToGenerator(regeneratorRuntime.mark(function _callee12() { - var profile1, user1, post1, profile2, user2, post2, comments; - return regeneratorRuntime.wrap(function _callee12$(_context12) { - while (1) { - switch (_context12.prev = _context12.next) { - case 0: - this.toClear.push('Post'); - this.toClear.push('Profile'); - this.toClear.push('Comment'); - _context12.next = 5; - return adapter.create(Profile, { email: 'foo@test.com' }); - - case 5: - profile1 = _context12.sent; - _context12.next = 8; - return adapter.create(User, { name: 'John', profileId: profile1.id }); - - case 8: - user1 = _context12.sent; - _context12.next = 11; - return adapter.create(Post, { content: 'foo', userId: user1.id }); - - case 11: - post1 = _context12.sent; - _context12.next = 14; - return adapter.create(Comment, { content: 'test1', postId: post1.id, userId: post1.userId }); - - case 14: - _context12.next = 16; - return adapter.create(Profile, { email: 'bar@test.com' }); - - case 16: - profile2 = _context12.sent; - _context12.next = 19; - return adapter.create(User, { name: 'Sally', profileId: profile2.id }); - - case 19: - user2 = _context12.sent; - _context12.next = 22; - return adapter.create(Post, { content: 'bar', userId: user2.id }); - - case 22: - post2 = _context12.sent; - _context12.next = 25; - return adapter.create(Comment, { content: 'test2', postId: post2.id, userId: post2.userId }); - - case 25: - _context12.next = 27; - return adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' }); - - case 27: - comments = _context12.sent; - - assert.equal(comments.length, 1); - assert.equal(comments[0].userId, user1.id); - assert.equal(comments[0].content, 'test1'); - - case 31: - case 'end': - return _context12.stop(); - } - } - }, _callee12, this); - }))); - } - - it('should allow passing limit and offset as strings', asyncToGenerator(regeneratorRuntime.mark(function _callee13() { - return regeneratorRuntime.wrap(function _callee13$(_context13) { - while (1) { - switch (_context13.prev = _context13.next) { - case 0: - _context13.next = 2; - return adapter.findAll(User, { limit: '10', offset: '20' }); - - case 2: - case 'end': - return _context13.stop(); - } - } - }, _callee13, this); - }))); - - if (options.hasFeature('findAllGroupedWhere')) { - it('should support filtering grouped "where" clauses', asyncToGenerator(regeneratorRuntime.mark(function _callee14() { - var posts, query; - return regeneratorRuntime.wrap(function _callee14$(_context14) { - while (1) { - switch (_context14.prev = _context14.next) { - case 0: - this.toClear.push('Post'); - _context14.next = 3; - return adapter.createMany(Post, [{ status: 'draft', content: 'foo' }, { status: 'broken', content: 'bar' }, { status: 'published', content: 'hi' }, { status: 'flagged', content: 'hello world' }, { status: 'flagged', content: 'test' }]); - - case 3: - posts = _context14.sent; - query = { - where: [[{ - content: { - '=': 'foo' - }, - status: { - '=': 'draft' - } - }, 'or', { - status: { - '=': 'published' - } - }], 'or', { - content: { - '=': 'test' - }, - status: { - '=': 'flagged' - } - }], - orderBy: 'status' - }; - _context14.t0 = assert; - _context14.next = 8; - return adapter.findAll(Post, query); - - case 8: - _context14.t1 = _context14.sent; - _context14.t2 = [posts[0], posts[4], posts[2]]; - - _context14.t0.objectsEqual.call(_context14.t0, _context14.t1, _context14.t2); - - case 11: - case 'end': - return _context14.stop(); - } - } - }, _callee14, this); - }))); - } - }); - } - - /* global assert:true */ - function sumTest (options) { - describe('Adapter#sum', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.sum), 'function', 'adapter should have a "sum" method'); - }); - it('should sum users\' age', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, sum, user, user2; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John', age: 30 }; - - - assert.debug('sum', User.name, {}); - _context.next = 6; - return adapter.sum(User, 'age'); - - case 6: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 0); - - assert.debug('sum', User.name, { name: 'John' }); - _context.next = 12; - return adapter.sum(User, 'age', { name: 'John' }); - - case 12: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 0); - - assert.debug('sum', User.name, { name: 'Sally' }); - _context.next = 18; - return adapter.sum(User, 'age', { name: 'Sally' }); - - case 18: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 0); - - assert.debug('create', User.name, props); - _context.next = 24; - return adapter.create(User, props); - - case 24: - user = _context.sent; - - assert.debug('created', User.name, user); - - assert.debug('sum', User.name, {}); - _context.next = 29; - return adapter.sum(User, 'age'); - - case 29: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 30); - - assert.debug('sum', User.name, { name: 'John' }); - _context.next = 35; - return adapter.sum(User, 'age', { name: 'John' }); - - case 35: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 30); - - assert.debug('sum', User.name, { name: 'Sally' }); - _context.next = 41; - return adapter.sum(User, 'age', { name: 'Sally' }); - - case 41: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 0); - - assert.debug('create', User.name, { name: 'Sally' }); - _context.next = 47; - return adapter.create(User, { name: 'Sally', age: 27 }); - - case 47: - user2 = _context.sent; - - assert.debug('created', User.name, user2); - - assert.debug('sum', User.name, {}); - _context.next = 52; - return adapter.sum(User, 'age'); - - case 52: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 57); - - assert.debug('sum', User.name, { name: 'John' }); - _context.next = 58; - return adapter.sum(User, 'age', { name: 'John' }); - - case 58: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 30); - - assert.debug('sum', User.name, { name: 'Sally' }); - _context.next = 64; - return adapter.sum(User, 'age', { name: 'Sally' }); - - case 64: - sum = _context.sent; - - assert.debug('summed', User.name, sum); - assert.equal(sum, 27); - - case 67: - case 'end': - return _context.stop(); + }, + hasOne: { + profile: { + localField: 'profile', + foreignKey: 'userId' + }, + address: { + localField: 'address', + foreignKey: 'userId' } - } - }, _callee, this); - }))); - it('should sum users\' age and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, result; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John', age: 30 }; - - - assert.debug('create', User.name, props); - _context2.next = 6; - return adapter.create(User, props); - - case 6: - user = _context2.sent; - - assert.debug('created', User.name, user); - - assert.debug('sum', User.name, props); - _context2.next = 11; - return adapter.sum(User, 'age', props, { raw: true }); - - case 11: - result = _context2.sent; - - assert.debug('summed', User.name, result); - assert.equal(result.data, 30, 'result.data'); - - case 14: - case 'end': - return _context2.stop(); + }, + belongsTo: { + organization: { + localField: 'organization', + foreignKey: 'organizationId' } } - }, _callee2, this); - }))); - }); - } - - /* global assert:true */ - function updateTest (options) { - describe('Adapter#update', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.update), 'function', 'adapter should have a "update" method'); - }); - it('should update a user', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user, foundUser, updatedUser; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - - - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); - - case 6: - user = _context.sent; - - assert.debug('created', User.name, user); - - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); - - assert.debug('find', User.name, user[User.idAttribute]); - _context.next = 13; - return adapter.find(User, user[User.idAttribute]); - - case 13: - foundUser = _context.sent; - - assert.debug('found', User.name, foundUser); - - assert.equal(foundUser.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(foundUser[User.idAttribute], 'new user should have an id'); - assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); - - assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); - _context.next = 21; - return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }); - - case 21: - updatedUser = _context.sent; - - assert.debug('updated', User.name, updatedUser); - assert.equal(updatedUser.name, 'Johnny'); - assert.equal(updatedUser[User.idAttribute], user[User.idAttribute]); - - assert.debug('find', User.name, user[User.idAttribute]); - _context.next = 28; - return adapter.find(User, user[User.idAttribute]); - - case 28: - foundUser = _context.sent; - - assert.debug('found', User.name, foundUser); - assert.equal(foundUser.name, 'Johnny'); - assert.equal(foundUser[User.idAttribute], user[User.idAttribute]); - - case 32: - case 'end': - return _context.stop(); + } + }; + var organizationOptions = { + name: 'organization', + relations: { + hasMany: { + user: { + localField: 'users', + foreignKey: 'organizationId' } } - }, _callee, this); - }))); - it('should update a user and return raw', asyncToGenerator(regeneratorRuntime.mark(function _callee2() { - var adapter, User, props, user, result; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John' }; - - - assert.debug('create', User.name, props); - _context2.next = 6; - return adapter.create(User, props); - - case 6: - user = _context2.sent; - - assert.debug('created', User.name, user); - - assert.equal(user.name, props.name, 'name of user should be "' + props.name + '"'); - assert.isDefined(user[User.idAttribute], 'new user should have an id'); - - assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' }); - _context2.next = 13; - return adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true }); - - case 13: - result = _context2.sent; - - assert.debug('updated', User.name, result); - assert.isDefined(result.data, 'result.data is defined'); - assert.isDefined(result.updated, 'result.updated is defined'); - assert.equal(result.data.name, 'Johnny', 'result.data.name should be "Johnny"'); - assert.equal(result.data[User.idAttribute], user[User.idAttribute], 'result.data.' + User.idAttribute + ' should be ' + user[User.idAttribute]); - assert.equal(result.updated, 1, 'result.updated should be 1'); - - case 20: - case 'end': - return _context2.stop(); + } + }; + var postOptions = { + name: 'post', + relations: { + belongsTo: { + user: { + localField: 'user', + foreignKey: 'userId' } - } - }, _callee2, this); - }))); - it('should throw when updating non-existent row', asyncToGenerator(regeneratorRuntime.mark(function _callee3() { - var adapter, User; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - - - assert.debug('update', 'non-existent-id', { name: 'Johnny' }); - _context3.prev = 3; - _context3.next = 6; - return adapter.update(User, 'non-existent-id', { name: 'Johnny' }); - - case 6: - throw new Error('update should have failed!'); - - case 9: - _context3.prev = 9; - _context3.t0 = _context3['catch'](3); - - assert.debug('correctly threw error', _context3.t0.message); - assert.isDefined(_context3.t0.message, 'err.message is defined'); - assert.equal(_context3.t0.message, 'Not Found', 'err.message should be "Not Found"'); - - case 14: - case 'end': - return _context3.stop(); + }, + hasMany: { + comment: { + localField: 'comments', + foreignKey: 'postId' + }, + tag: { + localField: 'tags', + localKeys: 'tagIds' } } - }, _callee3, this, [[3, 9]]); - }))); - it('should keep relations specified by "with"', asyncToGenerator(regeneratorRuntime.mark(function _callee4() { - var adapter, store, result; - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - adapter = this.$$adapter; - store = this.$$container; - - - sinon.stub(adapter, '_update', function (mapper, id, props, opts) { - assert.deepEqual(props.posts, [{ - id: 1234, - userId: 1 - }]); - assert.deepEqual(props.profile, { - id: 238, - userId: 1 - }); - assert.equal(props.address, undefined); - assert.equal(props.organization, undefined); - return [props, {}]; - }); - - assert.debug('update', 1, { id: 1 }); - _context4.next = 6; - return store.update('user', 1, { - id: 1, - posts: [{ - id: 1234, - userId: 1 - }], - address: { - id: 412, - userId: 1 - }, - profile: { - id: 238, - userId: 1 - }, - organizationId: 333, - organization: { - id: 333 - } - }, { with: ['posts', 'profile'] }); - - case 6: - result = _context4.sent; - - assert.debug('updated', 1, result); - adapter._update.restore(); - - case 9: - case 'end': - return _context4.stop(); + } + }; + var commentOptions = { + name: 'comment', + relations: { + belongsTo: { + post: { + localField: 'post', + foreignKey: 'postId' + }, + user: { + localField: 'user', + foreignKey: 'userId' } } - }, _callee4, this); - }))); - }); - } - - /* global assert:true */ - function updateAllTest (options) { - describe('Adapter#updateAll', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.updateAll), 'function', 'adapter should have a "updateAll" method'); - }); - it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, props, user1, userId1, user2, userId2, users, users2, users3, users4; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - props = { name: 'John', age: 20 }; - - - assert.debug('create', User.name, props); - _context.next = 6; - return adapter.create(User, props); - - case 6: - user1 = _context.sent; - - assert.debug('created', User.name, user1); - userId1 = user1[User.idAttribute]; - - - props = { name: 'John', age: 30 }; - - assert.debug('create', User.name, props); - _context.next = 13; - return adapter.create(User, props); - - case 13: - user2 = _context.sent; - - assert.debug('created', User.name, user2); - userId2 = user2[User.idAttribute]; - - - assert.debug('findAll', User.name, { name: 'John' }); - _context.next = 19; - return adapter.findAll(User, { name: 'John' }); - - case 19: - users = _context.sent; - - assert.debug('found', User.name, users); - users.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users[0].name, 'John'); - assert.equal(users[0].name, 'John'); - assert.equal(users.filter(function (x) { - return x[User.idAttribute] === userId1; - }).length, 1); - assert.equal(users.filter(function (x) { - return x[User.idAttribute] === userId2; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.age === 20; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.age === 30; - }).length, 1); - - assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' }); - _context.next = 31; - return adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' }); - - case 31: - users2 = _context.sent; - - assert.debug('updated', User.name, users2); - users2.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users2[0].name, 'Johnny'); - assert.equal(users2[0].name, 'Johnny'); - assert.equal(users2.filter(function (x) { - return x[User.idAttribute] === userId1; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x[User.idAttribute] === userId2; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x.age === 20; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x.age === 30; - }).length, 1); - - assert.debug('findAll', User.name, { name: 'John' }); - _context.next = 43; - return adapter.findAll(User, { name: 'John' }); - - case 43: - users3 = _context.sent; - - assert.debug('found', User.name, users3); - assert.equalObjects(users3, []); - assert.equal(users3.length, 0); - - assert.debug('findAll', User.name, { name: 'Johnny' }); - _context.next = 50; - return adapter.findAll(User, { name: 'Johnny' }); - - case 50: - users4 = _context.sent; - - assert.debug('found', User.name, users4); - - users4.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users4[0].name, 'Johnny'); - assert.equal(users4[0].name, 'Johnny'); - assert.equal(users4.filter(function (x) { - return x[User.idAttribute] === userId1; - }).length, 1); - assert.equal(users4.filter(function (x) { - return x[User.idAttribute] === userId2; - }).length, 1); - assert.equal(users4.filter(function (x) { - return x.age === 20; - }).length, 1); - assert.equal(users4.filter(function (x) { - return x.age === 30; - }).length, 1); - - case 59: - case 'end': - return _context.stop(); + } + }; + var tagOptions = { + name: 'tag', + relations: { + hasMany: { + post: { + localField: 'posts', + foreignKeys: 'tagIds' } } - }, _callee, this); - }))); + } + }; + this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); + this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); + this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); + this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); + this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {}); + this.$$store.defineMapper('profile', options.profileConfig || {}); + this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {}); + this.$$store.defineMapper('address', options.addressConfig || {}); + this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); + this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); + this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); + this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); + this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); + this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); + this.toClear = ['User']; }); - } - - /* global assert:true */ - function updateManyTest (options) { - describe('Adapter#updateMany', function () { - it('should exist', function () { - assert.equal(_typeof(this.$$adapter.updateMany), 'function', 'adapter should have a "updateMany" method'); - }); - it('should update multiple users', asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var adapter, User, user1, userId1, user2, userId2, users, users2, users3, users4; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - adapter = this.$$adapter; - User = this.$$User; - _context.next = 4; - return adapter.create(User, { name: 'John', age: 20 }); - - case 4: - user1 = _context.sent; - userId1 = user1.id; - _context.next = 8; - return adapter.create(User, { name: 'John', age: 30 }); - - case 8: - user2 = _context.sent; - userId2 = user2.id; - _context.next = 12; - return adapter.findAll(User, { name: 'John' }); - - case 12: - users = _context.sent; - - users.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users[0].name, 'John'); - assert.equal(users[0].name, 'John'); - assert.equal(users.filter(function (x) { - return x.id === userId1; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.id === userId2; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.age === 20; - }).length, 1); - assert.equal(users.filter(function (x) { - return x.age === 30; - }).length, 1); - - user1.age = 101; - user2.age = 202; - _context.next = 24; - return adapter.updateMany(User, [user1, user2]); - - case 24: - users2 = _context.sent; - - users2.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users2.filter(function (x) { - return x.id === userId1; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x.id === userId2; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x.age === 101; - }).length, 1); - assert.equal(users2.filter(function (x) { - return x.age === 202; - }).length, 1); - - _context.next = 32; - return adapter.findAll(User, { age: 20 }); - - case 32: - users3 = _context.sent; - - assert.objectsEqual(users3, []); - assert.equal(users3.length, 0); - - _context.next = 37; - return adapter.findAll(User, { age: 101 }); - - case 37: - users4 = _context.sent; - users4.sort(function (a, b) { - return a.age - b.age; - }); - assert.equal(users4.filter(function (x) { - return x.id === userId1; - }).length, 1); - assert.equal(users4.filter(function (x) { - return x.id === userId2; - }).length, 0); - assert.equal(users4.filter(function (x) { - return x.age === 101; - }).length, 1); - assert.equal(users4.filter(function (x) { - return x.age === 202; - }).length, 0); - - case 43: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }))); + describe('js-data-adapter-tests', function () { + if (options.hasMethod('beforeCreate')) { + beforeCreateTest(options); + } + if (options.hasMethod('count')) { + countTest(options); + } + if (options.hasMethod('create')) { + createTest(options); + } + if (options.hasMethod('afterCreate')) { + afterCreateTest(options); + } + if (options.hasMethod('createMany')) { + createManyTest(options); + } + if (options.hasMethod('extend')) { + extendTest(options); + } + if (options.hasMethod('find')) { + findTest(options); + } + if (options.hasMethod('findAll')) { + findAllTest(options); + } + if (options.hasMethod('destroy')) { + destroyTest(options); + } + if (options.hasMethod('destroyAll')) { + destroyAllTest(options); + } + if (options.hasMethod('beforeUpdate')) { + beforeUpdateTest(options); + } + if (options.hasMethod('sum')) { + sumTest(options); + } + if (options.hasMethod('update')) { + updateTest(options); + } + if (options.hasMethod('afterUpdate')) { + afterUpdateTest(options); + } + if (options.hasMethod('updateAll')) { + updateAllTest(options); + } + if (options.hasMethod('updateMany')) { + updateManyTest(options); + } }); - } - chai.assert.equalObjects = function (a, b, m) { - chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); - }; - - chai.assert.objectsEqual = function (a, b, m) { - chai.assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)); - }; - - var debug = false; - - chai.assert.debug = function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - if (debug) { - var _console; - - args.forEach(function (arg, i) { - args[i] = JSON.stringify(arg, null, 2); - }); - (_console = console).log.apply(_console, ['DEBUG (TEST):'].concat(args)); - } - }; - - var prefix = 'TestRunner.init(options): options'; - - var index = { - init: function init(options) { - options = options || {}; - debug = !!options.debug; - options.hasMethod = function (method) { - options.methods || (options.methods = 'all'); - options.xmethods || (options.xmethods = []); - return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1; - }; - options.hasFeature = function (feature) { - options.features || (options.features = 'all'); - options.xfeatures || (options.xfeatures = []); - return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1; - }; - if (!options.Adapter || typeof options.Adapter !== 'function') { - throw new Error(prefix + '.Adapter: Expected function, Actual: ' + _typeof(options.Adapter)); - } - beforeEach(function () { - this.$$adapter = new options.Adapter(options.adapterConfig); - this.$$container = new options.JSData.Container(options.containerConfig || { - mapperDefaults: { - debug: false - } - }); - this.$$store = new options.JSData.DataStore(options.storeConfig || { - mapperDefaults: { - debug: false - } - }); - this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true }); - this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true }); - var userOptions = { - name: 'user', - relations: { - hasMany: { - post: { - localField: 'posts', - foreignKey: 'userId' + afterEach(asyncToGenerator(regeneratorRuntime.mark(function _callee() { + var Test, toClear, promise; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + Test = this; + toClear = []; + + if (Test.toClear.indexOf('Tag') !== -1) { + toClear.push('Tag'); } - }, - hasOne: { - profile: { - localField: 'profile', - foreignKey: 'userId' - }, - address: { - localField: 'address', - foreignKey: 'userId' - } - }, - belongsTo: { - organization: { - localField: 'organization', - foreignKey: 'organizationId' - } - } - } - }; - var organizationOptions = { - name: 'organization', - relations: { - hasMany: { - user: { - localField: 'users', - foreignKey: 'organizationId' + if (Test.toClear.indexOf('Comment') !== -1) { + toClear.push('Comment'); } - } - } - }; - var postOptions = { - name: 'post', - relations: { - belongsTo: { - user: { - localField: 'user', - foreignKey: 'userId' + if (Test.toClear.indexOf('Post') !== -1) { + toClear.push('Post'); } - }, - hasMany: { - comment: { - localField: 'comments', - foreignKey: 'postId' - }, - tag: { - localField: 'tags', - localKeys: 'tagIds' + if (Test.toClear.indexOf('Profile') !== -1) { + toClear.push('Profile'); } - } - } - }; - var commentOptions = { - name: 'comment', - relations: { - belongsTo: { - post: { - localField: 'post', - foreignKey: 'postId' - }, - user: { - localField: 'user', - foreignKey: 'userId' + if (Test.toClear.indexOf('User') !== -1) { + toClear.push('User'); } - } - } - }; - var tagOptions = { - name: 'tag', - relations: { - hasMany: { - post: { - localField: 'posts', - foreignKeys: 'tagIds' + if (Test.toClear.indexOf('Address') !== -1) { + toClear.push('Address'); } - } - } - }; - this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); - this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions)); - this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); - this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions)); - this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {}); - this.$$store.defineMapper('profile', options.profileConfig || {}); - this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {}); - this.$$store.defineMapper('address', options.addressConfig || {}); - this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); - this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions)); - this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); - this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions)); - this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); - this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions)); - this.toClear = ['User']; - }); + promise = Promise.resolve(); - describe('js-data-adapter-tests', function () { - if (options.hasMethod('beforeCreate')) { - beforeCreateTest(options); - } - if (options.hasMethod('count')) { - countTest(options); - } - if (options.hasMethod('create')) { - createTest(options); - } - if (options.hasMethod('afterCreate')) { - afterCreateTest(options); - } - if (options.hasMethod('createMany')) { - createManyTest(options); - } - if (options.hasMethod('extend')) { - extendTest(options); - } - if (options.hasMethod('find')) { - findTest(options); - } - if (options.hasMethod('findAll')) { - findAllTest(options); - } - if (options.hasMethod('destroy')) { - destroyTest(options); - } - if (options.hasMethod('destroyAll')) { - destroyAllTest(options); - } - if (options.hasMethod('beforeUpdate')) { - beforeUpdateTest(options); - } - if (options.hasMethod('sum')) { - sumTest(options); - } - if (options.hasMethod('update')) { - updateTest(options); - } - if (options.hasMethod('afterUpdate')) { - afterUpdateTest(options); - } - if (options.hasMethod('updateAll')) { - updateAllTest(options); - } - if (options.hasMethod('updateMany')) { - updateManyTest(options); - } - }); - - afterEach(asyncToGenerator(regeneratorRuntime.mark(function _callee() { - var Test, toClear, promise; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - Test = this; - toClear = []; - - if (Test.toClear.indexOf('Tag') !== -1) { - toClear.push('Tag'); - } - if (Test.toClear.indexOf('Comment') !== -1) { - toClear.push('Comment'); - } - if (Test.toClear.indexOf('Post') !== -1) { - toClear.push('Post'); - } - if (Test.toClear.indexOf('Profile') !== -1) { - toClear.push('Profile'); - } - if (Test.toClear.indexOf('User') !== -1) { - toClear.push('User'); - } - if (Test.toClear.indexOf('Address') !== -1) { - toClear.push('Address'); - } - promise = Promise.resolve(); - - toClear.forEach(function (Mapper) { - promise = promise.then(function () { - return Test.$$adapter.destroyAll(Test['$$' + Mapper]); - }); + toClear.forEach(function (Mapper) { + promise = promise.then(function () { + return Test.$$adapter.destroyAll(Test['$$' + Mapper]); }); - _context.next = 12; - return promise; + }); + _context.next = 12; + return promise; - case 12: - case 'end': - return _context.stop(); - } + case 12: + case 'end': + return _context.stop(); } - }, _callee, this); - }))); - }, - assert: chai.assert, - sinon: sinon$1, - fail: function fail(msg) { - chai.assert.equal('should not reach this!: ' + msg, 'failure'); - }, - TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {}], - TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {}], - TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {}], - TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {}], - TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {}], - TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {}], - TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {}], - TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {}], - TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {}], - TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false] - }; - - return index; - -})); + } + }, _callee, this); + }))); + }, + assert: chai.assert, + sinon: sinon$1, + fail: function fail(msg) { + chai.assert.equal('should not reach this!: ' + msg, 'failure'); + }, + TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {}], + TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {}], + TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {}], + TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {}], + TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {}], + TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {}], + TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false] +}; + +return index; + +}))); //# sourceMappingURL=js-data-adapter-tests.js.map diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index 86cf560..d785e28 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA,4BAAyB,OAAV,EAAmB;AAChC,EAAA,WAAS,qBAAT,EAAgC,YAAY;AAC1C,EAAA,OAAG,cAAH,EAAmB,YAAY;AAC7B,EAAA,aAAO,KAAP,SAAoB,KAAK,SAAL,CAAe,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;AACD,EAAA,KAFD;AAGA,EAAA,OAAG,yBAAH,2CAA8B;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AAAA,EAAA;AACtB,EAAA,qBADsB,GACZ,KAAK,SADO;AAEtB,EAAA,kBAFsB,GAEf,KAAK,MAFU;AAGtB,EAAA,mBAHsB,GAGd,EAAE,MAAM,MAAR,EAHc;;;AAK5B,EAAA,oBAAM,IAAN,CAAW,OAAX,EAAoB,aAApB,EAAmC,UAAU,MAAV,EAAkB,KAAlB,EAAyB,IAAzB,EAA+B;AAChE,EAAA,uBAAO,SAAP,CAAiB,IAAjB,EAAuB,0CAAvB;AACA,EAAA,uBAAO,KAAP,CAAa,KAAK,EAAlB,EAAsB,aAAtB,EAAqC,SAArC;AACD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uBAAqB,CAAC,QAAD,EAAW,IAAX,EAAiB,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;AAyOb,EAAA,uBAAqB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;AA2Ob,EAAA,wBAAsB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;AA6Ob,EAAA,yBAAuB,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+B,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;AA7OV,EAAA,CAAf;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["options","equal","$$adapter","afterCreate","$$User","name","stub","adapter","mapper","props","opts","isDefined","op","debug","User","create","user","idAttribute","isTrue","calledOnce","firstCall","args","length","objectsEqual","isObject","restore","record","Promise","resolve","raw","result","created","data","afterUpdate","id","userId","update","updatedUser","updated","beforeCreate","beforeUpdate","count","user2","find","foundUser","createMany","age","user1","users","sort","a","b","filter","x","findAll","users3","destroy","beforeDestroy","afterDestroy","destroyedUser","isUndefined","beforeDestroyCalled","afterDestroyCalled","hasOwnProperty","deleted","destroyAll","foundUsers","destroyedUsers","constructor","extend","Adapter","SubAdapter","bar","err","subAdapter","foo","obj","setPrototypeOf","Profile","Post","Comment","Tag","$$Profile","$$Post","$$Comment","$$Tag","toClear","push","beforeFind","afterFind","beforeFindCalled","afterFindCalled","content","post","all","comments","postId","with","foundPost","equalObjects","found","email","profile","comment","status","post2","post3","post4","posts","hasFeature","value","tag","tag2","tagIds","tags","deepEqual","tagId","tag2Id","users2","result2","then","Error","message","comment2","profileId","profile1","post1","profile2","limit","offset","assert","query","sum","$$container","address","undefined","organization","store","_update","updateAll","userId1","userId2","users4","updateMany","m","JSON","parse","stringify","forEach","arg","i","log","prefix","hasMethod","method","methods","xmethods","indexOf","feature","features","xfeatures","adapterConfig","JSData","Container","containerConfig","$$store","DataStore","storeConfig","registerAdapter","userOptions","organizationOptions","postOptions","commentOptions","tagOptions","defineMapper","userConfig","utils","copy","$$Organization","organizationConfig","profileConfig","$$Address","addressConfig","postConfig","commentConfig","tagConfig","Test","Mapper","promise","msg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,sBAAe,UAAUA,OAAV,EAAmB;WACvB,qBAAT,EAAgC,YAAY;OACvC,cAAH,EAAmB,YAAY;aACtBC,KAAP,SAAoB,KAAKC,SAAL,CAAeC,WAAnC,GAAgD,UAAhD,EAA4D,4CAA5D;KADF;OAGG,yBA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EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAjOlB;wCAmOyB,CAAC,IAAD,EAAOA,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CAnOzB;0CAqO2B,CAAC,IAAD,EAAOA,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;uBAuOQ,CAAC,QAAD,EAAW,IAAX,EAAiBA,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;uBAyOQ,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;wBA2OS,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;yBA6OU,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;CA7OzB;;;;"} \ No newline at end of file diff --git a/dist/js-data-adapter.js b/dist/js-data-adapter.js index 19d305e..62472d9 100644 --- a/dist/js-data-adapter.js +++ b/dist/js-data-adapter.js @@ -2,1599 +2,1833 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('js-data')) : typeof define === 'function' && define.amd ? define('js-data-adapter', ['exports', 'js-data'], factory) : (factory((global.Adapter = global.Adapter || {}),global.JSData)); -}(this, function (exports,jsData) { 'use strict'; +}(this, (function (exports,jsData) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; - }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +}; - var defineProperty = function (obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; - }; - var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) break; +var asyncGenerator = function () { + function AwaitValue(value) { + this.value = value; + } + + function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + + if (value instanceof AwaitValue) { + Promise.resolve(value.value).then(function (arg) { + resume("next", arg); + }, function (arg) { + resume("throw", arg); + }); + } else { + settle(result.done ? "return" : "normal", result.value); } + } catch (err) { + settle("throw", err); } - - return _arr; } - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); + back = null; } + } + + this._invoke = send; + + if (typeof gen.return !== "function") { + this.return = undefined; + } + } + + if (typeof Symbol === "function" && Symbol.asyncIterator) { + AsyncGenerator.prototype[Symbol.asyncIterator] = function () { + return this; }; - }(); + } + + AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); + }; + + AsyncGenerator.prototype.throw = function (arg) { + return this._invoke("throw", arg); + }; + + AsyncGenerator.prototype.return = function (arg) { + return this._invoke("return", arg); + }; + + return { + wrap: function (fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + }, + await: function (value) { + return new AwaitValue(value); + } + }; +}(); + + + + + + + + + + + + + +var defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; + +var get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + + + + + + + + + + + + + + + + + +var set = function set(object, property, value, receiver) { + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ("value" in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; + + if (setter !== undefined) { + setter.call(receiver, value); + } + } + + return value; +}; + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +var noop = function noop() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var opts = args[args.length - 1]; + this.dbg.apply(this, [opts.op].concat(args)); + return jsData.utils.resolve(); +}; + +var noop2 = function noop2() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + var opts = args[args.length - 2]; + this.dbg.apply(this, [opts.op].concat(args)); + return jsData.utils.resolve(); +}; + +var unique = function unique(array) { + var seen = {}; + var final = []; + array.forEach(function (item) { + if (item in seen) { + return; + } + final.push(item); + seen[item] = 0; + }); + return final; +}; + +var withoutRelations = function withoutRelations(mapper, props, opts) { + opts || (opts = {}); + opts.with || (opts.with = []); + var relationFields = mapper.relationFields || []; + var toStrip = relationFields.filter(function (value) { + return opts.with.indexOf(value) === -1; + }); + return jsData.utils.omit(props, toStrip); +}; + +var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; + +/** + * Response object used when `raw` is `true`. May contain other fields in + * addition to `data`. + * + * @class Response + */ +function Response(data, meta, op) { + meta || (meta = {}); + + /** + * Response data. + * + * @name Response#data + * @type {*} + */ + this.data = data; + + jsData.utils.fillIn(this, meta); + + /** + * The operation for which the response was created. + * + * @name Response#op + * @type {string} + */ + this.op = op; +} + +var DEFAULTS = { + /** + * Whether to log debugging information. + * + * @name Adapter#debug + * @type {boolean} + * @default false + */ + debug: false, + + /** + * Whether to return a more detailed response object. + * + * @name Adapter#raw + * @type {boolean} + * @default false + */ + raw: false +}; + +/** + * Abstract class meant to be extended by adapters. + * + * @class Adapter + * @abstract + * @extends Component + * @param {Object} [opts] Configuration opts. + * @param {boolean} [opts.debug=false] Whether to log debugging information. + * @param {boolean} [opts.raw=false] Whether to return a more detailed response + * object. + */ +function Adapter(opts) { + jsData.utils.classCallCheck(this, Adapter); + jsData.Component.call(this, opts); + opts || (opts = {}); + jsData.utils.fillIn(opts, DEFAULTS); + jsData.utils.fillIn(this, opts); +} + +jsData.Component.extend({ + constructor: Adapter, + + /** + * Lifecycle method method called by count. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes count to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. + * + * @name Adapter#afterCount + * @method + * @param {Object} mapper The `mapper` argument passed to count. + * @param {Object} props The `props` argument passed to count. + * @param {Object} opts The `opts` argument passed to count. + * @property {string} opts.op `afterCount` + * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. + */ + afterCount: noop2, + + /** + * Lifecycle method method called by create. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes create to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. + * + * @name Adapter#afterCreate + * @method + * @param {Object} mapper The `mapper` argument passed to create. + * @param {Object} props The `props` argument passed to create. + * @param {Object} opts The `opts` argument passed to create. + * @property {string} opts.op `afterCreate` + * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`. + */ + afterCreate: noop2, + + /** + * Lifecycle method method called by createMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. + * + * @name Adapter#afterCreate + * @method + * @param {Object} mapper The `mapper` argument passed to createMany. + * @param {Object[]} props The `props` argument passed to createMany. + * @param {Object} opts The `opts` argument passed to createMany. + * @property {string} opts.op `afterCreateMany` + * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`. + */ + afterCreateMany: noop2, + + /** + * Lifecycle method method called by destroy. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. + * + * @name Adapter#afterDestroy + * @method + * @param {Object} mapper The `mapper` argument passed to destroy. + * @param {(string|number)} id The `id` argument passed to destroy. + * @param {Object} opts The `opts` argument passed to destroy. + * @property {string} opts.op `afterDestroy` + * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. + */ + afterDestroy: noop2, + + /** + * Lifecycle method method called by destroyAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. + * + * @name Adapter#afterDestroyAll + * @method + * @param {Object} mapper The `mapper` argument passed to destroyAll. + * @param {Object} query The `query` argument passed to destroyAll. + * @param {Object} opts The `opts` argument passed to destroyAll. + * @property {string} opts.op `afterDestroyAll` + * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. + */ + afterDestroyAll: noop2, + + /** + * Lifecycle method method called by find. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes find to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. + * + * @name Adapter#afterFind + * @method + * @param {Object} mapper The `mapper` argument passed to find. + * @param {(string|number)} id The `id` argument passed to find. + * @param {Object} opts The `opts` argument passed to find. + * @property {string} opts.op `afterFind` + * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`. + */ + afterFind: noop2, + + /** + * Lifecycle method method called by findAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. + * + * @name Adapter#afterFindAll + * @method + * @param {Object} mapper The `mapper` argument passed to findAll. + * @param {Object} query The `query` argument passed to findAll. + * @param {Object} opts The `opts` argument passed to findAll. + * @property {string} opts.op `afterFindAll` + * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`. + */ + afterFindAll: noop2, + + /** + * Lifecycle method method called by sum. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes sum to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. + * + * @name Adapter#afterSum + * @method + * @param {Object} mapper The `mapper` argument passed to sum. + * @param {string} field The `field` argument passed to sum. + * @param {Object} query The `query` argument passed to sum. + * @param {Object} opts The `opts` argument passed to sum. + * @property {string} opts.op `afterSum` + * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. + */ + afterSum: noop2, + + /** + * Lifecycle method method called by update. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes update to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. + * + * @name Adapter#afterUpdate + * @method + * @param {Object} mapper The `mapper` argument passed to update. + * @param {(string|number)} id The `id` argument passed to update. + * @param {Object} props The `props` argument passed to update. + * @param {Object} opts The `opts` argument passed to update. + * @property {string} opts.op `afterUpdate` + * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdate: noop2, + + /** + * Lifecycle method method called by updateAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. + * + * @name Adapter#afterUpdateAll + * @method + * @param {Object} mapper The `mapper` argument passed to updateAll. + * @param {Object} props The `props` argument passed to updateAll. + * @param {Object} query The `query` argument passed to updateAll. + * @param {Object} opts The `opts` argument passed to updateAll. + * @property {string} opts.op `afterUpdateAll` + * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdateAll: noop2, + + /** + * Lifecycle method method called by updateMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. + * + * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. + * + * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. + * + * @name Adapter#afterUpdateMany + * @method + * @param {Object} mapper The `mapper` argument passed to updateMany. + * @param {Object[]} records The `records` argument passed to updateMany. + * @param {Object} opts The `opts` argument passed to updateMany. + * @property {string} opts.op `afterUpdateMany` + * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. + */ + afterUpdateMany: noop2, + + /** + * Lifecycle method method called by count. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes count to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. + * + * @name Adapter#beforeCount + * @method + * @param {Object} mapper The `mapper` argument passed to count. + * @param {Object} query The `query` argument passed to count. + * @param {Object} opts The `opts` argument passed to count. + * @property {string} opts.op `beforeCount` + */ + beforeCount: noop, + + /** + * Lifecycle method method called by create. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes create to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. + * + * @name Adapter#beforeCreate + * @method + * @param {Object} mapper The `mapper` argument passed to create. + * @param {Object} props The `props` argument passed to create. + * @param {Object} opts The `opts` argument passed to create. + * @property {string} opts.op `beforeCreate` + */ + beforeCreate: noop, + + /** + * Lifecycle method method called by createMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. + * + * @name Adapter#beforeCreateMany + * @method + * @param {Object} mapper The `mapper` argument passed to createMany. + * @param {Object[]} props The `props` argument passed to createMany. + * @param {Object} opts The `opts` argument passed to createMany. + * @property {string} opts.op `beforeCreateMany` + */ + beforeCreateMany: noop, + + /** + * Lifecycle method method called by destroy. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. + * + * @name Adapter#beforeDestroy + * @method + * @param {Object} mapper The `mapper` argument passed to destroy. + * @param {(string|number)} id The `id` argument passed to destroy. + * @param {Object} opts The `opts` argument passed to destroy. + * @property {string} opts.op `beforeDestroy` + */ + beforeDestroy: noop, + + /** + * Lifecycle method method called by destroyAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. + * + * @name Adapter#beforeDestroyAll + * @method + * @param {Object} mapper The `mapper` argument passed to destroyAll. + * @param {Object} query The `query` argument passed to destroyAll. + * @param {Object} opts The `opts` argument passed to destroyAll. + * @property {string} opts.op `beforeDestroyAll` + */ + beforeDestroyAll: noop, + + /** + * Lifecycle method method called by find. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes find to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. + * + * @name Adapter#beforeFind + * @method + * @param {Object} mapper The `mapper` argument passed to find. + * @param {(string|number)} id The `id` argument passed to find. + * @param {Object} opts The `opts` argument passed to find. + * @property {string} opts.op `beforeFind` + */ + beforeFind: noop, + + /** + * Lifecycle method method called by findAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. + * + * @name Adapter#beforeFindAll + * @method + * @param {Object} mapper The `mapper` argument passed to findAll. + * @param {Object} query The `query` argument passed to findAll. + * @param {Object} opts The `opts` argument passed to findAll. + * @property {string} opts.op `beforeFindAll` + */ + beforeFindAll: noop, + + /** + * Lifecycle method method called by sum. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes sum to wait for the Promise to resolve before continuing. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. + * + * @name Adapter#beforeSum + * @method + * @param {Object} mapper The `mapper` argument passed to sum. + * @param {Object} query The `query` argument passed to sum. + * @param {Object} opts The `opts` argument passed to sum. + * @property {string} opts.op `beforeSum` + */ + beforeSum: noop, + + /** + * Lifecycle method method called by update. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes update to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. + * + * @name Adapter#beforeUpdate + * @method + * @param {Object} mapper The `mapper` argument passed to update. + * @param {(string|number)} id The `id` argument passed to update. + * @param {Object} props The `props` argument passed to update. + * @param {Object} opts The `opts` argument passed to update. + * @property {string} opts.op `beforeUpdate` + */ + beforeUpdate: noop, + + /** + * Lifecycle method method called by updateAll. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. + * + * @name Adapter#beforeUpdateAll + * @method + * @param {Object} mapper The `mapper` argument passed to updateAll. + * @param {Object} props The `props` argument passed to updateAll. + * @param {Object} query The `query` argument passed to updateAll. + * @param {Object} opts The `opts` argument passed to updateAll. + * @property {string} opts.op `beforeUpdateAll` + */ + beforeUpdateAll: noop, + + /** + * Lifecycle method method called by updateMany. + * + * Override this method to add custom behavior for this lifecycle hook. + * + * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. + * + * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. + * + * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. + * + * @name Adapter#beforeUpdateMany + * @method + * @param {Object} mapper The `mapper` argument passed to updateMany. + * @param {Object[]} props The `props` argument passed to updateMany. + * @param {Object} opts The `opts` argument passed to updateMany. + * @property {string} opts.op `beforeUpdateMany` + */ + beforeUpdateMany: noop, - var noop = function noop() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + /** + * Retrieve the number of records that match the selection query. Called by + * `Mapper#count`. + * + * @name Adapter#count + * @method + * @param {Object} mapper The mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + count: function count(mapper, query, opts) { + var _this = this; - var opts = args[args.length - 1]; - this.dbg.apply(this, [opts.op].concat(args)); - return jsData.utils.resolve(); - }; + var op = void 0; + query || (query = {}); + opts || (opts = {}); - var noop2 = function noop2() { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } + // beforeCount lifecycle hook + op = opts.op = 'beforeCount'; + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { + // Allow for re-assignment from lifecycle hook + op = opts.op = 'count'; + _this.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this._count(mapper, query, opts)); + }).then(function (results) { + var _results = slicedToArray(results, 2), + data = _results[0], + result = _results[1]; + + result || (result = {}); + var response = new Response(data, result, op); + response = _this.respond(response, opts); + + // afterCount lifecycle hook + op = opts.op = 'afterCount'; + return jsData.utils.resolve(_this[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + }, - var opts = args[args.length - 2]; - this.dbg.apply(this, [opts.op].concat(args)); - return jsData.utils.resolve(); - }; - var unique = function unique(array) { - var seen = {}; - var final = []; - array.forEach(function (item) { - if (item in seen) { - return; - } - final.push(item); - seen[item] = 0; - }); - return final; - }; + /** + * Create a new record. Called by `Mapper#create`. + * + * @name Adapter#create + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The record to be created. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + create: function create(mapper, props, opts) { + var _this2 = this; - var withoutRelations = function withoutRelations(mapper, props, opts) { + var op = void 0; + props || (props = {}); opts || (opts = {}); - opts.with || (opts.with = []); - var relationFields = mapper.relationFields || []; - var toStrip = relationFields.filter(function (value) { - return opts.with.indexOf(value) === -1; + + // beforeCreate lifecycle hook + op = opts.op = 'beforeCreate'; + return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = _props === undefined ? props : _props; + props = withoutRelations(mapper, props, opts); + op = opts.op = 'create'; + _this2.dbg(op, mapper, props, opts); + return jsData.utils.resolve(_this2._create(mapper, props, opts)); + }).then(function (results) { + var _results2 = slicedToArray(results, 2), + data = _results2[0], + result = _results2[1]; + + result || (result = {}); + var response = new Response(data, result, 'create'); + response.created = data ? 1 : 0; + response = _this2.respond(response, opts); + + // afterCreate lifecycle hook + op = opts.op = 'afterCreate'; + return jsData.utils.resolve(_this2[op](mapper, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); }); - return jsData.utils.omit(props, toStrip); - }; + }, - var reserved = ['orderBy', 'sort', 'limit', 'offset', 'skip', 'where']; /** - * Response object used when `raw` is `true`. May contain other fields in - * addition to `data`. + * Create multiple records in a single batch. Called by `Mapper#createMany`. * - * @class Response + * @name Adapter#createMany + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The records to be created. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} */ - function Response(data, meta, op) { - meta || (meta = {}); - - /** - * Response data. - * - * @name Response#data - * @type {*} - */ - this.data = data; - - jsData.utils.fillIn(this, meta); - - /** - * The operation for which the response was created. - * - * @name Response#op - * @type {string} - */ - this.op = op; - } - - var DEFAULTS = { - /** - * Whether to log debugging information. - * - * @name Adapter#debug - * @type {boolean} - * @default false - */ - debug: false, - - /** - * Whether to return a more detailed response object. - * - * @name Adapter#raw - * @type {boolean} - * @default false - */ - raw: false - }; + createMany: function createMany(mapper, props, opts) { + var _this3 = this; - /** - * Abstract class meant to be extended by adapters. - * - * @class Adapter - * @abstract - * @extends Component - * @param {Object} [opts] Configuration opts. - * @param {boolean} [opts.debug=false] Whether to log debugging information. - * @param {boolean} [opts.raw=false] Whether to return a more detailed response - * object. - */ - function Adapter(opts) { - jsData.utils.classCallCheck(this, Adapter); - jsData.Component.call(this, opts); + var op = void 0; + props || (props = {}); opts || (opts = {}); - jsData.utils.fillIn(opts, DEFAULTS); - jsData.utils.fillIn(this, opts); - } - jsData.Component.extend({ - constructor: Adapter, - - /** - * Lifecycle method method called by count. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes count to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. - * - * @name Adapter#afterCount - * @method - * @param {Object} mapper The `mapper` argument passed to count. - * @param {Object} props The `props` argument passed to count. - * @param {Object} opts The `opts` argument passed to count. - * @property {string} opts.op `afterCount` - * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. - */ - afterCount: noop2, - - /** - * Lifecycle method method called by create. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes create to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. - * - * @name Adapter#afterCreate - * @method - * @param {Object} mapper The `mapper` argument passed to create. - * @param {Object} props The `props` argument passed to create. - * @param {Object} opts The `opts` argument passed to create. - * @property {string} opts.op `afterCreate` - * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`. - */ - afterCreate: noop2, - - /** - * Lifecycle method method called by createMany. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. - * - * @name Adapter#afterCreate - * @method - * @param {Object} mapper The `mapper` argument passed to createMany. - * @param {Object[]} props The `props` argument passed to createMany. - * @param {Object} opts The `opts` argument passed to createMany. - * @property {string} opts.op `afterCreateMany` - * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`. - */ - afterCreateMany: noop2, - - /** - * Lifecycle method method called by destroy. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. - * - * @name Adapter#afterDestroy - * @method - * @param {Object} mapper The `mapper` argument passed to destroy. - * @param {(string|number)} id The `id` argument passed to destroy. - * @param {Object} opts The `opts` argument passed to destroy. - * @property {string} opts.op `afterDestroy` - * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. - */ - afterDestroy: noop2, - - /** - * Lifecycle method method called by destroyAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. - * - * @name Adapter#afterDestroyAll - * @method - * @param {Object} mapper The `mapper` argument passed to destroyAll. - * @param {Object} query The `query` argument passed to destroyAll. - * @param {Object} opts The `opts` argument passed to destroyAll. - * @property {string} opts.op `afterDestroyAll` - * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`. - */ - afterDestroyAll: noop2, - - /** - * Lifecycle method method called by find. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes find to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. - * - * @name Adapter#afterFind - * @method - * @param {Object} mapper The `mapper` argument passed to find. - * @param {(string|number)} id The `id` argument passed to find. - * @param {Object} opts The `opts` argument passed to find. - * @property {string} opts.op `afterFind` - * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`. - */ - afterFind: noop2, - - /** - * Lifecycle method method called by findAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. - * - * @name Adapter#afterFindAll - * @method - * @param {Object} mapper The `mapper` argument passed to findAll. - * @param {Object} query The `query` argument passed to findAll. - * @param {Object} opts The `opts` argument passed to findAll. - * @property {string} opts.op `afterFindAll` - * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`. - */ - afterFindAll: noop2, - - /** - * Lifecycle method method called by sum. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes sum to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. - * - * @name Adapter#afterSum - * @method - * @param {Object} mapper The `mapper` argument passed to sum. - * @param {string} field The `field` argument passed to sum. - * @param {Object} query The `query` argument passed to sum. - * @param {Object} opts The `opts` argument passed to sum. - * @property {string} opts.op `afterSum` - * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`. - */ - afterSum: noop2, - - /** - * Lifecycle method method called by update. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes update to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. - * - * @name Adapter#afterUpdate - * @method - * @param {Object} mapper The `mapper` argument passed to update. - * @param {(string|number)} id The `id` argument passed to update. - * @param {Object} props The `props` argument passed to update. - * @param {Object} opts The `opts` argument passed to update. - * @property {string} opts.op `afterUpdate` - * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`. - */ - afterUpdate: noop2, - - /** - * Lifecycle method method called by updateAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. - * - * @name Adapter#afterUpdateAll - * @method - * @param {Object} mapper The `mapper` argument passed to updateAll. - * @param {Object} props The `props` argument passed to updateAll. - * @param {Object} query The `query` argument passed to updateAll. - * @param {Object} opts The `opts` argument passed to updateAll. - * @property {string} opts.op `afterUpdateAll` - * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. - */ - afterUpdateAll: noop2, - - /** - * Lifecycle method method called by updateMany. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. - * - * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any. - * - * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. - * - * @name Adapter#afterUpdateMany - * @method - * @param {Object} mapper The `mapper` argument passed to updateMany. - * @param {Object[]} records The `records` argument passed to updateMany. - * @param {Object} opts The `opts` argument passed to updateMany. - * @property {string} opts.op `afterUpdateMany` - * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`. - */ - afterUpdateMany: noop2, - - /** - * Lifecycle method method called by count. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes count to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by count. - * - * @name Adapter#beforeCount - * @method - * @param {Object} mapper The `mapper` argument passed to count. - * @param {Object} query The `query` argument passed to count. - * @param {Object} opts The `opts` argument passed to count. - * @property {string} opts.op `beforeCount` - */ - beforeCount: noop, - - /** - * Lifecycle method method called by create. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes create to wait for the Promise to resolve before continuing. - * - * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by create. - * - * @name Adapter#beforeCreate - * @method - * @param {Object} mapper The `mapper` argument passed to create. - * @param {Object} props The `props` argument passed to create. - * @param {Object} opts The `opts` argument passed to create. - * @property {string} opts.op `beforeCreate` - */ - beforeCreate: noop, - - /** - * Lifecycle method method called by createMany. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes createMany to wait for the Promise to resolve before continuing. - * - * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany. - * - * @name Adapter#beforeCreateMany - * @method - * @param {Object} mapper The `mapper` argument passed to createMany. - * @param {Object[]} props The `props` argument passed to createMany. - * @param {Object} opts The `opts` argument passed to createMany. - * @property {string} opts.op `beforeCreateMany` - */ - beforeCreateMany: noop, - - /** - * Lifecycle method method called by destroy. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes destroy to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy. - * - * @name Adapter#beforeDestroy - * @method - * @param {Object} mapper The `mapper` argument passed to destroy. - * @param {(string|number)} id The `id` argument passed to destroy. - * @param {Object} opts The `opts` argument passed to destroy. - * @property {string} opts.op `beforeDestroy` - */ - beforeDestroy: noop, - - /** - * Lifecycle method method called by destroyAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll. - * - * @name Adapter#beforeDestroyAll - * @method - * @param {Object} mapper The `mapper` argument passed to destroyAll. - * @param {Object} query The `query` argument passed to destroyAll. - * @param {Object} opts The `opts` argument passed to destroyAll. - * @property {string} opts.op `beforeDestroyAll` - */ - beforeDestroyAll: noop, - - /** - * Lifecycle method method called by find. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes find to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by find. - * - * @name Adapter#beforeFind - * @method - * @param {Object} mapper The `mapper` argument passed to find. - * @param {(string|number)} id The `id` argument passed to find. - * @param {Object} opts The `opts` argument passed to find. - * @property {string} opts.op `beforeFind` - */ - beforeFind: noop, - - /** - * Lifecycle method method called by findAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes findAll to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll. - * - * @name Adapter#beforeFindAll - * @method - * @param {Object} mapper The `mapper` argument passed to findAll. - * @param {Object} query The `query` argument passed to findAll. - * @param {Object} opts The `opts` argument passed to findAll. - * @property {string} opts.op `beforeFindAll` - */ - beforeFindAll: noop, - - /** - * Lifecycle method method called by sum. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes sum to wait for the Promise to resolve before continuing. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum. - * - * @name Adapter#beforeSum - * @method - * @param {Object} mapper The `mapper` argument passed to sum. - * @param {Object} query The `query` argument passed to sum. - * @param {Object} opts The `opts` argument passed to sum. - * @property {string} opts.op `beforeSum` - */ - beforeSum: noop, - - /** - * Lifecycle method method called by update. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes update to wait for the Promise to resolve before continuing. - * - * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by update. - * - * @name Adapter#beforeUpdate - * @method - * @param {Object} mapper The `mapper` argument passed to update. - * @param {(string|number)} id The `id` argument passed to update. - * @param {Object} props The `props` argument passed to update. - * @param {Object} opts The `opts` argument passed to update. - * @property {string} opts.op `beforeUpdate` - */ - beforeUpdate: noop, - - /** - * Lifecycle method method called by updateAll. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing. - * - * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll. - * - * @name Adapter#beforeUpdateAll - * @method - * @param {Object} mapper The `mapper` argument passed to updateAll. - * @param {Object} props The `props` argument passed to updateAll. - * @param {Object} query The `query` argument passed to updateAll. - * @param {Object} opts The `opts` argument passed to updateAll. - * @property {string} opts.op `beforeUpdateAll` - */ - beforeUpdateAll: noop, - - /** - * Lifecycle method method called by updateMany. - * - * Override this method to add custom behavior for this lifecycle hook. - * - * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing. - * - * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value. - * - * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany. - * - * @name Adapter#beforeUpdateMany - * @method - * @param {Object} mapper The `mapper` argument passed to updateMany. - * @param {Object[]} props The `props` argument passed to updateMany. - * @param {Object} opts The `opts` argument passed to updateMany. - * @property {string} opts.op `beforeUpdateMany` - */ - beforeUpdateMany: noop, - - /** - * Retrieve the number of records that match the selection query. Called by - * `Mapper#count`. - * - * @name Adapter#count - * @method - * @param {Object} mapper The mapper. - * @param {Object} [query] Selection query. - * @param {Object} [query.where] Filtering criteria. - * @param {string|Array} [query.orderBy] Sorting criteria. - * @param {string|Array} [query.sort] Same as `query.sort`. - * @param {number} [query.limit] Limit results. - * @param {number} [query.skip] Offset results. - * @param {number} [query.offset] Same as `query.skip`. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - count: function count(mapper, query, opts) { - var _this = this; - - var op = void 0; - query || (query = {}); - opts || (opts = {}); - - // beforeCount lifecycle hook - op = opts.op = 'beforeCount'; - return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { - // Allow for re-assignment from lifecycle hook - op = opts.op = 'count'; - _this.dbg(op, mapper, query, opts); - return jsData.utils.resolve(_this._count(mapper, query, opts)); - }).then(function (results) { - var _results = slicedToArray(results, 2); - - var data = _results[0]; - var result = _results[1]; - - result || (result = {}); - var response = new Response(data, result, op); - response = _this.respond(response, opts); - - // afterCount lifecycle hook - op = opts.op = 'afterCount'; - return jsData.utils.resolve(_this[op](mapper, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + // beforeCreateMany lifecycle hook + op = opts.op = 'beforeCreateMany'; + return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = _props === undefined ? props : _props; + props = props.map(function (record) { + return withoutRelations(mapper, record, opts); }); - }, + op = opts.op = 'createMany'; + _this3.dbg(op, mapper, props, opts); + return jsData.utils.resolve(_this3._createMany(mapper, props, opts)); + }).then(function (results) { + var _results3 = slicedToArray(results, 2), + data = _results3[0], + result = _results3[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'createMany'); + response.created = data.length; + response = _this3.respond(response, opts); + + // afterCreateMany lifecycle hook + op = opts.op = 'afterCreateMany'; + return jsData.utils.resolve(_this3[op](mapper, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + }, - /** - * Create a new record. Called by `Mapper#create`. - * - * @name Adapter#create - * @method - * @param {Object} mapper The mapper. - * @param {Object} props The record to be created. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - create: function create(mapper, props, opts) { - var _this2 = this; - - var op = void 0; - props || (props = {}); - opts || (opts = {}); - - // beforeCreate lifecycle hook - op = opts.op = 'beforeCreate'; - return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { - // Allow for re-assignment from lifecycle hook - props = _props === undefined ? props : _props; - props = withoutRelations(mapper, props, opts); - op = opts.op = 'create'; - _this2.dbg(op, mapper, props, opts); - return jsData.utils.resolve(_this2._create(mapper, props, opts)); - }).then(function (results) { - var _results2 = slicedToArray(results, 2); - - var data = _results2[0]; - var result = _results2[1]; - - result || (result = {}); - var response = new Response(data, result, 'create'); - response.created = data ? 1 : 0; - response = _this2.respond(response, opts); - - // afterCreate lifecycle hook - op = opts.op = 'afterCreate'; - return jsData.utils.resolve(_this2[op](mapper, props, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); - }); - }, + /** + * Destroy the record with the given primary key. Called by + * `Mapper#destroy`. + * + * @name Adapter#destroy + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id Primary key of the record to destroy. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + destroy: function destroy(mapper, id, opts) { + var _this4 = this; + var op = void 0; + opts || (opts = {}); - /** - * Create multiple records in a single batch. Called by `Mapper#createMany`. - * - * @name Adapter#createMany - * @method - * @param {Object} mapper The mapper. - * @param {Object} props The records to be created. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - createMany: function createMany(mapper, props, opts) { - var _this3 = this; - - var op = void 0; - props || (props = {}); - opts || (opts = {}); - - // beforeCreateMany lifecycle hook - op = opts.op = 'beforeCreateMany'; - return jsData.utils.resolve(this[op](mapper, props, opts)).then(function (_props) { - // Allow for re-assignment from lifecycle hook - props = _props === undefined ? props : _props; - props = props.map(function (record) { - return withoutRelations(mapper, record, opts); - }); - op = opts.op = 'createMany'; - _this3.dbg(op, mapper, props, opts); - return jsData.utils.resolve(_this3._createMany(mapper, props, opts)); - }).then(function (results) { - var _results3 = slicedToArray(results, 2); - - var data = _results3[0]; - var result = _results3[1]; - - data || (data = []); - result || (result = {}); - var response = new Response(data, result, 'createMany'); - response.created = data.length; - response = _this3.respond(response, opts); - - // afterCreateMany lifecycle hook - op = opts.op = 'afterCreateMany'; - return jsData.utils.resolve(_this3[op](mapper, props, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + // beforeDestroy lifecycle hook + op = opts.op = 'beforeDestroy'; + return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { + op = opts.op = 'destroy'; + _this4.dbg(op, mapper, id, opts); + return jsData.utils.resolve(_this4._destroy(mapper, id, opts)); + }).then(function (results) { + var _results4 = slicedToArray(results, 2), + data = _results4[0], + result = _results4[1]; + + result || (result = {}); + var response = new Response(data, result, 'destroy'); + response = _this4.respond(response, opts); + + // afterDestroy lifecycle hook + op = opts.op = 'afterDestroy'; + return jsData.utils.resolve(_this4[op](mapper, id, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); - }, + }); + }, - /** - * Destroy the record with the given primary key. Called by - * `Mapper#destroy`. - * - * @name Adapter#destroy - * @method - * @param {Object} mapper The mapper. - * @param {(string|number)} id Primary key of the record to destroy. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - destroy: function destroy(mapper, id, opts) { - var _this4 = this; - - var op = void 0; - opts || (opts = {}); - - // beforeDestroy lifecycle hook - op = opts.op = 'beforeDestroy'; - return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { - op = opts.op = 'destroy'; - _this4.dbg(op, mapper, id, opts); - return jsData.utils.resolve(_this4._destroy(mapper, id, opts)); - }).then(function (results) { - var _results4 = slicedToArray(results, 2); - - var data = _results4[0]; - var result = _results4[1]; - - result || (result = {}); - var response = new Response(data, result, 'destroy'); - response = _this4.respond(response, opts); - - // afterDestroy lifecycle hook - op = opts.op = 'afterDestroy'; - return jsData.utils.resolve(_this4[op](mapper, id, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); - }); - }, + /** + * Destroy the records that match the selection query. Called by + * `Mapper#destroyAll`. + * + * @name Adapter#destroyAll + * @method + * @param {Object} mapper the mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + destroyAll: function destroyAll(mapper, query, opts) { + var _this5 = this; + var op = void 0; + query || (query = {}); + opts || (opts = {}); - /** - * Destroy the records that match the selection query. Called by - * `Mapper#destroyAll`. - * - * @name Adapter#destroyAll - * @method - * @param {Object} mapper the mapper. - * @param {Object} [query] Selection query. - * @param {Object} [query.where] Filtering criteria. - * @param {string|Array} [query.orderBy] Sorting criteria. - * @param {string|Array} [query.sort] Same as `query.sort`. - * @param {number} [query.limit] Limit results. - * @param {number} [query.skip] Offset results. - * @param {number} [query.offset] Same as `query.skip`. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - destroyAll: function destroyAll(mapper, query, opts) { - var _this5 = this; - - var op = void 0; - query || (query = {}); - opts || (opts = {}); - - // beforeDestroyAll lifecycle hook - op = opts.op = 'beforeDestroyAll'; - return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { - op = opts.op = 'destroyAll'; - _this5.dbg(op, mapper, query, opts); - return jsData.utils.resolve(_this5._destroyAll(mapper, query, opts)); - }).then(function (results) { - var _results5 = slicedToArray(results, 2); - - var data = _results5[0]; - var result = _results5[1]; - - result || (result = {}); - var response = new Response(data, result, 'destroyAll'); - response = _this5.respond(response, opts); - - // afterDestroyAll lifecycle hook - op = opts.op = 'afterDestroyAll'; - return jsData.utils.resolve(_this5[op](mapper, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + // beforeDestroyAll lifecycle hook + op = opts.op = 'beforeDestroyAll'; + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { + op = opts.op = 'destroyAll'; + _this5.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this5._destroyAll(mapper, query, opts)); + }).then(function (results) { + var _results5 = slicedToArray(results, 2), + data = _results5[0], + result = _results5[1]; + + result || (result = {}); + var response = new Response(data, result, 'destroyAll'); + response = _this5.respond(response, opts); + + // afterDestroyAll lifecycle hook + op = opts.op = 'afterDestroyAll'; + return jsData.utils.resolve(_this5[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); - }, + }); + }, - /** - * Load a belongsTo relationship. - * - * Override with care. - * - * @name Adapter#loadBelongsTo - * @method - * @return {Promise} - */ - loadBelongsTo: function loadBelongsTo(mapper, def, records, __opts) { - var _this6 = this; - - var relationDef = def.getRelation(); - - if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - var _ret = function () { - var record = records; - return { - v: _this6.find(relationDef, _this6.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { - def.setLocalField(record, relatedItem); - }) - }; - }(); + /** + * Load a belongsTo relationship. + * + * Override with care. + * + * @name Adapter#loadBelongsTo + * @method + * @return {Promise} + */ + loadBelongsTo: function loadBelongsTo(mapper, def, records, __opts) { + var _this6 = this; - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } else { - var keys = records.map(function (record) { - return _this6.makeBelongsToForeignKey(mapper, def, record); - }).filter(function (key) { - return key; - }); - return this.findAll(relationDef, { - where: defineProperty({}, relationDef.idAttribute, { - 'in': keys + var relationDef = def.getRelation(); + + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + var _ret = function () { + var record = records; + return { + v: _this6.find(relationDef, _this6.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { + def.setLocalField(record, relatedItem); }) - }, __opts).then(function (relatedItems) { - records.forEach(function (record) { - relatedItems.forEach(function (relatedItem) { - if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) { - def.setLocalField(record, relatedItem); - } - }); + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } else { + var keys = records.map(function (record) { + return _this6.makeBelongsToForeignKey(mapper, def, record); + }).filter(function (key) { + return key; + }); + return this.findAll(relationDef, { + where: defineProperty({}, relationDef.idAttribute, { + 'in': keys + }) + }, __opts).then(function (relatedItems) { + records.forEach(function (record) { + relatedItems.forEach(function (relatedItem) { + if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) { + def.setLocalField(record, relatedItem); + } }); }); - } - }, + }); + } + }, - /** - * Retrieve the record with the given primary key. Called by `Mapper#find`. - * - * @name Adapter#find - * @method - * @param {Object} mapper The mapper. - * @param {(string|number)} id Primary key of the record to retrieve. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @param {string[]} [opts.with=[]] Relations to eager load. - * @return {Promise} - */ - find: function find(mapper, id, opts) { - var _this7 = this; - - var record = void 0, - op = void 0; - var meta = {}; - opts || (opts = {}); - opts.with || (opts.with = []); - - // beforeFind lifecycle hook - op = opts.op = 'beforeFind'; - return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { - op = opts.op = 'find'; - _this7.dbg(op, mapper, id, opts); - return jsData.utils.resolve(_this7._find(mapper, id, opts)); - }).then(function (results) { - var _results6 = slicedToArray(results, 2); - - var _record = _results6[0]; - var _meta = _results6[1]; - - if (!_record) { - return; - } - record = _record; - meta = _meta; - var tasks = []; - - jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { - var task = void 0; - if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { - if (def.type === 'hasOne') { - task = _this7.loadHasOne(mapper, def, record, __opts); - } else { - task = _this7.loadHasMany(mapper, def, record, __opts); - } - } else if (def.type === 'hasMany' && def.localKeys) { - task = _this7.loadHasManyLocalKeys(mapper, def, record, __opts); - } else if (def.type === 'hasMany' && def.foreignKeys) { - task = _this7.loadHasManyForeignKeys(mapper, def, record, __opts); - } else if (def.type === 'belongsTo') { - task = _this7.loadBelongsTo(mapper, def, record, __opts); - } - if (task) { - tasks.push(task); + /** + * Retrieve the record with the given primary key. Called by `Mapper#find`. + * + * @name Adapter#find + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id Primary key of the record to retrieve. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @param {string[]} [opts.with=[]] Relations to eager load. + * @return {Promise} + */ + find: function find(mapper, id, opts) { + var _this7 = this; + + var record = void 0, + op = void 0; + var meta = {}; + opts || (opts = {}); + opts.with || (opts.with = []); + + // beforeFind lifecycle hook + op = opts.op = 'beforeFind'; + return jsData.utils.resolve(this[op](mapper, id, opts)).then(function () { + op = opts.op = 'find'; + _this7.dbg(op, mapper, id, opts); + return jsData.utils.resolve(_this7._find(mapper, id, opts)); + }).then(function (results) { + var _results6 = slicedToArray(results, 2), + _record = _results6[0], + _meta = _results6[1]; + + if (!_record) { + return; + } + record = _record; + meta = _meta; + var tasks = []; + + jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { + var task = void 0; + if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { + if (def.type === 'hasOne') { + task = _this7.loadHasOne(mapper, def, record, __opts); + } else { + task = _this7.loadHasMany(mapper, def, record, __opts); } - }); + } else if (def.type === 'hasMany' && def.localKeys) { + task = _this7.loadHasManyLocalKeys(mapper, def, record, __opts); + } else if (def.type === 'hasMany' && def.foreignKeys) { + task = _this7.loadHasManyForeignKeys(mapper, def, record, __opts); + } else if (def.type === 'belongsTo') { + task = _this7.loadBelongsTo(mapper, def, record, __opts); + } + if (task) { + tasks.push(task); + } + }); - return jsData.utils.Promise.all(tasks); - }).then(function () { - var response = new Response(record, meta, 'find'); - response.found = record ? 1 : 0; - response = _this7.respond(response, opts); + return jsData.utils.Promise.all(tasks); + }).then(function () { + var response = new Response(record, meta, 'find'); + response.found = record ? 1 : 0; + response = _this7.respond(response, opts); - // afterFind lifecycle hook - op = opts.op = 'afterFind'; - return jsData.utils.resolve(_this7[op](mapper, id, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + // afterFind lifecycle hook + op = opts.op = 'afterFind'; + return jsData.utils.resolve(_this7[op](mapper, id, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); - }, + }); + }, - /** - * Retrieve the records that match the selection query. - * - * @name Adapter#findAll - * @method - * @param {Object} mapper The mapper. - * @param {Object} [query] Selection query. - * @param {Object} [query.where] Filtering criteria. - * @param {string|Array} [query.orderBy] Sorting criteria. - * @param {string|Array} [query.sort] Same as `query.sort`. - * @param {number} [query.limit] Limit results. - * @param {number} [query.skip] Offset results. - * @param {number} [query.offset] Same as `query.skip`. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @param {string[]} [opts.with=[]] Relations to eager load. - * @return {Promise} - */ - findAll: function findAll(mapper, query, opts) { - var _this8 = this; - - opts || (opts = {}); - opts.with || (opts.with = []); - - var records = []; - var meta = {}; - var op = void 0; - var activeWith = opts._activeWith; - - if (jsData.utils.isObject(activeWith)) { - var activeQuery = activeWith.query || {}; - if (activeWith.replace) { - query = activeQuery; - } else { - jsData.utils.deepFillIn(query, activeQuery); - } + /** + * Retrieve the records that match the selection query. + * + * @name Adapter#findAll + * @method + * @param {Object} mapper The mapper. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @param {string[]} [opts.with=[]] Relations to eager load. + * @return {Promise} + */ + findAll: function findAll(mapper, query, opts) { + var _this8 = this; + + opts || (opts = {}); + opts.with || (opts.with = []); + + var records = []; + var meta = {}; + var op = void 0; + var activeWith = opts._activeWith; + + if (jsData.utils.isObject(activeWith)) { + var activeQuery = activeWith.query || {}; + if (activeWith.replace) { + query = activeQuery; + } else { + jsData.utils.deepFillIn(query, activeQuery); } + } - // beforeFindAll lifecycle hook - op = opts.op = 'beforeFindAll'; - return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { - op = opts.op = 'findAll'; - _this8.dbg(op, mapper, query, opts); - return jsData.utils.resolve(_this8._findAll(mapper, query, opts)); - }).then(function (results) { - var _results7 = slicedToArray(results, 2); - - var _records = _results7[0]; - var _meta = _results7[1]; - - _records || (_records = []); - records = _records; - meta = _meta; - var tasks = []; - jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { - var task = void 0; - if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { - if (def.type === 'hasMany') { - task = _this8.loadHasMany(mapper, def, records, __opts); - } else { - task = _this8.loadHasOne(mapper, def, records, __opts); - } - } else if (def.type === 'hasMany' && def.localKeys) { - task = _this8.loadHasManyLocalKeys(mapper, def, records, __opts); - } else if (def.type === 'hasMany' && def.foreignKeys) { - task = _this8.loadHasManyForeignKeys(mapper, def, records, __opts); - } else if (def.type === 'belongsTo') { - task = _this8.loadBelongsTo(mapper, def, records, __opts); - } - if (task) { - tasks.push(task); + // beforeFindAll lifecycle hook + op = opts.op = 'beforeFindAll'; + return jsData.utils.resolve(this[op](mapper, query, opts)).then(function () { + op = opts.op = 'findAll'; + _this8.dbg(op, mapper, query, opts); + return jsData.utils.resolve(_this8._findAll(mapper, query, opts)); + }).then(function (results) { + var _results7 = slicedToArray(results, 2), + _records = _results7[0], + _meta = _results7[1]; + + _records || (_records = []); + records = _records; + meta = _meta; + var tasks = []; + jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { + var task = void 0; + if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { + if (def.type === 'hasMany') { + task = _this8.loadHasMany(mapper, def, records, __opts); + } else { + task = _this8.loadHasOne(mapper, def, records, __opts); } - }); - return jsData.utils.Promise.all(tasks); - }).then(function () { - var response = new Response(records, meta, 'findAll'); - response.found = records.length; - response = _this8.respond(response, opts); - - // afterFindAll lifecycle hook - op = opts.op = 'afterFindAll'; - return jsData.utils.resolve(_this8[op](mapper, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + } else if (def.type === 'hasMany' && def.localKeys) { + task = _this8.loadHasManyLocalKeys(mapper, def, records, __opts); + } else if (def.type === 'hasMany' && def.foreignKeys) { + task = _this8.loadHasManyForeignKeys(mapper, def, records, __opts); + } else if (def.type === 'belongsTo') { + task = _this8.loadBelongsTo(mapper, def, records, __opts); + } + if (task) { + tasks.push(task); + } }); - }, + return jsData.utils.Promise.all(tasks); + }).then(function () { + var response = new Response(records, meta, 'findAll'); + response.found = records.length; + response = _this8.respond(response, opts); + + // afterFindAll lifecycle hook + op = opts.op = 'afterFindAll'; + return jsData.utils.resolve(_this8[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + }, - /** - * Resolve the value of the specified option based on the given options and - * this adapter's settings. Override with care. - * - * @name Adapter#getOpt - * @method - * @param {string} opt The name of the option. - * @param {Object} [opts] Configuration options. - * @return {*} The value of the specified option. - */ - getOpt: function getOpt(opt, opts) { - opts || (opts = {}); - return opts[opt] === undefined ? jsData.utils.plainCopy(this[opt]) : jsData.utils.plainCopy(opts[opt]); - }, + /** + * Resolve the value of the specified option based on the given options and + * this adapter's settings. Override with care. + * + * @name Adapter#getOpt + * @method + * @param {string} opt The name of the option. + * @param {Object} [opts] Configuration options. + * @return {*} The value of the specified option. + */ + getOpt: function getOpt(opt, opts) { + opts || (opts = {}); + return opts[opt] === undefined ? jsData.utils.plainCopy(this[opt]) : jsData.utils.plainCopy(opts[opt]); + }, - /** - * Load a hasMany relationship. - * - * Override with care. - * - * @name Adapter#loadHasMany - * @method - * @return {Promise} - */ - loadHasMany: function loadHasMany(mapper, def, records, __opts) { - var _this9 = this; + /** + * Load a hasMany relationship. + * + * Override with care. + * + * @name Adapter#loadHasMany + * @method + * @return {Promise} + */ + loadHasMany: function loadHasMany(mapper, def, records, __opts) { + var _this9 = this; - var singular = false; + var singular = false; - if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - singular = true; - records = [records]; - } - var IDs = records.map(function (record) { - return _this9.makeHasManyForeignKey(mapper, def, record); + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + singular = true; + records = [records]; + } + var IDs = records.map(function (record) { + return _this9.makeHasManyForeignKey(mapper, def, record); + }); + var query = { + where: {} + }; + var criteria = query.where[def.foreignKey] = {}; + if (singular) { + // more efficient query when we only have one record + criteria['=='] = IDs[0]; + } else { + criteria['in'] = IDs.filter(function (id) { + return id; }); - var query = { - where: {} - }; - var criteria = query.where[def.foreignKey] = {}; - if (singular) { - // more efficient query when we only have one record - criteria['=='] = IDs[0]; - } else { - criteria['in'] = IDs.filter(function (id) { - return id; - }); - } - return this.findAll(def.getRelation(), query, __opts).then(function (relatedItems) { - records.forEach(function (record) { - var attached = []; - // avoid unneccesary iteration when we only have one record - if (singular) { - attached = relatedItems; - } else { - relatedItems.forEach(function (relatedItem) { - if (jsData.utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) { - attached.push(relatedItem); - } - }); - } - def.setLocalField(record, attached); - }); + } + return this.findAll(def.getRelation(), query, __opts).then(function (relatedItems) { + records.forEach(function (record) { + var attached = []; + // avoid unneccesary iteration when we only have one record + if (singular) { + attached = relatedItems; + } else { + relatedItems.forEach(function (relatedItem) { + if (jsData.utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) { + attached.push(relatedItem); + } + }); + } + def.setLocalField(record, attached); }); - }, - loadHasManyLocalKeys: function loadHasManyLocalKeys(mapper, def, records, __opts) { - var _this10 = this; + }); + }, + loadHasManyLocalKeys: function loadHasManyLocalKeys(mapper, def, records, __opts) { + var _this10 = this; - var record = void 0; - var relatedMapper = def.getRelation(); + var record = void 0; + var relatedMapper = def.getRelation(); - if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - record = records; - } + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + record = records; + } - if (record) { - return this.findAll(relatedMapper, { - where: defineProperty({}, relatedMapper.idAttribute, { - 'in': this.makeHasManyLocalKeys(mapper, def, record) - }) - }, __opts).then(function (relatedItems) { - def.setLocalField(record, relatedItems); + if (record) { + return this.findAll(relatedMapper, { + where: defineProperty({}, relatedMapper.idAttribute, { + 'in': this.makeHasManyLocalKeys(mapper, def, record) + }) + }, __opts).then(function (relatedItems) { + def.setLocalField(record, relatedItems); + }); + } else { + var _ret2 = function () { + var localKeys = []; + records.forEach(function (record) { + localKeys = localKeys.concat(_this10.makeHasManyLocalKeys(mapper, def, record)); }); - } else { - var _ret2 = function () { - var localKeys = []; - records.forEach(function (record) { - localKeys = localKeys.concat(_this10.makeHasManyLocalKeys(mapper, def, record)); - }); - return { - v: _this10.findAll(relatedMapper, { - where: defineProperty({}, relatedMapper.idAttribute, { - 'in': unique(localKeys).filter(function (x) { - return x; - }) + return { + v: _this10.findAll(relatedMapper, { + where: defineProperty({}, relatedMapper.idAttribute, { + 'in': unique(localKeys).filter(function (x) { + return x; }) - }, __opts).then(function (relatedItems) { - records.forEach(function (item) { - var attached = []; - var itemKeys = jsData.utils.get(item, def.localKeys) || []; - itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); - relatedItems.forEach(function (relatedItem) { - if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) { - attached.push(relatedItem); - } - }); - def.setLocalField(item, attached); - }); - return relatedItems; }) - }; - }(); + }, __opts).then(function (relatedItems) { + records.forEach(function (item) { + var attached = []; + var itemKeys = jsData.utils.get(item, def.localKeys) || []; + itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); + relatedItems.forEach(function (relatedItem) { + if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) { + attached.push(relatedItem); + } + }); + def.setLocalField(item, attached); + }); + return relatedItems; + }) + }; + }(); - if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; - } - }, - loadHasManyForeignKeys: function loadHasManyForeignKeys(mapper, def, records, __opts) { - var _this11 = this; + if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; + } + }, + loadHasManyForeignKeys: function loadHasManyForeignKeys(mapper, def, records, __opts) { + var _this11 = this; - var relatedMapper = def.getRelation(); - var idAttribute = mapper.idAttribute; - var record = void 0; + var relatedMapper = def.getRelation(); + var idAttribute = mapper.idAttribute; + var record = void 0; - if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - record = records; - } + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + record = records; + } - if (record) { - return this.findAll(def.getRelation(), { - where: defineProperty({}, def.foreignKeys, { - 'contains': this.makeHasManyForeignKeys(mapper, def, record) - }) - }, __opts).then(function (relatedItems) { - def.setLocalField(record, relatedItems); - }); - } else { - return this.findAll(relatedMapper, { - where: defineProperty({}, def.foreignKeys, { - 'isectNotEmpty': records.map(function (record) { - return _this11.makeHasManyForeignKeys(mapper, def, record); - }) + if (record) { + return this.findAll(def.getRelation(), { + where: defineProperty({}, def.foreignKeys, { + 'contains': this.makeHasManyForeignKeys(mapper, def, record) + }) + }, __opts).then(function (relatedItems) { + def.setLocalField(record, relatedItems); + }); + } else { + return this.findAll(relatedMapper, { + where: defineProperty({}, def.foreignKeys, { + 'isectNotEmpty': records.map(function (record) { + return _this11.makeHasManyForeignKeys(mapper, def, record); }) - }, __opts).then(function (relatedItems) { - var foreignKeysField = def.foreignKeys; - records.forEach(function (record) { - var _relatedItems = []; - var id = jsData.utils.get(record, idAttribute); - relatedItems.forEach(function (relatedItem) { - var foreignKeys = jsData.utils.get(relatedItems, foreignKeysField) || []; - if (foreignKeys.indexOf(id) !== -1) { - _relatedItems.push(relatedItem); - } - }); - def.setLocalField(record, _relatedItems); + }) + }, __opts).then(function (relatedItems) { + var foreignKeysField = def.foreignKeys; + records.forEach(function (record) { + var _relatedItems = []; + var id = jsData.utils.get(record, idAttribute); + relatedItems.forEach(function (relatedItem) { + var foreignKeys = jsData.utils.get(relatedItems, foreignKeysField) || []; + if (foreignKeys.indexOf(id) !== -1) { + _relatedItems.push(relatedItem); + } }); + def.setLocalField(record, _relatedItems); }); - } - }, + }); + } + }, - /** - * Load a hasOne relationship. - * - * Override with care. - * - * @name Adapter#loadHasOne - * @method - * @return {Promise} - */ - loadHasOne: function loadHasOne(mapper, def, records, __opts) { - if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - records = [records]; - } - return this.loadHasMany(mapper, def, records, __opts).then(function () { - records.forEach(function (record) { - var relatedData = def.getLocalField(record); - if (jsData.utils.isArray(relatedData) && relatedData.length) { - def.setLocalField(record, relatedData[0]); - } - }); + /** + * Load a hasOne relationship. + * + * Override with care. + * + * @name Adapter#loadHasOne + * @method + * @return {Promise} + */ + loadHasOne: function loadHasOne(mapper, def, records, __opts) { + if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { + records = [records]; + } + return this.loadHasMany(mapper, def, records, __opts).then(function () { + records.forEach(function (record) { + var relatedData = def.getLocalField(record); + if (jsData.utils.isArray(relatedData) && relatedData.length) { + def.setLocalField(record, relatedData[0]); + } }); - }, + }); + }, - /** - * Return the foreignKey from the given record for the provided relationship. - * - * There may be reasons why you may want to override this method, like when - * the id of the parent doesn't exactly match up to the key on the child. - * - * Override with care. - * - * @name Adapter#makeHasManyForeignKey - * @method - * @return {*} - */ - makeHasManyForeignKey: function makeHasManyForeignKey(mapper, def, record) { - return def.getForeignKey(record); - }, + /** + * Return the foreignKey from the given record for the provided relationship. + * + * There may be reasons why you may want to override this method, like when + * the id of the parent doesn't exactly match up to the key on the child. + * + * Override with care. + * + * @name Adapter#makeHasManyForeignKey + * @method + * @return {*} + */ + makeHasManyForeignKey: function makeHasManyForeignKey(mapper, def, record) { + return def.getForeignKey(record); + }, - /** - * Return the localKeys from the given record for the provided relationship. - * - * Override with care. - * - * @name Adapter#makeHasManyLocalKeys - * @method - * @return {*} - */ - makeHasManyLocalKeys: function makeHasManyLocalKeys(mapper, def, record) { - var localKeys = []; - var itemKeys = jsData.utils.get(record, def.localKeys) || []; - itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); - localKeys = localKeys.concat(itemKeys); - return unique(localKeys).filter(function (x) { - return x; - }); - }, + /** + * Return the localKeys from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeHasManyLocalKeys + * @method + * @return {*} + */ + makeHasManyLocalKeys: function makeHasManyLocalKeys(mapper, def, record) { + var localKeys = []; + var itemKeys = jsData.utils.get(record, def.localKeys) || []; + itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); + localKeys = localKeys.concat(itemKeys); + return unique(localKeys).filter(function (x) { + return x; + }); + }, - /** - * Return the foreignKeys from the given record for the provided relationship. - * - * Override with care. - * - * @name Adapter#makeHasManyForeignKeys - * @method - * @return {*} - */ - makeHasManyForeignKeys: function makeHasManyForeignKeys(mapper, def, record) { - return jsData.utils.get(record, mapper.idAttribute); - }, + /** + * Return the foreignKeys from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeHasManyForeignKeys + * @method + * @return {*} + */ + makeHasManyForeignKeys: function makeHasManyForeignKeys(mapper, def, record) { + return jsData.utils.get(record, mapper.idAttribute); + }, - /** - * Return the foreignKey from the given record for the provided relationship. - * - * Override with care. - * - * @name Adapter#makeBelongsToForeignKey - * @method - * @return {*} - */ - makeBelongsToForeignKey: function makeBelongsToForeignKey(mapper, def, record) { - return def.getForeignKey(record); - }, + /** + * Return the foreignKey from the given record for the provided relationship. + * + * Override with care. + * + * @name Adapter#makeBelongsToForeignKey + * @method + * @return {*} + */ + makeBelongsToForeignKey: function makeBelongsToForeignKey(mapper, def, record) { + return def.getForeignKey(record); + }, - /** - * Retrieve sum of the specified field of the records that match the selection - * query. Called by `Mapper#sum`. - * - * @name Adapter#sum - * @method - * @param {Object} mapper The mapper. - * @param {string} field By to sum. - * @param {Object} [query] Selection query. - * @param {Object} [query.where] Filtering criteria. - * @param {string|Array} [query.orderBy] Sorting criteria. - * @param {string|Array} [query.sort] Same as `query.sort`. - * @param {number} [query.limit] Limit results. - * @param {number} [query.skip] Offset results. - * @param {number} [query.offset] Same as `query.skip`. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - sum: function sum(mapper, field, query, opts) { - var _this12 = this; - - var op = void 0; - if (!jsData.utils.isString(field)) { - throw new Error('field must be a string!'); - } - query || (query = {}); - opts || (opts = {}); - - // beforeSum lifecycle hook - op = opts.op = 'beforeSum'; - return jsData.utils.resolve(this[op](mapper, field, query, opts)).then(function () { - // Allow for re-assignment from lifecycle hook - op = opts.op = 'sum'; - _this12.dbg(op, mapper, field, query, opts); - return jsData.utils.resolve(_this12._sum(mapper, field, query, opts)); - }).then(function (results) { - var _results8 = slicedToArray(results, 2); - - var data = _results8[0]; - var result = _results8[1]; - - result || (result = {}); - var response = new Response(data, result, op); - response = _this12.respond(response, opts); - - // afterSum lifecycle hook - op = opts.op = 'afterSum'; - return jsData.utils.resolve(_this12[op](mapper, field, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); - }); - }, + /** + * Retrieve sum of the specified field of the records that match the selection + * query. Called by `Mapper#sum`. + * + * @name Adapter#sum + * @method + * @param {Object} mapper The mapper. + * @param {string} field By to sum. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + sum: function sum(mapper, field, query, opts) { + var _this12 = this; + var op = void 0; + if (!jsData.utils.isString(field)) { + throw new Error('field must be a string!'); + } + query || (query = {}); + opts || (opts = {}); - /** - * @name Adapter#respond - * @method - * @param {Object} response Response object. - * @param {Object} opts Configuration options. - * return {Object} If `opts.raw == true` then return `response`, else return - * `response.data`. - */ - respond: function respond(response, opts) { - return this.getOpt('raw', opts) ? response : response.data; - }, + // beforeSum lifecycle hook + op = opts.op = 'beforeSum'; + return jsData.utils.resolve(this[op](mapper, field, query, opts)).then(function () { + // Allow for re-assignment from lifecycle hook + op = opts.op = 'sum'; + _this12.dbg(op, mapper, field, query, opts); + return jsData.utils.resolve(_this12._sum(mapper, field, query, opts)); + }).then(function (results) { + var _results8 = slicedToArray(results, 2), + data = _results8[0], + result = _results8[1]; + + result || (result = {}); + var response = new Response(data, result, op); + response = _this12.respond(response, opts); + + // afterSum lifecycle hook + op = opts.op = 'afterSum'; + return jsData.utils.resolve(_this12[op](mapper, field, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + }, - /** - * Apply the given update to the record with the specified primary key. Called - * by `Mapper#update`. - * - * @name Adapter#update - * @method - * @param {Object} mapper The mapper. - * @param {(string|number)} id The primary key of the record to be updated. - * @param {Object} props The update to apply to the record. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - update: function update(mapper, id, props, opts) { - var _this13 = this; - - props || (props = {}); - opts || (opts = {}); - var op = void 0; - - // beforeUpdate lifecycle hook - op = opts.op = 'beforeUpdate'; - return jsData.utils.resolve(this[op](mapper, id, props, opts)).then(function (_props) { - // Allow for re-assignment from lifecycle hook - props = _props === undefined ? props : _props; - props = withoutRelations(mapper, props, opts); - op = opts.op = 'update'; - _this13.dbg(op, mapper, id, props, opts); - return jsData.utils.resolve(_this13._update(mapper, id, props, opts)); - }).then(function (results) { - var _results9 = slicedToArray(results, 2); - - var data = _results9[0]; - var result = _results9[1]; - - result || (result = {}); - var response = new Response(data, result, 'update'); - response.updated = data ? 1 : 0; - response = _this13.respond(response, opts); - - // afterUpdate lifecycle hook - op = opts.op = 'afterUpdate'; - return jsData.utils.resolve(_this13[op](mapper, id, props, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); - }); - }, + /** + * @name Adapter#respond + * @method + * @param {Object} response Response object. + * @param {Object} opts Configuration options. + * return {Object} If `opts.raw == true` then return `response`, else return + * `response.data`. + */ + respond: function respond(response, opts) { + return this.getOpt('raw', opts) ? response : response.data; + }, - /** - * Apply the given update to all records that match the selection query. - * Called by `Mapper#updateAll`. - * - * @name Adapter#updateAll - * @method - * @param {Object} mapper The mapper. - * @param {Object} props The update to apply to the selected records. - * @param {Object} [query] Selection query. - * @param {Object} [query.where] Filtering criteria. - * @param {string|Array} [query.orderBy] Sorting criteria. - * @param {string|Array} [query.sort] Same as `query.sort`. - * @param {number} [query.limit] Limit results. - * @param {number} [query.skip] Offset results. - * @param {number} [query.offset] Same as `query.skip`. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - updateAll: function updateAll(mapper, props, query, opts) { - var _this14 = this; - - props || (props = {}); - query || (query = {}); - opts || (opts = {}); - var op = void 0; - - // beforeUpdateAll lifecycle hook - op = opts.op = 'beforeUpdateAll'; - return jsData.utils.resolve(this[op](mapper, props, query, opts)).then(function (_props) { - // Allow for re-assignment from lifecycle hook - props = _props === undefined ? props : _props; - props = withoutRelations(mapper, props, opts); - op = opts.op = 'updateAll'; - _this14.dbg(op, mapper, props, query, opts); - return jsData.utils.resolve(_this14._updateAll(mapper, props, query, opts)); - }).then(function (results) { - var _results10 = slicedToArray(results, 2); - - var data = _results10[0]; - var result = _results10[1]; - - data || (data = []); - result || (result = {}); - var response = new Response(data, result, 'updateAll'); - response.updated = data.length; - response = _this14.respond(response, opts); - - // afterUpdateAll lifecycle hook - op = opts.op = 'afterUpdateAll'; - return jsData.utils.resolve(_this14[op](mapper, props, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + /** + * Apply the given update to the record with the specified primary key. Called + * by `Mapper#update`. + * + * @name Adapter#update + * @method + * @param {Object} mapper The mapper. + * @param {(string|number)} id The primary key of the record to be updated. + * @param {Object} props The update to apply to the record. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + update: function update(mapper, id, props, opts) { + var _this13 = this; + + props || (props = {}); + opts || (opts = {}); + var op = void 0; + + // beforeUpdate lifecycle hook + op = opts.op = 'beforeUpdate'; + return jsData.utils.resolve(this[op](mapper, id, props, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = _props === undefined ? props : _props; + props = withoutRelations(mapper, props, opts); + op = opts.op = 'update'; + _this13.dbg(op, mapper, id, props, opts); + return jsData.utils.resolve(_this13._update(mapper, id, props, opts)); + }).then(function (results) { + var _results9 = slicedToArray(results, 2), + data = _results9[0], + result = _results9[1]; + + result || (result = {}); + var response = new Response(data, result, 'update'); + response.updated = data ? 1 : 0; + response = _this13.respond(response, opts); + + // afterUpdate lifecycle hook + op = opts.op = 'afterUpdate'; + return jsData.utils.resolve(_this13[op](mapper, id, props, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); - }, + }); + }, - /** - * Update the given records in a single batch. Called by `Mapper#updateMany`. - * - * @name Adapter#updateMany - * @method - * @param {Object} mapper The mapper. - * @param {Object[]} records The records to update. - * @param {Object} [opts] Configuration options. - * @param {boolean} [opts.raw=false] Whether to return a more detailed - * response object. - * @return {Promise} - */ - updateMany: function updateMany(mapper, records, opts) { - var _this15 = this; - - records || (records = []); - opts || (opts = {}); - var op = void 0; - var idAttribute = mapper.idAttribute; - - records = records.filter(function (record) { - return jsData.utils.get(record, idAttribute); - }); + /** + * Apply the given update to all records that match the selection query. + * Called by `Mapper#updateAll`. + * + * @name Adapter#updateAll + * @method + * @param {Object} mapper The mapper. + * @param {Object} props The update to apply to the selected records. + * @param {Object} [query] Selection query. + * @param {Object} [query.where] Filtering criteria. + * @param {string|Array} [query.orderBy] Sorting criteria. + * @param {string|Array} [query.sort] Same as `query.sort`. + * @param {number} [query.limit] Limit results. + * @param {number} [query.skip] Offset results. + * @param {number} [query.offset] Same as `query.skip`. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + updateAll: function updateAll(mapper, props, query, opts) { + var _this14 = this; - // beforeUpdateMany lifecycle hook - op = opts.op = 'beforeUpdateMany'; - return jsData.utils.resolve(this[op](mapper, records, opts)).then(function (_records) { - // Allow for re-assignment from lifecycle hook - records = _records === undefined ? records : _records; - records = records.map(function (record) { - return withoutRelations(mapper, record, opts); - }); - op = opts.op = 'updateMany'; - _this15.dbg(op, mapper, records, opts); - return jsData.utils.resolve(_this15._updateMany(mapper, records, opts)); - }).then(function (results) { - var _results11 = slicedToArray(results, 2); - - var data = _results11[0]; - var result = _results11[1]; - - data || (data = []); - result || (result = {}); - var response = new Response(data, result, 'updateMany'); - response.updated = data.length; - response = _this15.respond(response, opts); - - // afterUpdateMany lifecycle hook - op = opts.op = 'afterUpdateMany'; - return jsData.utils.resolve(_this15[op](mapper, records, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + props || (props = {}); + query || (query = {}); + opts || (opts = {}); + var op = void 0; + + // beforeUpdateAll lifecycle hook + op = opts.op = 'beforeUpdateAll'; + return jsData.utils.resolve(this[op](mapper, props, query, opts)).then(function (_props) { + // Allow for re-assignment from lifecycle hook + props = _props === undefined ? props : _props; + props = withoutRelations(mapper, props, opts); + op = opts.op = 'updateAll'; + _this14.dbg(op, mapper, props, query, opts); + return jsData.utils.resolve(_this14._updateAll(mapper, props, query, opts)); + }).then(function (results) { + var _results10 = slicedToArray(results, 2), + data = _results10[0], + result = _results10[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'updateAll'); + response.updated = data.length; + response = _this14.respond(response, opts); + + // afterUpdateAll lifecycle hook + op = opts.op = 'afterUpdateAll'; + return jsData.utils.resolve(_this14[op](mapper, props, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; }); - } - }); + }); + }, + + + /** + * Update the given records in a single batch. Called by `Mapper#updateMany`. + * + * @name Adapter#updateMany + * @method + * @param {Object} mapper The mapper. + * @param {Object[]} records The records to update. + * @param {Object} [opts] Configuration options. + * @param {boolean} [opts.raw=false] Whether to return a more detailed + * response object. + * @return {Promise} + */ + updateMany: function updateMany(mapper, records, opts) { + var _this15 = this; - exports.noop = noop; - exports.noop2 = noop2; - exports.unique = unique; - exports.withoutRelations = withoutRelations; - exports.reserved = reserved; - exports.Response = Response; - exports.Adapter = Adapter; + records || (records = []); + opts || (opts = {}); + var op = void 0; + var idAttribute = mapper.idAttribute; - Object.defineProperty(exports, '__esModule', { value: true }); + records = records.filter(function (record) { + return jsData.utils.get(record, idAttribute); + }); -})); + // beforeUpdateMany lifecycle hook + op = opts.op = 'beforeUpdateMany'; + return jsData.utils.resolve(this[op](mapper, records, opts)).then(function (_records) { + // Allow for re-assignment from lifecycle hook + records = _records === undefined ? records : _records; + records = records.map(function (record) { + return withoutRelations(mapper, record, opts); + }); + op = opts.op = 'updateMany'; + _this15.dbg(op, mapper, records, opts); + return jsData.utils.resolve(_this15._updateMany(mapper, records, opts)); + }).then(function (results) { + var _results11 = slicedToArray(results, 2), + data = _results11[0], + result = _results11[1]; + + data || (data = []); + result || (result = {}); + var response = new Response(data, result, 'updateMany'); + response.updated = data.length; + response = _this15.respond(response, opts); + + // afterUpdateMany lifecycle hook + op = opts.op = 'afterUpdateMany'; + return jsData.utils.resolve(_this15[op](mapper, records, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + } +}); + +/** + * Create a subclass of this Adapter: + * + * @example Adapter.extend + * // Normally you would do: import {Adapter} from 'js-data' + * const JSData = require('js-data@3.0.0-beta.10') + * const {Adapter} = JSData + * console.log('Using JSData v' + JSData.version.full) + * + * // Extend the class using ES2015 class syntax. + * class CustomAdapterClass extends Adapter { + * foo () { return 'bar' } + * static beep () { return 'boop' } + * } + * const customAdapter = new CustomAdapterClass() + * console.log(customAdapter.foo()) + * console.log(CustomAdapterClass.beep()) + * + * // Extend the class using alternate method. + * const OtherAdapterClass = Adapter.extend({ + * foo () { return 'bar' } + * }, { + * beep () { return 'boop' } + * }) + * const otherAdapter = new OtherAdapterClass() + * console.log(otherAdapter.foo()) + * console.log(OtherAdapterClass.beep()) + * + * // Extend the class, providing a custom constructor. + * function AnotherAdapterClass () { + * Adapter.call(this) + * this.created_at = new Date().getTime() + * } + * Adapter.extend({ + * constructor: AnotherAdapterClass, + * foo () { return 'bar' } + * }, { + * beep () { return 'boop' } + * }) + * const anotherAdapter = new AnotherAdapterClass() + * console.log(anotherAdapter.created_at) + * console.log(anotherAdapter.foo()) + * console.log(AnotherAdapterClass.beep()) + * + * @method Adapter.extend + * @param {Object} [props={}] Properties to add to the prototype of the + * subclass. + * @param {Object} [props.constructor] Provide a custom constructor function + * to be used as the subclass itself. + * @param {Object} [classProps={}] Static properties to add to the subclass. + * @returns {Constructor} Subclass of this Adapter class. + */ + +exports.noop = noop; +exports.noop2 = noop2; +exports.unique = unique; +exports.withoutRelations = withoutRelations; +exports.reserved = reserved; +exports.Response = Response; +exports.Adapter = Adapter; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); //# sourceMappingURL=js-data-adapter.js.map diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index f6ef209..2d3fcf6 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import {Component, utils} from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this, opts)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["utils","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,IAAM,OAAO,SAAP,IAAO,GAAmB;AAAA,EAAA,oCAAN,IAAM;AAAN,EAAA,QAAM;AAAA,EAAA;;AACrC,EAAA,MAAM,OAAO,KAAK,KAAK,MAAL,GAAc,CAAnB,CAAb;AACA,EAAA,OAAK,GAAL,cAAS,KAAK,EAAd,SAAqB,IAArB;AACA,EAAA,SAAOA,aAAM,OA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B,MAAjB,EAAyB,MAAzB,EAAiC,IAAjC,CAAZ;AAAA,EAAA,OAAZ,CAAV;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,YAAf;AACA,EAAA,cAAK,GAAL,CAAS,EAAT,EAAa,MAAb,EAAqB,OAArB,EAA8B,IAA9B;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,WAAL,CAAiB,MAAjB,EAAyB,OAAzB,EAAkC,IAAlC,CAAd,CAAP;AACD,EAAA,KARI,EASJ,IATI,CASC,UAAC,OAAD,EAAa;AAAA,EAAA,qCACI,OADJ;;AAAA,EAAA,UACZ,IADY;AAAA,EAAA,UACN,MADM;;AAEjB,EAAA,eAAS,OAAO,EAAhB;AACA,EAAA,iBAAW,SAAS,EAApB;AACA,EAAA,UAAI,WAAW,IAAI,QAAJ,CAAa,IAAb,EAAmB,MAAnB,EAA2B,YAA3B,CAAf;AACA,EAAA,eAAS,OAAT,GAAmB,KAAK,MAAxB;AACA,EAAA,iBAAW,QAAK,OAAL,CAAa,QAAb,EAAuB,IAAvB,CAAX;;AAEA,EAAA;AACA,EAAA,WAAK,KAAK,EAAL,GAAU,iBAAf;AACA,EAAA,aAAOA,aAAM,OAAN,CAAc,QAAK,EAAL,EAAS,MAAT,EAAiB,OAAjB,EAA0B,IAA1B,EAAgC,QAAhC,CAAd,EACJ,IADI,CACC,UAAC,SAAD;AAAA,EAAA,eAAe,cAAc,SAAd,GAA0B,QAA1B,GAAqC,SAApD;AAAA,EAAA,OADD,CAAP;AAED,EAAA,KArBI,CAAP;AAsBD,EAAA;AA9xCc,EAAA,CAAjB,EAiyCA;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import { Component, utils } from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this, opts)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["noop","args","opts","length","dbg","op","utils","resolve","noop2","unique","array","seen","final","forEach","item","push","withoutRelations","mapper","props","with","relationFields","toStrip","filter","value","indexOf","omit","reserved","Response","data","meta","fillIn","DEFAULTS","Adapter","classCallCheck","call","Component","extend","query","then","_count","results","result","response","respond","_response","undefined","_props","_create","created","map","record","_createMany","id","_destroy","_destroyAll","def","records","__opts","relationDef","getRelation","isObject","isArray","find","makeBelongsToForeignKey","relatedItem","setLocalField","keys","key","findAll","idAttribute","relatedItems","foreignKey","_find","_record","_meta","tasks","forEachRelation","task","type","loadHasOne","loadHasMany","localKeys","loadHasManyLocalKeys","foreignKeys","loadHasManyForeignKeys","loadBelongsTo","Promise","all","found","activeWith","_activeWith","activeQuery","replace","deepFillIn","_findAll","_records","opt","plainCopy","singular","IDs","makeHasManyForeignKey","criteria","where","attached","get","relatedMapper","makeHasManyLocalKeys","concat","x","itemKeys","Object","makeHasManyForeignKeys","foreignKeysField","_relatedItems","relatedData","getLocalField","getForeignKey","field","isString","Error","_sum","getOpt","_update","updated","_updateAll","_updateMany"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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aAAMC,OAAN,CAAc,QAAKF,EAAL,EAASY,MAAT,EAAiBuC,OAAjB,EAA0BtD,IAA1B,EAAgCwC,QAAhC,CAAd,EACJJ,IADI,CACC,UAACM,SAAD;eAAeA,cAAcC,SAAd,GAA0BH,QAA1B,GAAqCE,SAApD;OADD,CAAP;KAnBG,CAAP;;CAxwCJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file From 741293a1bd6ad061545b7b8c1c89510a38cd03b2 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Sun, 2 Jul 2017 12:43:55 -0700 Subject: [PATCH 14/14] 1.0.0 --- dist/js-data-adapter-tests.js | 204 ++------------ dist/js-data-adapter-tests.js.map | 2 +- dist/js-data-adapter.js | 451 ++++++++---------------------- dist/js-data-adapter.js.map | 2 +- 4 files changed, 145 insertions(+), 514 deletions(-) diff --git a/dist/js-data-adapter-tests.js b/dist/js-data-adapter-tests.js index 7da19e6..942d126 100644 --- a/dist/js-data-adapter-tests.js +++ b/dist/js-data-adapter-tests.js @@ -1,10 +1,10 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chai'), require('sinon')) : - typeof define === 'function' && define.amd ? define('js-data-adapter-tests', ['chai', 'sinon'], factory) : - (global.JSDataAdapterTests = factory(global.chai,global.sinon)); + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chai'), require('sinon')) : + typeof define === 'function' && define.amd ? define('js-data-adapter-tests', ['chai', 'sinon'], factory) : + (global.JSDataAdapterTests = factory(global.chai,global.sinon)); }(this, (function (chai,sinon$1) { 'use strict'; -sinon$1 = 'default' in sinon$1 ? sinon$1['default'] : sinon$1; +sinon$1 = sinon$1 && 'default' in sinon$1 ? sinon$1['default'] : sinon$1; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; @@ -16,118 +16,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol -var asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -}(); @@ -203,30 +92,7 @@ var defineProperty = function (obj, key, value) { return obj; }; -var get = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - return getter.call(receiver); - } -}; var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { @@ -262,30 +128,6 @@ var possibleConstructorReturn = function (self, call) { return call && (typeof call === "object" || typeof call === "function") ? call : self; }; - - -var set = function set(object, property, value, receiver) { - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; -}; - /* global assert:true */ var afterCreateTest = function (options) { describe('Adapter#afterCreate', function () { @@ -303,7 +145,7 @@ var afterCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'afterCreate should have received options'); assert.equal(opts.op, 'afterCreate', 'opts.op'); }); @@ -349,7 +191,7 @@ var afterCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'afterCreate should have received options'); assert.equal(opts.op, 'afterCreate', 'opts.op'); return 'foo'; @@ -395,7 +237,7 @@ var afterCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) { + sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts, record) { assert.isDefined(opts, 'afterCreate should have received options'); assert.equal(opts.op, 'afterCreate', 'opts.op'); return Promise.resolve(); @@ -442,7 +284,7 @@ var afterCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'afterCreate should have received options'); assert.equal(opts.op, 'afterCreate', 'opts.op'); return 'foo'; @@ -488,7 +330,7 @@ var afterCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'afterCreate should have received options'); assert.equal(opts.op, 'afterCreate', 'opts.op'); }); @@ -546,7 +388,7 @@ var afterUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'afterUpdate should have received options'); assert.equal(opts.op, 'afterUpdate', 'opts.op'); }); @@ -608,7 +450,7 @@ var afterUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'afterUpdate should have received options'); assert.equal(opts.op, 'afterUpdate', 'opts.op'); }); @@ -673,7 +515,7 @@ var afterUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'afterUpdate should have received options'); assert.equal(opts.op, 'afterUpdate', 'opts.op'); return 'foo'; @@ -735,7 +577,7 @@ var afterUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'afterUpdate should have received options'); assert.equal(opts.op, 'afterUpdate', 'opts.op'); return Promise.resolve(); @@ -798,7 +640,7 @@ var afterUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'afterUpdate should have received options'); assert.equal(opts.op, 'afterUpdate', 'opts.op'); return Promise.resolve('foo'); @@ -869,7 +711,7 @@ var beforeCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'beforeCreate should have received options'); assert.equal(opts.op, 'beforeCreate', 'opts.op'); }); @@ -914,7 +756,7 @@ var beforeCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'beforeCreate should have received options'); assert.equal(opts.op, 'beforeCreate', 'opts.op'); return { name: 'Sally' }; @@ -960,7 +802,7 @@ var beforeCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'beforeCreate should have received options'); assert.equal(opts.op, 'beforeCreate', 'opts.op'); return Promise.resolve(); @@ -1006,7 +848,7 @@ var beforeCreateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) { + sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) { assert.isDefined(opts, 'beforeCreate should have received options'); assert.equal(opts.op, 'beforeCreate', 'opts.op'); return Promise.resolve({ name: 'Sally' }); @@ -1061,7 +903,7 @@ var beforeUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'beforeUpdate should have received options'); assert.equal(opts.op, 'beforeUpdate', 'opts.op'); }); @@ -1119,7 +961,7 @@ var beforeUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'beforeUpdate should have received options'); assert.equal(opts.op, 'beforeUpdate', 'opts.op'); return { name: 'Sally' }; @@ -1178,7 +1020,7 @@ var beforeUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'beforeUpdate should have received options'); assert.equal(opts.op, 'beforeUpdate', 'opts.op'); return Promise.resolve(); @@ -1237,7 +1079,7 @@ var beforeUpdateTest = function (options) { props = { name: 'John' }; - sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) { + sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) { assert.isDefined(opts, 'beforeUpdate should have received options'); assert.equal(opts.op, 'beforeUpdate', 'opts.op'); return Promise.resolve({ name: 'Sally' }); @@ -4381,7 +4223,7 @@ var updateTest = function (options) { store = this.$$container; - sinon.stub(adapter, '_update', function (mapper, id, props, opts) { + sinon.stub(adapter, '_update').callsFake(function (mapper, id, props, opts) { assert.deepEqual(props.posts, [{ id: 1234, userId: 1 diff --git a/dist/js-data-adapter-tests.js.map b/dist/js-data-adapter-tests.js.map index d785e28..1c76257 100644 --- a/dist/js-data-adapter-tests.js.map +++ b/dist/js-data-adapter-tests.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate', function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate', function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update', function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["options","equal","$$adapter","afterCreate","$$User","name","stub","adapter","mapper","props","opts","isDefined","op","debug","User","create","user","idAttribute","isTrue","calledOnce","firstCall","args","length","objectsEqual","isObject","restore","record","Promise","resolve","raw","result","created","data","afterUpdate","id","userId","update","updatedUser","updated","beforeCreate","beforeUpdate","count","user2","find","foundUser","createMany","age","user1","users","sort","a","b","filter","x","findAll","users3","destroy","beforeDestroy","afterDestroy","destroyedUser","isUndefined","beforeDestroyCalled","afterDestroyCalled","hasOwnProperty","deleted","destroyAll","foundUsers","destroyedUsers","constructor","extend","Adapter","SubAdapter","bar","err","subAdapter","foo","obj","setPrototypeOf","Profile","Post","Comment","Tag","$$Profile","$$Post","$$Comment","$$Tag","toClear","push","beforeFind","afterFind","beforeFindCalled","afterFindCalled","content","post","all","comments","postId","with","foundPost","equalObjects","found","email","profile","comment","status","post2","post3","post4","posts","hasFeature","value","tag","tag2","tagIds","tags","deepEqual","tagId","tag2Id","users2","result2","then","Error","message","comment2","profileId","profile1","post1","profile2","limit","offset","assert","query","sum","$$container","address","undefined","organization","store","_update","updateAll","userId1","userId2","users4","updateMany","m","JSON","parse","stringify","forEach","arg","i","log","prefix","hasMethod","method","methods","xmethods","indexOf","feature","features","xfeatures","adapterConfig","JSData","Container","containerConfig","$$store","DataStore","storeConfig","registerAdapter","userOptions","organizationOptions","postOptions","commentOptions","tagOptions","defineMapper","userConfig","utils","copy","$$Organization","organizationConfig","profileConfig","$$Address","addressConfig","postConfig","commentConfig","tagConfig","Test","Mapper","promise","msg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,IAAD,EAAOA,SAAP,EAAkB,EAAlB,EAAsB,EAAtB,EAA0B,IAA1B,EAAgC,KAAhC,EAAuC,YAAY,EAAnD,CA/NlB;iCAiOkB,CAAC,GAAD,EAAM,OAAN,EAAe,IAAf,EAAqBA,SAArB,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAjOlB;wCAmOyB,CAAC,IAAD,EAAOA,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CAnOzB;0CAqO2B,CAAC,IAAD,EAAOA,SAAP,EAAkB,EAAlB,EAAsB,IAAtB,EAA4B,KAA5B,EAAmC,YAAY,EAA/C,CArO3B;uBAuOQ,CAAC,QAAD,EAAW,IAAX,EAAiBA,SAAjB,EAA4B,EAA5B,EAAgC,EAAhC,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,YAAY,EAA7D,CAvOR;uBAyOQ,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,IAA1C,EAAgD,KAAhD,EAAuD,YAAY,EAAnE,CAzOR;wBA2OS,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,YAAY,EAA9D,CA3OT;yBA6OU,CAAC,QAAD,EAAW,GAAX,EAAgB,OAAhB,EAAyB,IAAzB,EAA+BA,SAA/B,EAA0C,EAA1C,EAA8C,EAA9C,EAAkD,IAAlD,EAAwD,KAAxD;CA7OzB;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter-tests.js","sources":["../test/afterCreate.test.js","../test/afterUpdate.test.js","../test/beforeCreate.test.js","../test/beforeUpdate.test.js","../test/count.test.js","../test/create.test.js","../test/createMany.test.js","../test/destroy.test.js","../test/destroyAll.test.js","../test/extend.test.js","../test/find.test.js","../test/findAll.test.js","../test/sum.test.js","../test/update.test.js","../test/updateAll.test.js","../test/updateMany.test.js","../test/index.js"],"sourcesContent":["/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterCreate, 'function', 'adapter should have a \"afterCreate\" method')\n })\n it('should call afterCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts, record) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isDefined(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user, 'foo', 'result should be \"foo\"')\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received record')\n adapter.afterCreate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'afterCreate should have received options')\n assert.equal(opts.op, 'afterCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const result = await adapter.create(User, props, { raw: true })\n assert.debug('created', User.name, result)\n\n assert.equal(result.created, 1, 'result.created')\n assert.equal(result.data.name, props.name, 'result.data.name')\n assert.isDefined(result.data[User.idAttribute], `result.data[${User.idAttribute}]`)\n\n assert.isTrue(adapter.afterCreate.calledOnce, 'afterCreate should have been called once')\n\n const args = adapter.afterCreate.firstCall.args\n assert.equal(args.length, 4, 'afterCreate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'afterCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'afterCreate should have received create props')\n assert.isObject(args[2], 'afterCreate should have received options')\n assert.isObject(args[3], 'afterCreate should have received result')\n assert.equal(args[3].created, 1, 'result.created')\n assert.isObject(args[3].data, 'result.data')\n adapter.afterCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#afterUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.afterUpdate, 'function', 'adapter should have a \"afterUpdate\" method')\n })\n it('should call afterUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should receive raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let result = await adapter.update(User, userId, { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.equal(result.data.name, 'Johnny', result.data.name)\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received update result')\n assert.equal(args[4].updated, 1, 'args[4].updated')\n assert.isDefined(args[4].data, 'args[4].data')\n assert.equal(args[4].data[User.idAttribute], userId, `args[4].data.${User.idAttribute}`)\n assert.equal(args[4].data.name, 'Johnny', 'args[4].data.name')\n adapter.afterUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return 'foo'\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'afterUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'afterUpdate should have received options')\n assert.equal(opts.op, 'afterUpdate', 'opts.op')\n return Promise.resolve('foo')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser, 'foo', 'should have received re-assigned value')\n\n assert.isTrue(adapter.afterUpdate.calledOnce, 'afterUpdate should have been called once')\n\n const args = adapter.afterUpdate.firstCall.args\n assert.equal(args.length, 5, 'beforeUpdate should have received 5 arguments')\n assert.isTrue(args[0] === User, 'afterUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'afterUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'afterUpdate should have received update props')\n assert.isDefined(args[3], 'afterUpdate should have received options')\n assert.equal(args[3].op, 'afterUpdate', 'args[3].op')\n assert.isDefined(args[4], 'afterUpdate should have received updated record')\n assert.equal(args[4][User.idAttribute], userId, `args[4].${User.idAttribute}`)\n assert.equal(args[4].name, 'Johnny', 'args[4].name')\n adapter.afterUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeCreate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeCreate, 'function', 'adapter should have a \"beforeCreate\" method')\n })\n it('should call beforeCreate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isDefined(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeCreate').callsFake(function (mapper, props, opts) {\n assert.isDefined(opts, 'beforeCreate should have received options')\n assert.equal(opts.op, 'beforeCreate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, 'Sally', 'name of user should be \"Sally\"')\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.isTrue(adapter.beforeCreate.calledOnce, 'beforeCreate should have been called once')\n\n const args = adapter.beforeCreate.firstCall.args\n assert.equal(args.length, 3, 'beforeCreate should have received 3 arguments')\n assert.isTrue(args[0] === User, 'beforeCreate should have received User mapper')\n assert.objectsEqual(args[1], { name: 'John' }, 'beforeCreate should have received create props')\n assert.isObject(args[2], 'beforeCreate should have received options')\n adapter.beforeCreate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#beforeUpdate', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.beforeUpdate, 'function', 'adapter should have a \"beforeUpdate\" method')\n })\n it('should call beforeUpdate', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return { name: 'Sally' }\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve()\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n it('should allow returning a promise and re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n sinon.stub(adapter, 'beforeUpdate').callsFake(function (mapper, id, props, opts) {\n assert.isDefined(opts, 'beforeUpdate should have received options')\n assert.equal(opts.op, 'beforeUpdate', 'opts.op')\n return Promise.resolve({ name: 'Sally' })\n })\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, userId, { name: 'Johnny' })\n let updatedUser = await adapter.update(User, userId, { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Sally')\n assert.equal(updatedUser[User.idAttribute], userId)\n\n assert.isTrue(adapter.beforeUpdate.calledOnce, 'beforeUpdate should have been called once')\n\n const args = adapter.beforeUpdate.firstCall.args\n assert.equal(args.length, 4, 'beforeUpdate should have received 4 arguments')\n assert.isTrue(args[0] === User, 'beforeUpdate should have received User mapper')\n assert.isTrue(args[1] === userId, 'beforeUpdate should have received user id')\n assert.objectsEqual(args[2], { name: 'Johnny' }, 'beforeUpdate should have received update props')\n assert.isObject(args[3], 'beforeUpdate should have received options')\n adapter.beforeUpdate.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#count', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.count, 'function', 'adapter should have a \"count\" method')\n })\n it('should count users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('count', User.name, {})\n let count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('count', User.name, {})\n count = await adapter.count(User)\n assert.debug('counted', User.name, count)\n assert.equal(count, 2)\n\n assert.debug('count', User.name, { name: 'John' })\n count = await adapter.count(User, { name: 'John' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n\n assert.debug('count', User.name, { name: 'Sally' })\n count = await adapter.count(User, { name: 'Sally' })\n assert.debug('counted', User.name, count)\n assert.equal(count, 1)\n })\n it('should count users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('count', User.name, props)\n const result = await adapter.count(User, props, { raw: true })\n assert.debug('counted', User.name, result)\n assert.equal(result.data, 1, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#create', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.create, 'function', 'adapter should have a \"create\" method')\n })\n it('should create a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, 'foundUser.name')\n assert.isDefined(foundUser[User.idAttribute], 'foundUser[User.idAttribute]')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#createMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.createMany, 'function', 'adapter should have a \"createMany\" method')\n })\n it('should create multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let user1 = { name: 'John', age: 20 }\n\n let user2 = { name: 'John', age: 30 }\n\n assert.debug('createMany', User.name, [user1, user2])\n const users = await adapter.createMany(User, [user1, user2])\n assert.debug('created', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.isDefined(users[0][User.idAttribute])\n assert.isDefined(users[1][User.idAttribute])\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { age: 20 })\n const users3 = await adapter.findAll(User, { age: 20 })\n assert.debug('found', User.name, users3)\n assert.equal(users3.length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroy', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroy, 'function', 'adapter should have a \"destroy\" method')\n })\n it('should destroy a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId)\n assert.debug('destroyed', User.name, destroyedUser)\n assert.isUndefined(destroyedUser, 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and allow afterDestroy re-assignment', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n let beforeDestroyCalled = false\n let afterDestroyCalled = false\n\n // Test beforeDestroy and afterDestroy\n adapter.beforeDestroy = function (mapper, id, opts) {\n beforeDestroyCalled = true\n assert.isObject(mapper, 'beforeDestroy should have received mapper argument')\n assert.isDefined(id, 'beforeDestroy should have received id argument')\n assert.isObject(opts, 'beforeDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve()\n }\n adapter.afterDestroy = function (mapper, id, opts) {\n afterDestroyCalled = true\n assert.isObject(mapper, 'afterDestroy should have received mapper argument')\n assert.isDefined(id, 'afterDestroy should have received id argument')\n assert.isObject(opts, 'afterDestroy should have received opts argument')\n // Test re-assignment\n return Promise.resolve('foo')\n }\n\n assert.debug('destroy', User.name, userId)\n const destroyedUser = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, destroyedUser)\n assert.equal(destroyedUser, 'foo', 'destroyedUser')\n assert.isTrue(beforeDestroyCalled, 'beforeDestroy should have been called')\n assert.isTrue(afterDestroyCalled, 'afterDestroy should have been called')\n })\n it('should destroy a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n let userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('destroy', User.name, userId)\n const result = await adapter.destroy(User, userId, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id')\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroy', User.name, 'non-existent-id')\n const result = await adapter.destroy(User, 'non-existent-id', { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#destroyAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.destroyAll, 'function', 'adapter should have a \"destroyAll\" method')\n })\n it('should destroy all users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n const userId = user[User.idAttribute]\n assert.debug('created', User.name, user)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally' })\n assert.debug('created', User.name, user2)\n\n assert.debug('findAll', User.name, { name: 'John' })\n let foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1, 'foundUsers.length')\n assert.equal(foundUsers[0][User.idAttribute], userId, 'foundUsers[0][User.idAttribute]')\n assert.equal(foundUsers[0].name, 'John', 'foundUsers[0].name')\n\n assert.debug('destroyAll', User.name, { name: 'John' })\n const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })\n assert.debug('destroyed', User.name, destroyedUsers)\n assert.isUndefined(destroyedUsers, 'destroyedUsers')\n\n assert.debug('findAll', User.name, { name: 'John' })\n foundUsers = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 0)\n\n assert.debug('findAll', User.name, {})\n foundUsers = await adapter.findAll(User, {})\n assert.debug('found', User.name, foundUsers)\n assert.equal(foundUsers.length, 1)\n })\n it('should destroy users and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('destroyAll', User.name, props)\n const result = await adapter.destroyAll(User, props, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 1, 'result.deleted')\n }\n })\n it('should destroy nothing', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {})\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result, 'result')\n })\n it('should destroy nothing and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('destroyAll', User.name, {})\n const result = await adapter.destroyAll(User, {}, { raw: true })\n assert.debug('destroyed', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n if (result.hasOwnProperty('deleted')) {\n assert.isDefined(result.deleted, 'result.deleted')\n assert.equal(result.deleted, 0, 'result.deleted')\n }\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter.extend', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.constructor.extend, 'function', 'adapter constructor function should have an \"extend\" method')\n })\n it('should return a subclass of the adapter class using extend', function () {\n const Adapter = this.$$adapter.constructor\n\n const SubAdapter = Adapter.extend({\n foo () {\n return 'foo'\n }\n }, {\n bar () {\n return 'bar'\n }\n })\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n it('should return a subclass of the adapter class using ES6 classes', function () {\n const Adapter = this.$$adapter.constructor\n\n class SubAdapter extends Adapter {\n foo () {\n return 'foo'\n }\n static bar () {\n return 'bar'\n }\n }\n\n assert.equal(SubAdapter.bar(), 'bar', 'SubAdapter.bar() should return \"bar\"')\n try {\n assert.isTrue(SubAdapter.extend === Adapter.extend, 'should have same static methods')\n } catch (err) {\n try {\n assert.equal(typeof SubAdapter.extend, 'function', 'should have same static methods')\n } catch (err) {\n var obj = {}\n if (obj.setPrototypeOf) {\n throw err\n }\n }\n }\n\n const subAdapter = new SubAdapter()\n\n assert.equal(subAdapter.foo(), 'foo', 'subAdapter.foo() should return \"foo\"')\n assert.isTrue(subAdapter.find === subAdapter.find, 'should have same instance methods')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#find', function () {\n var adapter, User, Profile, Post, Comment, Tag\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n Tag = this.$$Tag\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.find, 'function', 'adapter should have a \"find\" method')\n })\n\n it('should find a user', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n // Test beforeFind and afterFind\n let beforeFindCalled = false\n let afterFindCalled = false\n adapter.beforeFind = function (mapper, id, opts) {\n beforeFindCalled = true\n assert.isObject(mapper, 'beforeFind should have received mapper argument')\n assert.isDefined(id, 'beforeFind should have received id argument')\n assert.equal(id, userId, 'beforeFind should have received correct id argument')\n assert.isObject(opts, 'beforeFind should have received opts argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Optionally return a promise for async\n return Promise.resolve()\n }\n\n assert.debug('find', User.name, userId)\n let foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'John', 'name of found user should be \"John\"')\n assert.equal(foundUser[User.idAttribute], userId, 'found user should have correct id')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n\n // should allow re-assignment\n beforeFindCalled = false\n afterFindCalled = false\n adapter.afterFind = function (mapper, id, opts, record) {\n afterFindCalled = true\n assert.isObject(mapper, 'afterFind should have received mapper argument')\n assert.isDefined(id, 'afterFind should have received id argument')\n assert.equal(id, userId, 'afterFind should have received correct id argument')\n assert.isObject(opts, 'afterFind should have received opts argument')\n assert.isObject(record, 'afterFind should have received record argument')\n // Test re-assignment\n return Promise.resolve({ name: 'Sally', [User.idAttribute]: userId })\n }\n\n assert.debug('find', User.name, userId)\n foundUser = await adapter.find(User, userId)\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Sally', 'foundUser.name')\n assert.equal(foundUser[User.idAttribute], userId, 'foundUser[User.idAttribute]')\n assert.isTrue(beforeFindCalled, 'beforeFind should have been called')\n assert.isTrue(afterFindCalled, 'afterFind should have been called')\n // clear hooks\n delete adapter.beforeFind\n delete adapter.afterFind\n\n props = { content: 'test', userId: userId }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n const postId = post[Post.idAttribute]\n\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post[Post.idAttribute], 'post[Post.idAttribute]')\n assert.equal(post.userId, userId, 'post.userId')\n\n props = [\n {\n content: 'test2',\n postId,\n userId\n },\n {\n content: 'test3',\n postId,\n userId\n }\n ]\n assert.debug('create', Comment.name, props)\n const comments = await Promise.all([\n adapter.create(Comment, props[0]),\n adapter.create(Comment, props[1])\n ])\n assert.debug('created', Comment.name, comments)\n\n comments.sort(function (a, b) {\n return a.content > b.content\n })\n\n assert.debug('find', Post.name, postId)\n const foundPost = await adapter.find(Post, postId, { with: ['user', 'comment'] })\n assert.debug('found', Post.name, foundPost)\n foundPost.comments.sort(function (a, b) {\n return a.content > b.content\n })\n assert.equalObjects(foundPost.user, user, 'foundPost.user')\n assert.equalObjects(foundPost.comments, comments, 'foundPost.comments')\n })\n\n it('should return raw', async function () {\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n assert.equal(user.name, 'John', 'user.name')\n assert.isDefined(user[User.idAttribute], 'user[User.idAttribute]')\n\n assert.debug('find', User.name, userId)\n const result = await adapter.find(User, userId, { raw: true })\n assert.debug('found', User.name, result)\n assert.isDefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.data.name, 'John', 'result.data.name')\n assert.equal(result.data[User.idAttribute], userId, `result.data.${User.idAttribute}`)\n assert.equal(result.found, 1, 'result.found')\n })\n\n it('should return nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id')\n assert.debug('found', User.name, result)\n assert.isUndefined(result, 'result')\n })\n\n it('should return raw and nothing', async function () {\n assert.debug('find', User.name, 'non-existent-id')\n const result = await adapter.find(User, 'non-existent-id', { raw: true })\n assert.debug('found', User.name, result)\n assert.isUndefined(result.data, 'result.data')\n assert.isDefined(result.found, 'result.found')\n assert.equal(result.found, 0, 'result.found')\n })\n\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.user, 'comment.user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': ['post']})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 1, 'user.posts.length')\n\n assert.debug('find', User.name, user[User.idAttribute])\n user = await adapter.find(User, user[User.idAttribute], {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, user)\n\n assert.isDefined(user, 'user')\n assert.isDefined(user.posts, 'user.posts')\n assert.equal(user.posts.length, 2, 'user.posts.length')\n })\n\n if (options.hasFeature('findBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Comment.name, comment[Comment.idAttribute])\n comment = await adapter.find(Comment, comment[Comment.idAttribute], {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comment)\n\n assert.isDefined(comment, 'comment')\n assert.isDefined(comment.post, 'comment.post')\n assert.isDefined(comment.post.user, 'comment.post.user')\n assert.isDefined(comment.user, 'comment.user')\n assert.isDefined(comment.user.profile, 'comment.user.profile')\n })\n }\n\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.user, 'post.user')\n })\n\n if (options.hasFeature('findBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n this.toClear.push('Profile')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId, userId: post.userId }\n assert.debug('create', Comment.name, props)\n const comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.comments, 'post.comments')\n assert.isDefined(post.comments[0].user, 'post.comments[0].user')\n assert.isDefined(post.comments[0].user.profile, 'post.comments[0].user.profile')\n assert.isDefined(post.user, 'post.user')\n })\n }\n\n if (options.hasFeature('findHasManyLocalKeys')) {\n it('should load hasMany localKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tag[Tag.idAttribute], tag2[Tag.idAttribute]] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n it('should load hasMany localKeys (empty array) relations', async function () {\n this.toClear.push('Post')\n let props = { content: 'test' }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name, post)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.deepEqual(post.tags, [], 'post.tags')\n })\n it('should load hasMany localKeys (object) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n const tag = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n const tag2 = await adapter.create(Tag, props)\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: { [tag[Tag.idAttribute]]: true, [tag2[Tag.idAttribute]]: true } }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n let postId = post[Post.idAttribute]\n assert.debug('created', Post.name, post)\n\n assert.debug('find', Post.name, postId)\n post = await adapter.find(Post, postId, { 'with': ['tag'] })\n assert.debug('found', Post.name)\n\n assert.isDefined(post.tags, 'post.tags')\n assert.equal(post.content, 'test', 'post.content')\n assert.isDefined(post.tags[0][Tag.idAttribute], 'post.tags[0][Tag.idAttribute]')\n assert.isDefined(post.tags[1][Tag.idAttribute], 'post.tags[1][Tag.idAttribute]')\n })\n }\n\n if (options.hasFeature('findHasManyForeignKeys')) {\n it('should load hasMany foreignKeys (array) relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Tag')\n let props = { value: 'big data' }\n assert.debug('create', Tag.name, props)\n let tag = await adapter.create(Tag, props)\n let tagId = tag[Tag.idAttribute]\n assert.debug('created', Tag.name, tag)\n\n props = { value: 'servers' }\n assert.debug('create', Tag.name, props)\n let tag2 = await adapter.create(Tag, props)\n let tag2Id = tag2[Tag.idAttribute]\n assert.debug('created', Tag.name, tag2)\n\n props = { content: 'test', tagIds: [tagId] }\n assert.debug('create', Post.name, props)\n let post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', tagIds: [tagId, tag2Id] }\n assert.debug('create', Post.name, props)\n let post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n assert.debug('find', Tag.name, tagId)\n tag = await adapter.find(Tag, tagId, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag)\n\n assert.isDefined(tag.posts, 'tag.posts')\n assert.equal(tag.value, 'big data', 'tag.value')\n assert.equal(tag.posts.length, 2, 'tag.posts.length')\n\n assert.debug('find', Tag.name, tag2Id)\n tag2 = await adapter.find(Tag, tag2Id, { 'with': ['post'] })\n assert.debug('found', Tag.name, tag2)\n\n assert.isDefined(tag2.posts, 'tag2.posts')\n assert.equal(tag2.value, 'servers', 'tag2.value')\n assert.equal(tag2.posts.length, 1, 'tag2.posts.length')\n assert.objectsEqual(tag2.posts, [post2], 'tag2.posts')\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#findAll', function () {\n var adapter, User, Profile, Post, Comment\n\n beforeEach(function () {\n adapter = this.$$adapter\n User = this.$$User\n Profile = this.$$Profile\n Post = this.$$Post\n Comment = this.$$Comment\n })\n\n it('should exist', function () {\n assert.equal(typeof adapter.findAll, 'function', 'adapter should have a \"findAll\" method')\n })\n\n it('should filter users', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const users = await adapter.findAll(User, { age: 30 })\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users2 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n it('should filter users with raw option', async function () {\n let props = { name: 'John' }\n assert.debug('findAll', User.name, { age: 30 })\n const result = await adapter.findAll(User, { age: 30 }, { raw: true })\n const users = result.data\n assert.debug('found', User.name, users)\n assert.equal(users.length, 0, 'users.length')\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n const userId = user[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const result2 = await adapter.findAll(User, { name: 'John' }, { raw: true })\n const users2 = result2.data\n assert.debug('found', User.name, users2)\n\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], userId, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', users2[0].name)\n })\n\n if (options.hasFeature('findAllInOp')) {\n it('should filter users using the \"in\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n age: {\n 'in': [30]\n }\n }\n })\n assert.equal(users.length, 0, 'users.length')\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user[User.idAttribute]\n\n var users2 = await adapter.findAll(User, { name: 'John' })\n assert.equal(users2.length, 1, 'users2.length')\n assert.equal(users2[0][User.idAttribute], id, 'users2[0][User.idAttribute]')\n assert.equal(users2[0].name, 'John', 'users2[0].name')\n })\n }\n\n if (options.hasFeature('findAllLikeOp')) {\n it('should filter users using the \"like\" operator', async function () {\n var users = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users.length, 0)\n\n var user = await adapter.create(User, {name: 'John'})\n var id = user.id\n\n var users2 = await adapter.findAll(User, {\n where: {\n name: {\n 'like': '%J%'\n }\n }\n })\n assert.equal(users2.length, 1)\n assert.equal(users2[0].id, id)\n assert.equal(users2[0].name, 'John')\n })\n }\n\n if (options.hasFeature('findAllOpNotFound')) {\n it('should throw \"Operator not found\" error', function () {\n return adapter.findAll(User, {\n where: {\n name: {\n op: 'John'\n }\n }\n }).then(function () {\n throw new Error('should have failed!')\n }, function (err) {\n assert.equal(err.message, 'Operator op not supported!')\n })\n })\n }\n\n if (options.hasFeature('findAllBelongsTo')) {\n it('should load belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'post']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n\n it('should load belongsTo relations and filter sub queries', async function () {\n this.toClear.push('Post')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n let user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { status: 'draft', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { status: 'published', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { status: 'draft', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post3 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post3)\n\n props = { status: 'published', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post4 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post4)\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n let users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': ['post']})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 2, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(users, 'users')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n\n assert.debug('findAll', User.name, { [User.idAttribute]: user[User.idAttribute] })\n users = await adapter.findAll(User, { [User.idAttribute]: user[User.idAttribute] }, {'with': [{\n relation: 'post',\n replace: true,\n query: {\n status: 'published'\n }\n }]})\n assert.debug('found', User.name, users)\n\n assert.isDefined(user, 'user')\n assert.isDefined(users[0].posts, 'users[0].posts')\n assert.equal(users[0].posts.length, 1, 'users[0].posts.length')\n })\n }\n\n if (options.hasFeature('findAllBelongsToNested')) {\n it('should load belongsTo relations (nested)', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('findAll', Comment.name, {})\n const comments = await adapter.findAll(Comment, {}, {'with': ['user', 'user.profile', 'post', 'post.user']})\n assert.debug('found', Comment.name, comments)\n\n assert.isDefined(comments[0].post, 'comments[0].post')\n assert.isDefined(comments[0].post.user, 'comments[0].post.user')\n assert.isDefined(comments[0].user, 'comments[0].user')\n assert.isDefined(comments[0].user.profile || comments[1].user.profile, 'comments[0].user.profile || comments[1].user.profile')\n assert.isDefined(comments[1].post, 'comments[1].post')\n assert.isDefined(comments[1].post.user, 'comments[1].post.user')\n assert.isDefined(comments[1].user, 'comments[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasMany')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('findAllBelongsToHasManyNested')) {\n it('should load hasMany and belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n let props = { name: 'John' }\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n props = { email: 'foo@test.com', userId: user[User.idAttribute] }\n assert.debug('create', Profile.name, props)\n const profile = await adapter.create(Profile, props)\n assert.debug('created', Profile.name, profile)\n\n props = { content: 'foo', userId: user[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post = await adapter.create(Post, props)\n assert.debug('created', Post.name, post)\n\n props = { content: 'test2', postId: post[Post.idAttribute], userId: post.userId }\n assert.debug('create', Comment.name, props)\n let comment = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment)\n\n props = { name: 'Sally' }\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n\n props = { content: 'bar', userId: user2[User.idAttribute] }\n assert.debug('create', Post.name, props)\n const post2 = await adapter.create(Post, props)\n assert.debug('created', Post.name, post2)\n\n props = { content: 'test67', postId: post2[Post.idAttribute], userId: post2.userId }\n assert.debug('create', Comment.name, props)\n let comment2 = await adapter.create(Comment, props)\n assert.debug('created', Comment.name, comment2)\n\n assert.debug('find', Post.name, {})\n const posts = await adapter.findAll(Post, {}, {'with': ['user', 'comment', 'comment.user', 'comment.user.profile']})\n assert.debug('found', Post.name, posts)\n\n assert.isDefined(posts[0].comments, 'posts[0].comments')\n assert.isDefined(posts[0].comments[0].user, 'posts[0].comments[0].user')\n assert.isDefined(posts[0].comments[0].user.profile || posts[1].comments[0].user.profile, 'posts[0].comments[0].user.profile || posts[1].comments[0].user.profile')\n assert.isDefined(posts[0].user, 'posts[0].user')\n assert.isDefined(posts[1].comments, 'posts[1].comments')\n assert.isDefined(posts[1].comments[0].user, 'posts[1].comments[0].user')\n assert.isDefined(posts[1].user, 'posts[1].user')\n })\n }\n\n if (options.hasFeature('filterOnRelations')) {\n it('should filter using belongsTo relation', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var user2 = await adapter.create(User, {name: 'Sally'})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var users = await adapter.findAll(User, {'profile.email': 'foo@test.com'})\n assert.equal(users.length, 1)\n assert.equal(users[0].profileId, profile1.id)\n assert.equal(users[0].name, 'John')\n })\n\n it('should filter through multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n\n it('should filter using multiple hasOne/belongsTo relations', async function () {\n this.toClear.push('Post')\n this.toClear.push('Profile')\n this.toClear.push('Comment')\n var profile1 = await adapter.create(Profile, { email: 'foo@test.com' })\n var user1 = await adapter.create(User, {name: 'John', profileId: profile1.id})\n\n var post1 = await adapter.create(Post, {content: 'foo', userId: user1.id})\n await adapter.create(Comment, {content: 'test1', postId: post1.id, userId: post1.userId})\n\n var profile2 = await adapter.create(Profile, { email: 'bar@test.com' })\n var user2 = await adapter.create(User, {name: 'Sally', profileId: profile2.id})\n var post2 = await adapter.create(Post, {content: 'bar', userId: user2.id})\n await adapter.create(Comment, {content: 'test2', postId: post2.id, userId: post2.userId})\n\n var comments = await adapter.findAll(Comment, { 'user.name': 'John', 'user.profile.email': 'foo@test.com' })\n assert.equal(comments.length, 1)\n assert.equal(comments[0].userId, user1.id)\n assert.equal(comments[0].content, 'test1')\n })\n }\n\n it('should allow passing limit and offset as strings', async function () {\n await adapter.findAll(User, { limit: '10', offset: '20' })\n })\n\n if (options.hasFeature('findAllGroupedWhere')) {\n it('should support filtering grouped \"where\" clauses', async function () {\n this.toClear.push('Post')\n const posts = await adapter.createMany(Post, [\n { status: 'draft', content: 'foo' },\n { status: 'broken', content: 'bar' },\n { status: 'published', content: 'hi' },\n { status: 'flagged', content: 'hello world' },\n { status: 'flagged', content: 'test' }\n ])\n\n let query = {\n where: [\n [\n {\n content: {\n '=': 'foo'\n },\n status: {\n '=': 'draft'\n }\n },\n 'or',\n {\n status: {\n '=': 'published'\n }\n }\n ],\n 'or',\n {\n content: {\n '=': 'test'\n },\n status: {\n '=': 'flagged'\n }\n }\n ],\n orderBy: 'status'\n }\n\n assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[4], posts[2]])\n })\n }\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#sum', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.sum, 'function', 'adapter should have a \"sum\" method')\n })\n it('should sum users\\' age', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('sum', User.name, {})\n let sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 0)\n\n assert.debug('create', User.name, { name: 'Sally' })\n const user2 = await adapter.create(User, { name: 'Sally', age: 27 })\n assert.debug('created', User.name, user2)\n\n assert.debug('sum', User.name, {})\n sum = await adapter.sum(User, 'age')\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 57)\n\n assert.debug('sum', User.name, { name: 'John' })\n sum = await adapter.sum(User, 'age', { name: 'John' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 30)\n\n assert.debug('sum', User.name, { name: 'Sally' })\n sum = await adapter.sum(User, 'age', { name: 'Sally' })\n assert.debug('summed', User.name, sum)\n assert.equal(sum, 27)\n })\n it('should sum users\\' age and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n let user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.debug('sum', User.name, props)\n const result = await adapter.sum(User, 'age', props, { raw: true })\n assert.debug('summed', User.name, result)\n assert.equal(result.data, 30, 'result.data')\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#update', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.update, 'function', 'adapter should have a \"update\" method')\n })\n it('should update a user', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('find', User.name, user[User.idAttribute])\n let foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n\n assert.equal(foundUser.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(foundUser[User.idAttribute], 'new user should have an id')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n let updatedUser = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' })\n assert.debug('updated', User.name, updatedUser)\n assert.equal(updatedUser.name, 'Johnny')\n assert.equal(updatedUser[User.idAttribute], user[User.idAttribute])\n\n assert.debug('find', User.name, user[User.idAttribute])\n foundUser = await adapter.find(User, user[User.idAttribute])\n assert.debug('found', User.name, foundUser)\n assert.equal(foundUser.name, 'Johnny')\n assert.equal(foundUser[User.idAttribute], user[User.idAttribute])\n })\n it('should update a user and return raw', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n const props = { name: 'John' }\n\n assert.debug('create', User.name, props)\n const user = await adapter.create(User, props)\n assert.debug('created', User.name, user)\n\n assert.equal(user.name, props.name, `name of user should be \"${props.name}\"`)\n assert.isDefined(user[User.idAttribute], 'new user should have an id')\n\n assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })\n const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })\n assert.debug('updated', User.name, result)\n assert.isDefined(result.data, 'result.data is defined')\n assert.isDefined(result.updated, 'result.updated is defined')\n assert.equal(result.data.name, 'Johnny', 'result.data.name should be \"Johnny\"')\n assert.equal(result.data[User.idAttribute], user[User.idAttribute], `result.data.${User.idAttribute} should be ${user[User.idAttribute]}`)\n assert.equal(result.updated, 1, 'result.updated should be 1')\n })\n it('should throw when updating non-existent row', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n\n assert.debug('update', 'non-existent-id', { name: 'Johnny' })\n try {\n await adapter.update(User, 'non-existent-id', { name: 'Johnny' })\n throw new Error('update should have failed!')\n } catch (err) {\n assert.debug('correctly threw error', err.message)\n assert.isDefined(err.message, 'err.message is defined')\n assert.equal(err.message, 'Not Found', 'err.message should be \"Not Found\"')\n }\n })\n it('should keep relations specified by \"with\"', async function () {\n const adapter = this.$$adapter\n const store = this.$$container\n\n sinon.stub(adapter, '_update').callsFake(function (mapper, id, props, opts) {\n assert.deepEqual(props.posts, [\n {\n id: 1234,\n userId: 1\n }\n ])\n assert.deepEqual(props.profile, {\n id: 238,\n userId: 1\n })\n assert.equal(props.address, undefined)\n assert.equal(props.organization, undefined)\n return [props, {}]\n })\n\n assert.debug('update', 1, { id: 1 })\n const result = await store.update('user', 1, {\n id: 1,\n posts: [\n {\n id: 1234,\n userId: 1\n }\n ],\n address: {\n id: 412,\n userId: 1\n },\n profile: {\n id: 238,\n userId: 1\n },\n organizationId: 333,\n organization: {\n id: 333\n }\n }, { with: ['posts', 'profile'] })\n assert.debug('updated', 1, result)\n adapter._update.restore()\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateAll', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateAll, 'function', 'adapter should have a \"updateAll\" method')\n })\n it('should update multiple users', async function () {\n const adapter = this.$$adapter\n const User = this.$$User\n let props = { name: 'John', age: 20 }\n\n assert.debug('create', User.name, props)\n const user1 = await adapter.create(User, props)\n assert.debug('created', User.name, user1)\n const userId1 = user1[User.idAttribute]\n\n props = { name: 'John', age: 30 }\n\n assert.debug('create', User.name, props)\n const user2 = await adapter.create(User, props)\n assert.debug('created', User.name, user2)\n const userId2 = user2[User.idAttribute]\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users)\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('updateAll', User.name, { name: 'Johnny' }, { name: 'John' })\n const users2 = await adapter.updateAll(User, { name: 'Johnny' }, { name: 'John' })\n assert.debug('updated', User.name, users2)\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2[0].name, 'Johnny')\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 30 }).length, 1)\n\n assert.debug('findAll', User.name, { name: 'John' })\n const users3 = await adapter.findAll(User, { name: 'John' })\n assert.debug('found', User.name, users3)\n assert.equalObjects(users3, [])\n assert.equal(users3.length, 0)\n\n assert.debug('findAll', User.name, { name: 'Johnny' })\n const users4 = await adapter.findAll(User, { name: 'Johnny' })\n assert.debug('found', User.name, users4)\n\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4[0].name, 'Johnny')\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x[User.idAttribute] === userId2 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 30 }).length, 1)\n })\n })\n}\n","/* global assert:true */\nexport default function (options) {\n describe('Adapter#updateMany', function () {\n it('should exist', function () {\n assert.equal(typeof this.$$adapter.updateMany, 'function', 'adapter should have a \"updateMany\" method')\n })\n it('should update multiple users', async function () {\n var adapter = this.$$adapter\n var User = this.$$User\n var user1 = await adapter.create(User, {name: 'John', age: 20})\n var userId1 = user1.id\n\n var user2 = await adapter.create(User, {name: 'John', age: 30})\n var userId2 = user2.id\n\n var users = await adapter.findAll(User, { name: 'John' })\n users.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users[0].name, 'John')\n assert.equal(users[0].name, 'John')\n assert.equal(users.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)\n assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)\n\n user1.age = 101\n user2.age = 202\n var users2 = await adapter.updateMany(User, [user1, user2])\n users2.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users2.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.id === userId2 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users2.filter(function (x) { return x.age === 202 }).length, 1)\n\n var users3 = await adapter.findAll(User, { age: 20 })\n assert.objectsEqual(users3, [])\n assert.equal(users3.length, 0)\n\n var users4 = await adapter.findAll(User, { age: 101 })\n users4.sort(function (a, b) {\n return a.age - b.age\n })\n assert.equal(users4.filter(function (x) { return x.id === userId1 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.id === userId2 }).length, 0)\n assert.equal(users4.filter(function (x) { return x.age === 101 }).length, 1)\n assert.equal(users4.filter(function (x) { return x.age === 202 }).length, 0)\n })\n })\n}\n","import afterCreateTest from './afterCreate.test'\nimport afterUpdateTest from './afterUpdate.test'\nimport beforeCreateTest from './beforeCreate.test'\nimport beforeUpdateTest from './beforeUpdate.test'\nimport countTest from './count.test'\nimport createTest from './create.test'\nimport createManyTest from './createMany.test'\nimport destroyTest from './destroy.test'\nimport destroyAllTest from './destroyAll.test'\nimport extendTest from './extend.test'\nimport findTest from './find.test'\nimport findAllTest from './findAll.test'\nimport sumTest from './sum.test'\nimport updateTest from './update.test'\nimport updateAllTest from './updateAll.test'\nimport updateManyTest from './updateMany.test'\n\nimport {assert} from 'chai'\nimport sinon from 'sinon'\n\nassert.equalObjects = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nassert.objectsEqual = function (a, b, m) {\n assert.deepEqual(JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b)), m || (JSON.stringify(a) + ' should be equal to ' + JSON.stringify(b)))\n}\n\nlet debug = false\n\nassert.debug = function (...args) {\n if (debug) {\n args.forEach(function (arg, i) {\n args[i] = JSON.stringify(arg, null, 2)\n })\n console.log('DEBUG (TEST):', ...args)\n }\n}\n\nvar prefix = 'TestRunner.init(options): options'\n\nexport default {\n init: function (options) {\n options = options || {}\n debug = !!options.debug\n options.hasMethod = function (method) {\n options.methods || (options.methods = 'all')\n options.xmethods || (options.xmethods = [])\n return (options.methods === 'all' || options.methods.indexOf(method) !== -1) && options.xmethods.indexOf(method) === -1\n }\n options.hasFeature = function (feature) {\n options.features || (options.features = 'all')\n options.xfeatures || (options.xfeatures = [])\n return (options.features === 'all' || options.features.indexOf(feature) !== -1) && options.xfeatures.indexOf(feature) === -1\n }\n if (!options.Adapter || typeof options.Adapter !== 'function') {\n throw new Error(prefix + '.Adapter: Expected function, Actual: ' + typeof options.Adapter)\n }\n beforeEach(function () {\n this.$$adapter = new options.Adapter(options.adapterConfig)\n this.$$container = new options.JSData.Container(options.containerConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$store = new options.JSData.DataStore(options.storeConfig || {\n mapperDefaults: {\n debug: false\n }\n })\n this.$$container.registerAdapter('adapter', this.$$adapter, { 'default': true })\n this.$$store.registerAdapter('adapter', this.$$adapter, { 'default': true })\n var userOptions = {\n name: 'user',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKey: 'userId'\n }\n },\n hasOne: {\n profile: {\n localField: 'profile',\n foreignKey: 'userId'\n },\n address: {\n localField: 'address',\n foreignKey: 'userId'\n }\n },\n belongsTo: {\n organization: {\n localField: 'organization',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var organizationOptions = {\n name: 'organization',\n relations: {\n hasMany: {\n user: {\n localField: 'users',\n foreignKey: 'organizationId'\n }\n }\n }\n }\n var postOptions = {\n name: 'post',\n relations: {\n belongsTo: {\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n },\n hasMany: {\n comment: {\n localField: 'comments',\n foreignKey: 'postId'\n },\n tag: {\n localField: 'tags',\n localKeys: 'tagIds'\n }\n }\n }\n }\n var commentOptions = {\n name: 'comment',\n relations: {\n belongsTo: {\n post: {\n localField: 'post',\n foreignKey: 'postId'\n },\n user: {\n localField: 'user',\n foreignKey: 'userId'\n }\n }\n }\n }\n var tagOptions = {\n name: 'tag',\n relations: {\n hasMany: {\n post: {\n localField: 'posts',\n foreignKeys: 'tagIds'\n }\n }\n }\n }\n this.$$User = this.$$container.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$store.defineMapper('user', options.userConfig || options.JSData.utils.copy(userOptions))\n this.$$Organization = this.$$container.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$store.defineMapper('organization', options.organizationConfig || options.JSData.utils.copy(organizationOptions))\n this.$$Profile = this.$$container.defineMapper('profile', options.profileConfig || {})\n this.$$store.defineMapper('profile', options.profileConfig || {})\n this.$$Address = this.$$container.defineMapper('address', options.addressConfig || {})\n this.$$store.defineMapper('address', options.addressConfig || {})\n this.$$Post = this.$$container.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$store.defineMapper('post', options.postConfig || options.JSData.utils.copy(postOptions))\n this.$$Comment = this.$$container.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$store.defineMapper('comment', options.commentConfig || options.JSData.utils.copy(commentOptions))\n this.$$Tag = this.$$container.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.$$store.defineMapper('tag', options.tagConfig || options.JSData.utils.copy(tagOptions))\n this.toClear = ['User']\n })\n\n describe('js-data-adapter-tests', function () {\n if (options.hasMethod('beforeCreate')) {\n beforeCreateTest(options)\n }\n if (options.hasMethod('count')) {\n countTest(options)\n }\n if (options.hasMethod('create')) {\n createTest(options)\n }\n if (options.hasMethod('afterCreate')) {\n afterCreateTest(options)\n }\n if (options.hasMethod('createMany')) {\n createManyTest(options)\n }\n if (options.hasMethod('extend')) {\n extendTest(options)\n }\n if (options.hasMethod('find')) {\n findTest(options)\n }\n if (options.hasMethod('findAll')) {\n findAllTest(options)\n }\n if (options.hasMethod('destroy')) {\n destroyTest(options)\n }\n if (options.hasMethod('destroyAll')) {\n destroyAllTest(options)\n }\n if (options.hasMethod('beforeUpdate')) {\n beforeUpdateTest(options)\n }\n if (options.hasMethod('sum')) {\n sumTest(options)\n }\n if (options.hasMethod('update')) {\n updateTest(options)\n }\n if (options.hasMethod('afterUpdate')) {\n afterUpdateTest(options)\n }\n if (options.hasMethod('updateAll')) {\n updateAllTest(options)\n }\n if (options.hasMethod('updateMany')) {\n updateManyTest(options)\n }\n })\n\n afterEach(async function () {\n const Test = this\n const toClear = []\n if (Test.toClear.indexOf('Tag') !== -1) {\n toClear.push('Tag')\n }\n if (Test.toClear.indexOf('Comment') !== -1) {\n toClear.push('Comment')\n }\n if (Test.toClear.indexOf('Post') !== -1) {\n toClear.push('Post')\n }\n if (Test.toClear.indexOf('Profile') !== -1) {\n toClear.push('Profile')\n }\n if (Test.toClear.indexOf('User') !== -1) {\n toClear.push('User')\n }\n if (Test.toClear.indexOf('Address') !== -1) {\n toClear.push('Address')\n }\n let promise = Promise.resolve()\n toClear.forEach(function (Mapper) {\n promise = promise.then(function () {\n return Test.$$adapter.destroyAll(Test['$$' + Mapper])\n })\n })\n await promise\n })\n },\n assert,\n sinon,\n fail: function (msg) {\n assert.equal('should not reach this!: ' + msg, 'failure')\n },\n TYPES_EXCEPT_STRING: [123, 123.123, null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY: [123, 123.123, null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER: [null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_OBJECT: [123, 123.123, null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_NUMBER_OBJECT: [null, undefined, [], true, false, function () {\n }],\n TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER: [null, undefined, {}, true, false, function () {\n }],\n TYPES_EXCEPT_NUMBER: ['string', null, undefined, {}, [], true, false, function () {\n }],\n TYPES_EXCEPT_OBJECT: ['string', 123, 123.123, null, undefined, true, false, function () {\n }],\n TYPES_EXCEPT_BOOLEAN: ['string', 123, 123.123, null, undefined, {}, [], function () {\n }],\n TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false]\n}\n"],"names":["options","equal","$$adapter","afterCreate","$$User","name","stub","adapter","callsFake","mapper","props","opts","isDefined","op","debug","User","create","user","idAttribute","isTrue","calledOnce","firstCall","args","length","objectsEqual","isObject","restore","record","Promise","resolve","raw","result","created","data","afterUpdate","id","userId","update","updatedUser","updated","beforeCreate","beforeUpdate","count","user2","find","foundUser","createMany","age","user1","users","sort","a","b","filter","x","findAll","users3","destroy","beforeDestroy","afterDestroy","destroyedUser","isUndefined","beforeDestroyCalled","afterDestroyCalled","hasOwnProperty","deleted","destroyAll","foundUsers","destroyedUsers","constructor","extend","Adapter","SubAdapter","bar","err","subAdapter","foo","obj","setPrototypeOf","Profile","Post","Comment","Tag","$$Profile","$$Post","$$Comment","$$Tag","toClear","push","beforeFind","afterFind","beforeFindCalled","afterFindCalled","content","post","all","comments","postId","with","foundPost","equalObjects","found","email","profile","comment","status","post2","post3","post4","posts","hasFeature","value","tag","tag2","tagIds","tags","deepEqual","tagId","tag2Id","users2","result2","then","Error","message","comment2","profileId","profile1","post1","profile2","limit","offset","assert","query","sum","$$container","address","undefined","organization","store","_update","updateAll","userId1","userId2","users4","updateMany","m","JSON","parse","stringify","forEach","arg","i","log","prefix","hasMethod","method","methods","xmethods","indexOf","feature","features","xfeatures","adapterConfig","JSData","Container","containerConfig","$$store","DataStore","storeConfig","registerAdapter","userOptions","organizationOptions","postOptions","commentOptions","tagOptions","defineMapper","userConfig","utils","copy","$$Organization","organizationConfig","profileConfig","$$Address","addressConfig","postConfig","commentConfig","tagConfig","Test","Mapper","promise","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adapter.js +++ b/dist/js-data-adapter.js @@ -1,144 +1,9 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('js-data')) : - typeof define === 'function' && define.amd ? define('js-data-adapter', ['exports', 'js-data'], factory) : - (factory((global.Adapter = global.Adapter || {}),global.JSData)); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('js-data')) : + typeof define === 'function' && define.amd ? define('js-data-adapter', ['exports', 'js-data'], factory) : + (factory((global.Adapter = global.Adapter || {}),global.JSData)); }(this, (function (exports,jsData) { 'use strict'; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - - - - - -var asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -}(); - - - - - - - - - - - - - var defineProperty = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -154,32 +19,6 @@ var defineProperty = function (obj, key, value) { return obj; }; -var get = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } -}; - - @@ -195,27 +34,10 @@ var get = function get(object, property, receiver) { -var set = function set(object, property, value, receiver) { - var desc = Object.getOwnPropertyDescriptor(object, property); - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - if (setter !== undefined) { - setter.call(receiver, value); - } - } - return value; -}; var slicedToArray = function () { function sliceIterator(arr, i) { @@ -346,20 +168,19 @@ var DEFAULTS = { * @default false */ raw: false -}; -/** - * Abstract class meant to be extended by adapters. - * - * @class Adapter - * @abstract - * @extends Component - * @param {Object} [opts] Configuration opts. - * @param {boolean} [opts.debug=false] Whether to log debugging information. - * @param {boolean} [opts.raw=false] Whether to return a more detailed response - * object. - */ -function Adapter(opts) { + /** + * Abstract class meant to be extended by adapters. + * + * @class Adapter + * @abstract + * @extends Component + * @param {Object} [opts] Configuration opts. + * @param {boolean} [opts.debug=false] Whether to log debugging information. + * @param {boolean} [opts.raw=false] Whether to return a more detailed response + * object. + */ +};function Adapter(opts) { jsData.utils.classCallCheck(this, Adapter); jsData.Component.call(this, opts); opts || (opts = {}); @@ -1092,16 +913,10 @@ jsData.Component.extend({ var relationDef = def.getRelation(); if (jsData.utils.isObject(records) && !jsData.utils.isArray(records)) { - var _ret = function () { - var record = records; - return { - v: _this6.find(relationDef, _this6.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { - def.setLocalField(record, relatedItem); - }) - }; - }(); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + var record = records; + return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts).then(function (relatedItem) { + def.setLocalField(record, relatedItem); + }); } else { var keys = records.map(function (record) { return _this6.makeBelongsToForeignKey(mapper, def, record); @@ -1141,9 +956,7 @@ jsData.Component.extend({ find: function find(mapper, id, opts) { var _this7 = this; - var record = void 0, - op = void 0; - var meta = {}; + var op = void 0; opts || (opts = {}); opts.with || (opts.with = []); @@ -1154,39 +967,12 @@ jsData.Component.extend({ _this7.dbg(op, mapper, id, opts); return jsData.utils.resolve(_this7._find(mapper, id, opts)); }).then(function (results) { - var _results6 = slicedToArray(results, 2), - _record = _results6[0], - _meta = _results6[1]; + return _this7.loadRelationsFor(mapper, results, opts); + }).then(function (_ref) { + var _ref2 = slicedToArray(_ref, 2), + record = _ref2[0], + meta = _ref2[1]; - if (!_record) { - return; - } - record = _record; - meta = _meta; - var tasks = []; - - jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { - var task = void 0; - if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { - if (def.type === 'hasOne') { - task = _this7.loadHasOne(mapper, def, record, __opts); - } else { - task = _this7.loadHasMany(mapper, def, record, __opts); - } - } else if (def.type === 'hasMany' && def.localKeys) { - task = _this7.loadHasManyLocalKeys(mapper, def, record, __opts); - } else if (def.type === 'hasMany' && def.foreignKeys) { - task = _this7.loadHasManyForeignKeys(mapper, def, record, __opts); - } else if (def.type === 'belongsTo') { - task = _this7.loadBelongsTo(mapper, def, record, __opts); - } - if (task) { - tasks.push(task); - } - }); - - return jsData.utils.Promise.all(tasks); - }).then(function () { var response = new Response(record, meta, 'find'); response.found = record ? 1 : 0; response = _this7.respond(response, opts); @@ -1222,12 +1008,10 @@ jsData.Component.extend({ findAll: function findAll(mapper, query, opts) { var _this8 = this; + var op = void 0; opts || (opts = {}); opts.with || (opts.with = []); - var records = []; - var meta = {}; - var op = void 0; var activeWith = opts._activeWith; if (jsData.utils.isObject(activeWith)) { @@ -1246,44 +1030,55 @@ jsData.Component.extend({ _this8.dbg(op, mapper, query, opts); return jsData.utils.resolve(_this8._findAll(mapper, query, opts)); }).then(function (results) { - var _results7 = slicedToArray(results, 2), - _records = _results7[0], - _meta = _results7[1]; + return _this8.loadRelationsFor(mapper, results, opts); + }).then(function (_ref3) { + var _ref4 = slicedToArray(_ref3, 2), + records = _ref4[0], + meta = _ref4[1]; + + var response = new Response(records, meta, 'findAll'); + response.found = records.length; + response = _this8.respond(response, opts); + + // afterFindAll lifecycle hook + op = opts.op = 'afterFindAll'; + return jsData.utils.resolve(_this8[op](mapper, query, opts, response)).then(function (_response) { + return _response === undefined ? response : _response; + }); + }); + }, + loadRelationsFor: function loadRelationsFor(mapper, results, opts) { + var _this9 = this; + + var _results6 = slicedToArray(results, 1), + records = _results6[0]; + + var tasks = []; - _records || (_records = []); - records = _records; - meta = _meta; - var tasks = []; + if (records) { jsData.utils.forEachRelation(mapper, opts, function (def, __opts) { var task = void 0; if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) { - if (def.type === 'hasMany') { - task = _this8.loadHasMany(mapper, def, records, __opts); + if (def.type === 'hasOne') { + task = _this9.loadHasOne(mapper, def, records, __opts); } else { - task = _this8.loadHasOne(mapper, def, records, __opts); + task = _this9.loadHasMany(mapper, def, records, __opts); } } else if (def.type === 'hasMany' && def.localKeys) { - task = _this8.loadHasManyLocalKeys(mapper, def, records, __opts); + task = _this9.loadHasManyLocalKeys(mapper, def, records, __opts); } else if (def.type === 'hasMany' && def.foreignKeys) { - task = _this8.loadHasManyForeignKeys(mapper, def, records, __opts); + task = _this9.loadHasManyForeignKeys(mapper, def, records, __opts); } else if (def.type === 'belongsTo') { - task = _this8.loadBelongsTo(mapper, def, records, __opts); + task = _this9.loadBelongsTo(mapper, def, records, __opts); } if (task) { tasks.push(task); } }); - return jsData.utils.Promise.all(tasks); - }).then(function () { - var response = new Response(records, meta, 'findAll'); - response.found = records.length; - response = _this8.respond(response, opts); + } - // afterFindAll lifecycle hook - op = opts.op = 'afterFindAll'; - return jsData.utils.resolve(_this8[op](mapper, query, opts, response)).then(function (_response) { - return _response === undefined ? response : _response; - }); + return jsData.utils.Promise.all(tasks).then(function () { + return results; }); }, @@ -1314,7 +1109,7 @@ jsData.Component.extend({ * @return {Promise} */ loadHasMany: function loadHasMany(mapper, def, records, __opts) { - var _this9 = this; + var _this10 = this; var singular = false; @@ -1323,7 +1118,7 @@ jsData.Component.extend({ records = [records]; } var IDs = records.map(function (record) { - return _this9.makeHasManyForeignKey(mapper, def, record); + return _this10.makeHasManyForeignKey(mapper, def, record); }); var query = { where: {} @@ -1355,7 +1150,7 @@ jsData.Component.extend({ }); }, loadHasManyLocalKeys: function loadHasManyLocalKeys(mapper, def, records, __opts) { - var _this10 = this; + var _this11 = this; var record = void 0; var relatedMapper = def.getRelation(); @@ -1373,40 +1168,34 @@ jsData.Component.extend({ def.setLocalField(record, relatedItems); }); } else { - var _ret2 = function () { - var localKeys = []; - records.forEach(function (record) { - localKeys = localKeys.concat(_this10.makeHasManyLocalKeys(mapper, def, record)); - }); - return { - v: _this10.findAll(relatedMapper, { - where: defineProperty({}, relatedMapper.idAttribute, { - 'in': unique(localKeys).filter(function (x) { - return x; - }) - }) - }, __opts).then(function (relatedItems) { - records.forEach(function (item) { - var attached = []; - var itemKeys = jsData.utils.get(item, def.localKeys) || []; - itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); - relatedItems.forEach(function (relatedItem) { - if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) { - attached.push(relatedItem); - } - }); - def.setLocalField(item, attached); - }); - return relatedItems; + var localKeys = []; + records.forEach(function (record) { + localKeys = localKeys.concat(_this11.makeHasManyLocalKeys(mapper, def, record)); + }); + return this.findAll(relatedMapper, { + where: defineProperty({}, relatedMapper.idAttribute, { + 'in': unique(localKeys).filter(function (x) { + return x; }) - }; - }(); - - if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; + }) + }, __opts).then(function (relatedItems) { + records.forEach(function (item) { + var attached = []; + var itemKeys = jsData.utils.get(item, def.localKeys) || []; + itemKeys = jsData.utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys); + relatedItems.forEach(function (relatedItem) { + if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) { + attached.push(relatedItem); + } + }); + def.setLocalField(item, attached); + }); + return relatedItems; + }); } }, loadHasManyForeignKeys: function loadHasManyForeignKeys(mapper, def, records, __opts) { - var _this11 = this; + var _this12 = this; var relatedMapper = def.getRelation(); var idAttribute = mapper.idAttribute; @@ -1428,7 +1217,7 @@ jsData.Component.extend({ return this.findAll(relatedMapper, { where: defineProperty({}, def.foreignKeys, { 'isectNotEmpty': records.map(function (record) { - return _this11.makeHasManyForeignKeys(mapper, def, record); + return _this12.makeHasManyForeignKeys(mapper, def, record); }) }) }, __opts).then(function (relatedItems) { @@ -1559,7 +1348,7 @@ jsData.Component.extend({ * @return {Promise} */ sum: function sum(mapper, field, query, opts) { - var _this12 = this; + var _this13 = this; var op = void 0; if (!jsData.utils.isString(field)) { @@ -1573,20 +1362,20 @@ jsData.Component.extend({ return jsData.utils.resolve(this[op](mapper, field, query, opts)).then(function () { // Allow for re-assignment from lifecycle hook op = opts.op = 'sum'; - _this12.dbg(op, mapper, field, query, opts); - return jsData.utils.resolve(_this12._sum(mapper, field, query, opts)); + _this13.dbg(op, mapper, field, query, opts); + return jsData.utils.resolve(_this13._sum(mapper, field, query, opts)); }).then(function (results) { - var _results8 = slicedToArray(results, 2), - data = _results8[0], - result = _results8[1]; + var _results7 = slicedToArray(results, 2), + data = _results7[0], + result = _results7[1]; result || (result = {}); var response = new Response(data, result, op); - response = _this12.respond(response, opts); + response = _this13.respond(response, opts); // afterSum lifecycle hook op = opts.op = 'afterSum'; - return jsData.utils.resolve(_this12[op](mapper, field, query, opts, response)).then(function (_response) { + return jsData.utils.resolve(_this13[op](mapper, field, query, opts, response)).then(function (_response) { return _response === undefined ? response : _response; }); }); @@ -1621,7 +1410,7 @@ jsData.Component.extend({ * @return {Promise} */ update: function update(mapper, id, props, opts) { - var _this13 = this; + var _this14 = this; props || (props = {}); opts || (opts = {}); @@ -1634,21 +1423,21 @@ jsData.Component.extend({ props = _props === undefined ? props : _props; props = withoutRelations(mapper, props, opts); op = opts.op = 'update'; - _this13.dbg(op, mapper, id, props, opts); - return jsData.utils.resolve(_this13._update(mapper, id, props, opts)); + _this14.dbg(op, mapper, id, props, opts); + return jsData.utils.resolve(_this14._update(mapper, id, props, opts)); }).then(function (results) { - var _results9 = slicedToArray(results, 2), - data = _results9[0], - result = _results9[1]; + var _results8 = slicedToArray(results, 2), + data = _results8[0], + result = _results8[1]; result || (result = {}); var response = new Response(data, result, 'update'); response.updated = data ? 1 : 0; - response = _this13.respond(response, opts); + response = _this14.respond(response, opts); // afterUpdate lifecycle hook op = opts.op = 'afterUpdate'; - return jsData.utils.resolve(_this13[op](mapper, id, props, opts, response)).then(function (_response) { + return jsData.utils.resolve(_this14[op](mapper, id, props, opts, response)).then(function (_response) { return _response === undefined ? response : _response; }); }); @@ -1676,7 +1465,7 @@ jsData.Component.extend({ * @return {Promise} */ updateAll: function updateAll(mapper, props, query, opts) { - var _this14 = this; + var _this15 = this; props || (props = {}); query || (query = {}); @@ -1690,22 +1479,22 @@ jsData.Component.extend({ props = _props === undefined ? props : _props; props = withoutRelations(mapper, props, opts); op = opts.op = 'updateAll'; - _this14.dbg(op, mapper, props, query, opts); - return jsData.utils.resolve(_this14._updateAll(mapper, props, query, opts)); + _this15.dbg(op, mapper, props, query, opts); + return jsData.utils.resolve(_this15._updateAll(mapper, props, query, opts)); }).then(function (results) { - var _results10 = slicedToArray(results, 2), - data = _results10[0], - result = _results10[1]; + var _results9 = slicedToArray(results, 2), + data = _results9[0], + result = _results9[1]; data || (data = []); result || (result = {}); var response = new Response(data, result, 'updateAll'); response.updated = data.length; - response = _this14.respond(response, opts); + response = _this15.respond(response, opts); // afterUpdateAll lifecycle hook op = opts.op = 'afterUpdateAll'; - return jsData.utils.resolve(_this14[op](mapper, props, query, opts, response)).then(function (_response) { + return jsData.utils.resolve(_this15[op](mapper, props, query, opts, response)).then(function (_response) { return _response === undefined ? response : _response; }); }); @@ -1725,7 +1514,7 @@ jsData.Component.extend({ * @return {Promise} */ updateMany: function updateMany(mapper, records, opts) { - var _this15 = this; + var _this16 = this; records || (records = []); opts || (opts = {}); @@ -1745,22 +1534,22 @@ jsData.Component.extend({ return withoutRelations(mapper, record, opts); }); op = opts.op = 'updateMany'; - _this15.dbg(op, mapper, records, opts); - return jsData.utils.resolve(_this15._updateMany(mapper, records, opts)); + _this16.dbg(op, mapper, records, opts); + return jsData.utils.resolve(_this16._updateMany(mapper, records, opts)); }).then(function (results) { - var _results11 = slicedToArray(results, 2), - data = _results11[0], - result = _results11[1]; + var _results10 = slicedToArray(results, 2), + data = _results10[0], + result = _results10[1]; data || (data = []); result || (result = {}); var response = new Response(data, result, 'updateMany'); response.updated = data.length; - response = _this15.respond(response, opts); + response = _this16.respond(response, opts); // afterUpdateMany lifecycle hook op = opts.op = 'afterUpdateMany'; - return jsData.utils.resolve(_this15[op](mapper, records, opts, response)).then(function (_response) { + return jsData.utils.resolve(_this16[op](mapper, records, opts, response)).then(function (_response) { return _response === undefined ? response : _response; }); }); diff --git a/dist/js-data-adapter.js.map b/dist/js-data-adapter.js.map index 2d3fcf6..ea6ce1a 100644 --- a/dist/js-data-adapter.js.map +++ b/dist/js-data-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["import { Component, utils } from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this, opts)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let record, op\n let meta = {}\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => {\n let [_record, _meta] = results\n if (!_record) {\n return\n }\n record = _record\n meta = _meta\n const tasks = []\n\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, record, __opts)\n } else {\n task = this.loadHasMany(mapper, def, record, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, record, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, record, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, record, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n let records = []\n let meta = {}\n let op\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => {\n let [_records, _meta] = results\n _records || (_records = [])\n records = _records\n meta = _meta\n const tasks = []\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasMany') {\n task = this.loadHasMany(mapper, def, records, __opts)\n } else {\n task = this.loadHasOne(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n return utils.Promise.all(tasks)\n })\n .then(() => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["noop","args","opts","length","dbg","op","utils","resolve","noop2","unique","array","seen","final","forEach","item","push","withoutRelations","mapper","props","with","relationFields","toStrip","filter","value","indexOf","omit","reserved","Response","data","meta","fillIn","DEFAULTS","Adapter","classCallCheck","call","Component","extend","query","then","_count","results","result","response","respond","_response","undefined","_props","_create","created","map","record","_createMany","id","_destroy","_destroyAll","def","records","__opts","relationDef","getRelation","isObject","isArray","find","makeBelongsToForeignKey","relatedItem","setLocalField","keys","key","findAll","idAttribute","relatedItems","foreignKey","_find","_record","_meta","tasks","forEachRelation","task","type","loadHasOne","loadHasMany","localKeys","loadHasManyLocalKeys","foreignKeys","loadHasManyForeignKeys","loadBelongsTo","Promise","all","found","activeWith","_activeWith","activeQuery","replace","deepFillIn","_findAll","_records","opt","plainCopy","singular","IDs","makeHasManyForeignKey","criteria","where","attached","get","relatedMapper","makeHasManyLocalKeys","concat","x","itemKeys","Object","makeHasManyForeignKeys","foreignKeysField","_relatedItems","relatedData","getLocalField","getForeignKey","field","isString","Error","_sum","getOpt","_update","updated","_updateAll","_updateMany"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,OAAO,SAAPA,IAAO,GAAmB;oCAANC,IAAM;QAAA;;;MAC/BC,OAAOD,KAAKA,KAAKE,MAAL,GAAc,CAAnB,CAAb;OACKC,GAAL,cAASF,KAAKG,EAAd,SAAqBJ,IAArB;SACOK,aAAMC,OAAN,EAAP;CAHK;;AAMP,AAAO,IAAMC,QAAQ,SAARA,KAAQ,GAAmB;qCAANP,IAAM;QAAA;;;MAChCC,OAAOD,KAAKA,KAAKE,MAAL,GAAc,CAAnB,CAAb;OACKC,GAAL,cAASF,KAAKG,EAAd,SAAqBJ,IAArB;SACOK,aAAMC,OAAN,EAAP;CAHK;;AAMP,AAAO,IAAME,SAAS,SAATA,MAAS,CAAUC,KAAV,EAAiB;MAC/BC,OAAO,EAAb;MACMC,QAAQ,EAAd;QACMC,OAAN,CAAc,UAAUC,IAAV,EAAgB;QACxBA,QAAQH,IAAZ,EAAkB;;;UAGZI,IAAN,CAAWD,IAAX;SACKA,IAAL,IAAa,CAAb;GALF;SAOOF,KAAP;CAVK;;AAaP,AAAO,IAAMI,mBAAmB,SAAnBA,gBAAmB,CAAUC,MAAV,EAAkBC,KAAlB,EAAyBhB,IAAzB,EAA+B;WACpDA,OAAO,EAAhB;OACKiB,IAAL,KAAcjB,KAAKiB,IAAL,GAAY,EAA1B;MACMC,iBAAiBH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C,WAAW,IAAIf,QAAJ,CAAaC,IAAb,EAAmBa,MAAnB,EAA2B,YAA3B,CAAf;eACSkF,OAAT,GAAmB/F,KAAKzB,MAAxB;iBACW,QAAKwC,OAAL,CAAaD,QAAb,EAAuBxC,IAAvB,CAAX;;;WAGKA,KAAKG,EAAL,GAAU,iBAAf;aACOC,aAAMC,OAAN,CAAc,QAAKF,EAAL,EAASY,MAAT,EAAiBuC,OAAjB,EAA0BtD,IAA1B,EAAgCwC,QAAhC,CAAd,EACJJ,IADI,CACC,UAACM,SAAD;eAAeA,cAAcC,SAAd,GAA0BH,QAA1B,GAAqCE,SAApD;OADD,CAAP;KAnBG,CAAP;;CAxwCJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"js-data-adapter.js","sources":["../src/index.js"],"sourcesContent":["import { Component, utils } from 'js-data'\n\nexport const noop = function (...args) {\n const opts = args[args.length - 1]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const noop2 = function (...args) {\n const opts = args[args.length - 2]\n this.dbg(opts.op, ...args)\n return utils.resolve()\n}\n\nexport const unique = function (array) {\n const seen = {}\n const final = []\n array.forEach(function (item) {\n if (item in seen) {\n return\n }\n final.push(item)\n seen[item] = 0\n })\n return final\n}\n\nexport const withoutRelations = function (mapper, props, opts) {\n opts || (opts = {})\n opts.with || (opts.with = [])\n const relationFields = mapper.relationFields || []\n const toStrip = relationFields.filter((value) => opts.with.indexOf(value) === -1)\n return utils.omit(props, toStrip)\n}\n\nexport const reserved = [\n 'orderBy',\n 'sort',\n 'limit',\n 'offset',\n 'skip',\n 'where'\n]\n\n/**\n * Response object used when `raw` is `true`. May contain other fields in\n * addition to `data`.\n *\n * @class Response\n */\nexport function Response (data, meta, op) {\n meta || (meta = {})\n\n /**\n * Response data.\n *\n * @name Response#data\n * @type {*}\n */\n this.data = data\n\n utils.fillIn(this, meta)\n\n /**\n * The operation for which the response was created.\n *\n * @name Response#op\n * @type {string}\n */\n this.op = op\n}\n\nconst DEFAULTS = {\n /**\n * Whether to log debugging information.\n *\n * @name Adapter#debug\n * @type {boolean}\n * @default false\n */\n debug: false,\n\n /**\n * Whether to return a more detailed response object.\n *\n * @name Adapter#raw\n * @type {boolean}\n * @default false\n */\n raw: false\n}\n\n/**\n * Abstract class meant to be extended by adapters.\n *\n * @class Adapter\n * @abstract\n * @extends Component\n * @param {Object} [opts] Configuration opts.\n * @param {boolean} [opts.debug=false] Whether to log debugging information.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed response\n * object.\n */\nexport function Adapter (opts) {\n utils.classCallCheck(this, Adapter)\n Component.call(this, opts)\n opts || (opts = {})\n utils.fillIn(opts, DEFAULTS)\n utils.fillIn(this, opts)\n}\n\nComponent.extend({\n constructor: Adapter,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the count.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#afterCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} props The `props` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `afterCount`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCount: noop2,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `afterCreate`\n * @param {Object|Response} response Created record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreate: noop2,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the created records.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#afterCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `afterCreateMany`\n * @param {Object[]|Response} response Created records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterCreateMany: noop2,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#afterDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `afterDestroy`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroy: noop2,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be `undefined`.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#afterDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `afterDestroyAll`\n * @param {undefined|Response} response `undefined` or {@link Response}, depending on the value of `opts.raw`.\n */\n afterDestroyAll: noop2,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found record, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#afterFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `afterFind`\n * @param {Object|Response} response The found record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFind: noop2,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the found records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#afterFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `afterFindAll`\n * @param {Object[]|Response} response The found records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterFindAll: noop2,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the sum.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#afterSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {string} field The `field` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `afterSum`\n * @param {Object|Response} response Count or {@link Response}, depending on the value of `opts.raw`.\n */\n afterSum: noop2,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated record.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#afterUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `afterUpdate`\n * @param {Object|Response} response The updated record or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdate: noop2,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#afterUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `afterUpdateAll`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateAll: noop2,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * If `opts.raw` is `true` then `response` will be a detailed response object, otherwise `response` will be the updated records, if any.\n *\n * `response` may be modified. You can also re-assign `response` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#afterUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} records The `records` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `afterUpdateMany`\n * @param {Object[]|Response} response The updated records or {@link Response}, depending on the value of `opts.raw`.\n */\n afterUpdateMany: noop2,\n\n /**\n * Lifecycle method method called by count.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes count to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by count.\n *\n * @name Adapter#beforeCount\n * @method\n * @param {Object} mapper The `mapper` argument passed to count.\n * @param {Object} query The `query` argument passed to count.\n * @param {Object} opts The `opts` argument passed to count.\n * @property {string} opts.op `beforeCount`\n */\n beforeCount: noop,\n\n /**\n * Lifecycle method method called by create.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes create to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by create.\n *\n * @name Adapter#beforeCreate\n * @method\n * @param {Object} mapper The `mapper` argument passed to create.\n * @param {Object} props The `props` argument passed to create.\n * @param {Object} opts The `opts` argument passed to create.\n * @property {string} opts.op `beforeCreate`\n */\n beforeCreate: noop,\n\n /**\n * Lifecycle method method called by createMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes createMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.\n *\n * @name Adapter#beforeCreateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to createMany.\n * @param {Object[]} props The `props` argument passed to createMany.\n * @param {Object} opts The `opts` argument passed to createMany.\n * @property {string} opts.op `beforeCreateMany`\n */\n beforeCreateMany: noop,\n\n /**\n * Lifecycle method method called by destroy.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroy to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.\n *\n * @name Adapter#beforeDestroy\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroy.\n * @param {(string|number)} id The `id` argument passed to destroy.\n * @param {Object} opts The `opts` argument passed to destroy.\n * @property {string} opts.op `beforeDestroy`\n */\n beforeDestroy: noop,\n\n /**\n * Lifecycle method method called by destroyAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.\n *\n * @name Adapter#beforeDestroyAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to destroyAll.\n * @param {Object} query The `query` argument passed to destroyAll.\n * @param {Object} opts The `opts` argument passed to destroyAll.\n * @property {string} opts.op `beforeDestroyAll`\n */\n beforeDestroyAll: noop,\n\n /**\n * Lifecycle method method called by find.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes find to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by find.\n *\n * @name Adapter#beforeFind\n * @method\n * @param {Object} mapper The `mapper` argument passed to find.\n * @param {(string|number)} id The `id` argument passed to find.\n * @param {Object} opts The `opts` argument passed to find.\n * @property {string} opts.op `beforeFind`\n */\n beforeFind: noop,\n\n /**\n * Lifecycle method method called by findAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes findAll to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.\n *\n * @name Adapter#beforeFindAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to findAll.\n * @param {Object} query The `query` argument passed to findAll.\n * @param {Object} opts The `opts` argument passed to findAll.\n * @property {string} opts.op `beforeFindAll`\n */\n beforeFindAll: noop,\n\n /**\n * Lifecycle method method called by sum.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes sum to wait for the Promise to resolve before continuing.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.\n *\n * @name Adapter#beforeSum\n * @method\n * @param {Object} mapper The `mapper` argument passed to sum.\n * @param {Object} query The `query` argument passed to sum.\n * @param {Object} opts The `opts` argument passed to sum.\n * @property {string} opts.op `beforeSum`\n */\n beforeSum: noop,\n\n /**\n * Lifecycle method method called by update.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes update to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by update.\n *\n * @name Adapter#beforeUpdate\n * @method\n * @param {Object} mapper The `mapper` argument passed to update.\n * @param {(string|number)} id The `id` argument passed to update.\n * @param {Object} props The `props` argument passed to update.\n * @param {Object} opts The `opts` argument passed to update.\n * @property {string} opts.op `beforeUpdate`\n */\n beforeUpdate: noop,\n\n /**\n * Lifecycle method method called by updateAll.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.\n *\n * @name Adapter#beforeUpdateAll\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateAll.\n * @param {Object} props The `props` argument passed to updateAll.\n * @param {Object} query The `query` argument passed to updateAll.\n * @param {Object} opts The `opts` argument passed to updateAll.\n * @property {string} opts.op `beforeUpdateAll`\n */\n beforeUpdateAll: noop,\n\n /**\n * Lifecycle method method called by updateMany.\n *\n * Override this method to add custom behavior for this lifecycle hook.\n *\n * Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.\n *\n * `props` may be modified. You can also re-assign `props` to another value by returning a different value or a Promise that resolves to a different value.\n *\n * A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.\n *\n * @name Adapter#beforeUpdateMany\n * @method\n * @param {Object} mapper The `mapper` argument passed to updateMany.\n * @param {Object[]} props The `props` argument passed to updateMany.\n * @param {Object} opts The `opts` argument passed to updateMany.\n * @property {string} opts.op `beforeUpdateMany`\n */\n beforeUpdateMany: noop,\n\n /**\n * Retrieve the number of records that match the selection query. Called by\n * `Mapper#count`.\n *\n * @name Adapter#count\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n count (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeCount lifecycle hook\n op = opts.op = 'beforeCount'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'count'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._count(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterCount lifecycle hook\n op = opts.op = 'afterCount'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create a new record. Called by `Mapper#create`.\n *\n * @name Adapter#create\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The record to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n create (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreate lifecycle hook\n op = opts.op = 'beforeCreate'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'create'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._create(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'create')\n response.created = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterCreate lifecycle hook\n op = opts.op = 'afterCreate'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Create multiple records in a single batch. Called by `Mapper#createMany`.\n *\n * @name Adapter#createMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The records to be created.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n createMany (mapper, props, opts) {\n let op\n props || (props = {})\n opts || (opts = {})\n\n // beforeCreateMany lifecycle hook\n op = opts.op = 'beforeCreateMany'\n return utils.resolve(this[op](mapper, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = props.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'createMany'\n this.dbg(op, mapper, props, opts)\n return utils.resolve(this._createMany(mapper, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'createMany')\n response.created = data.length\n response = this.respond(response, opts)\n\n // afterCreateMany lifecycle hook\n op = opts.op = 'afterCreateMany'\n return utils.resolve(this[op](mapper, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the record with the given primary key. Called by\n * `Mapper#destroy`.\n *\n * @name Adapter#destroy\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to destroy.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroy (mapper, id, opts) {\n let op\n opts || (opts = {})\n\n // beforeDestroy lifecycle hook\n op = opts.op = 'beforeDestroy'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'destroy'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._destroy(mapper, id, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroy')\n response = this.respond(response, opts)\n\n // afterDestroy lifecycle hook\n op = opts.op = 'afterDestroy'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Destroy the records that match the selection query. Called by\n * `Mapper#destroyAll`.\n *\n * @name Adapter#destroyAll\n * @method\n * @param {Object} mapper the mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n destroyAll (mapper, query, opts) {\n let op\n query || (query = {})\n opts || (opts = {})\n\n // beforeDestroyAll lifecycle hook\n op = opts.op = 'beforeDestroyAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'destroyAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._destroyAll(mapper, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'destroyAll')\n response = this.respond(response, opts)\n\n // afterDestroyAll lifecycle hook\n op = opts.op = 'afterDestroyAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Load a belongsTo relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadBelongsTo\n * @method\n * @return {Promise}\n */\n loadBelongsTo (mapper, def, records, __opts) {\n const relationDef = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n const record = records\n return this.find(relationDef, this.makeBelongsToForeignKey(mapper, def, record), __opts)\n .then((relatedItem) => {\n def.setLocalField(record, relatedItem)\n })\n } else {\n const keys = records\n .map((record) => this.makeBelongsToForeignKey(mapper, def, record))\n .filter((key) => key)\n return this.findAll(relationDef, {\n where: {\n [relationDef.idAttribute]: {\n 'in': keys\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((record) => {\n relatedItems.forEach((relatedItem) => {\n if (relatedItem[relationDef.idAttribute] === record[def.foreignKey]) {\n def.setLocalField(record, relatedItem)\n }\n })\n })\n })\n }\n },\n\n /**\n * Retrieve the record with the given primary key. Called by `Mapper#find`.\n *\n * @name Adapter#find\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id Primary key of the record to retrieve.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n find (mapper, id, opts) {\n let op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n // beforeFind lifecycle hook\n op = opts.op = 'beforeFind'\n return utils.resolve(this[op](mapper, id, opts))\n .then(() => {\n op = opts.op = 'find'\n this.dbg(op, mapper, id, opts)\n return utils.resolve(this._find(mapper, id, opts))\n })\n .then((results) => this.loadRelationsFor(mapper, results, opts))\n .then(([record, meta]) => {\n let response = new Response(record, meta, 'find')\n response.found = record ? 1 : 0\n response = this.respond(response, opts)\n\n // afterFind lifecycle hook\n op = opts.op = 'afterFind'\n return utils.resolve(this[op](mapper, id, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Retrieve the records that match the selection query.\n *\n * @name Adapter#findAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @param {string[]} [opts.with=[]] Relations to eager load.\n * @return {Promise}\n */\n findAll (mapper, query, opts) {\n let op\n opts || (opts = {})\n opts.with || (opts.with = [])\n\n const activeWith = opts._activeWith\n\n if (utils.isObject(activeWith)) {\n const activeQuery = activeWith.query || {}\n if (activeWith.replace) {\n query = activeQuery\n } else {\n utils.deepFillIn(query, activeQuery)\n }\n }\n\n // beforeFindAll lifecycle hook\n op = opts.op = 'beforeFindAll'\n return utils.resolve(this[op](mapper, query, opts))\n .then(() => {\n op = opts.op = 'findAll'\n this.dbg(op, mapper, query, opts)\n return utils.resolve(this._findAll(mapper, query, opts))\n })\n .then((results) => this.loadRelationsFor(mapper, results, opts))\n .then(([records, meta]) => {\n let response = new Response(records, meta, 'findAll')\n response.found = records.length\n response = this.respond(response, opts)\n\n // afterFindAll lifecycle hook\n op = opts.op = 'afterFindAll'\n return utils.resolve(this[op](mapper, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n loadRelationsFor (mapper, results, opts) {\n const [records] = results\n const tasks = []\n\n if (records) {\n utils.forEachRelation(mapper, opts, (def, __opts) => {\n let task\n if (def.foreignKey && (def.type === 'hasOne' || def.type === 'hasMany')) {\n if (def.type === 'hasOne') {\n task = this.loadHasOne(mapper, def, records, __opts)\n } else {\n task = this.loadHasMany(mapper, def, records, __opts)\n }\n } else if (def.type === 'hasMany' && def.localKeys) {\n task = this.loadHasManyLocalKeys(mapper, def, records, __opts)\n } else if (def.type === 'hasMany' && def.foreignKeys) {\n task = this.loadHasManyForeignKeys(mapper, def, records, __opts)\n } else if (def.type === 'belongsTo') {\n task = this.loadBelongsTo(mapper, def, records, __opts)\n }\n if (task) {\n tasks.push(task)\n }\n })\n }\n\n return utils.Promise.all(tasks)\n .then(() => results)\n },\n\n /**\n * Resolve the value of the specified option based on the given options and\n * this adapter's settings. Override with care.\n *\n * @name Adapter#getOpt\n * @method\n * @param {string} opt The name of the option.\n * @param {Object} [opts] Configuration options.\n * @return {*} The value of the specified option.\n */\n getOpt (opt, opts) {\n opts || (opts = {})\n return opts[opt] === undefined ? utils.plainCopy(this[opt]) : utils.plainCopy(opts[opt])\n },\n\n /**\n * Load a hasMany relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasMany\n * @method\n * @return {Promise}\n */\n loadHasMany (mapper, def, records, __opts) {\n let singular = false\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n singular = true\n records = [records]\n }\n const IDs = records.map((record) => this.makeHasManyForeignKey(mapper, def, record))\n const query = {\n where: {}\n }\n const criteria = query.where[def.foreignKey] = {}\n if (singular) {\n // more efficient query when we only have one record\n criteria['=='] = IDs[0]\n } else {\n criteria['in'] = IDs.filter((id) => id)\n }\n return this.findAll(def.getRelation(), query, __opts).then((relatedItems) => {\n records.forEach((record) => {\n let attached = []\n // avoid unneccesary iteration when we only have one record\n if (singular) {\n attached = relatedItems\n } else {\n relatedItems.forEach((relatedItem) => {\n if (utils.get(relatedItem, def.foreignKey) === record[mapper.idAttribute]) {\n attached.push(relatedItem)\n }\n })\n }\n def.setLocalField(record, attached)\n })\n })\n },\n\n loadHasManyLocalKeys (mapper, def, records, __opts) {\n let record\n const relatedMapper = def.getRelation()\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': this.makeHasManyLocalKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n let localKeys = []\n records.forEach((record) => {\n localKeys = localKeys.concat(this.makeHasManyLocalKeys(mapper, def, record))\n })\n return this.findAll(relatedMapper, {\n where: {\n [relatedMapper.idAttribute]: {\n 'in': unique(localKeys).filter((x) => x)\n }\n }\n }, __opts).then((relatedItems) => {\n records.forEach((item) => {\n let attached = []\n let itemKeys = utils.get(item, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n relatedItems.forEach((relatedItem) => {\n if (itemKeys && itemKeys.indexOf(relatedItem[relatedMapper.idAttribute]) !== -1) {\n attached.push(relatedItem)\n }\n })\n def.setLocalField(item, attached)\n })\n return relatedItems\n })\n }\n },\n\n loadHasManyForeignKeys (mapper, def, records, __opts) {\n const relatedMapper = def.getRelation()\n const idAttribute = mapper.idAttribute\n let record\n\n if (utils.isObject(records) && !utils.isArray(records)) {\n record = records\n }\n\n if (record) {\n return this.findAll(def.getRelation(), {\n where: {\n [def.foreignKeys]: {\n 'contains': this.makeHasManyForeignKeys(mapper, def, record)\n }\n }\n }, __opts).then((relatedItems) => {\n def.setLocalField(record, relatedItems)\n })\n } else {\n return this.findAll(relatedMapper, {\n where: {\n [def.foreignKeys]: {\n 'isectNotEmpty': records.map((record) => this.makeHasManyForeignKeys(mapper, def, record))\n }\n }\n }, __opts).then((relatedItems) => {\n const foreignKeysField = def.foreignKeys\n records.forEach((record) => {\n const _relatedItems = []\n const id = utils.get(record, idAttribute)\n relatedItems.forEach((relatedItem) => {\n const foreignKeys = utils.get(relatedItems, foreignKeysField) || []\n if (foreignKeys.indexOf(id) !== -1) {\n _relatedItems.push(relatedItem)\n }\n })\n def.setLocalField(record, _relatedItems)\n })\n })\n }\n },\n\n /**\n * Load a hasOne relationship.\n *\n * Override with care.\n *\n * @name Adapter#loadHasOne\n * @method\n * @return {Promise}\n */\n loadHasOne (mapper, def, records, __opts) {\n if (utils.isObject(records) && !utils.isArray(records)) {\n records = [records]\n }\n return this.loadHasMany(mapper, def, records, __opts).then(() => {\n records.forEach((record) => {\n const relatedData = def.getLocalField(record)\n if (utils.isArray(relatedData) && relatedData.length) {\n def.setLocalField(record, relatedData[0])\n }\n })\n })\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * There may be reasons why you may want to override this method, like when\n * the id of the parent doesn't exactly match up to the key on the child.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKey\n * @method\n * @return {*}\n */\n makeHasManyForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Return the localKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyLocalKeys\n * @method\n * @return {*}\n */\n makeHasManyLocalKeys (mapper, def, record) {\n let localKeys = []\n let itemKeys = utils.get(record, def.localKeys) || []\n itemKeys = utils.isArray(itemKeys) ? itemKeys : Object.keys(itemKeys)\n localKeys = localKeys.concat(itemKeys)\n return unique(localKeys).filter((x) => x)\n },\n\n /**\n * Return the foreignKeys from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeHasManyForeignKeys\n * @method\n * @return {*}\n */\n makeHasManyForeignKeys (mapper, def, record) {\n return utils.get(record, mapper.idAttribute)\n },\n\n /**\n * Return the foreignKey from the given record for the provided relationship.\n *\n * Override with care.\n *\n * @name Adapter#makeBelongsToForeignKey\n * @method\n * @return {*}\n */\n makeBelongsToForeignKey (mapper, def, record) {\n return def.getForeignKey(record)\n },\n\n /**\n * Retrieve sum of the specified field of the records that match the selection\n * query. Called by `Mapper#sum`.\n *\n * @name Adapter#sum\n * @method\n * @param {Object} mapper The mapper.\n * @param {string} field By to sum.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n sum (mapper, field, query, opts) {\n let op\n if (!utils.isString(field)) {\n throw new Error('field must be a string!')\n }\n query || (query = {})\n opts || (opts = {})\n\n // beforeSum lifecycle hook\n op = opts.op = 'beforeSum'\n return utils.resolve(this[op](mapper, field, query, opts))\n .then(() => {\n // Allow for re-assignment from lifecycle hook\n op = opts.op = 'sum'\n this.dbg(op, mapper, field, query, opts)\n return utils.resolve(this._sum(mapper, field, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, op)\n response = this.respond(response, opts)\n\n // afterSum lifecycle hook\n op = opts.op = 'afterSum'\n return utils.resolve(this[op](mapper, field, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * @name Adapter#respond\n * @method\n * @param {Object} response Response object.\n * @param {Object} opts Configuration options.\n * return {Object} If `opts.raw == true` then return `response`, else return\n * `response.data`.\n */\n respond (response, opts) {\n return this.getOpt('raw', opts) ? response : response.data\n },\n\n /**\n * Apply the given update to the record with the specified primary key. Called\n * by `Mapper#update`.\n *\n * @name Adapter#update\n * @method\n * @param {Object} mapper The mapper.\n * @param {(string|number)} id The primary key of the record to be updated.\n * @param {Object} props The update to apply to the record.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n update (mapper, id, props, opts) {\n props || (props = {})\n opts || (opts = {})\n let op\n\n // beforeUpdate lifecycle hook\n op = opts.op = 'beforeUpdate'\n return utils.resolve(this[op](mapper, id, props, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'update'\n this.dbg(op, mapper, id, props, opts)\n return utils.resolve(this._update(mapper, id, props, opts))\n })\n .then((results) => {\n let [data, result] = results\n result || (result = {})\n let response = new Response(data, result, 'update')\n response.updated = data ? 1 : 0\n response = this.respond(response, opts)\n\n // afterUpdate lifecycle hook\n op = opts.op = 'afterUpdate'\n return utils.resolve(this[op](mapper, id, props, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Apply the given update to all records that match the selection query.\n * Called by `Mapper#updateAll`.\n *\n * @name Adapter#updateAll\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object} props The update to apply to the selected records.\n * @param {Object} [query] Selection query.\n * @param {Object} [query.where] Filtering criteria.\n * @param {string|Array} [query.orderBy] Sorting criteria.\n * @param {string|Array} [query.sort] Same as `query.sort`.\n * @param {number} [query.limit] Limit results.\n * @param {number} [query.skip] Offset results.\n * @param {number} [query.offset] Same as `query.skip`.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateAll (mapper, props, query, opts) {\n props || (props = {})\n query || (query = {})\n opts || (opts = {})\n let op\n\n // beforeUpdateAll lifecycle hook\n op = opts.op = 'beforeUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts))\n .then((_props) => {\n // Allow for re-assignment from lifecycle hook\n props = _props === undefined ? props : _props\n props = withoutRelations(mapper, props, opts)\n op = opts.op = 'updateAll'\n this.dbg(op, mapper, props, query, opts)\n return utils.resolve(this._updateAll(mapper, props, query, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateAll')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateAll lifecycle hook\n op = opts.op = 'afterUpdateAll'\n return utils.resolve(this[op](mapper, props, query, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n },\n\n /**\n * Update the given records in a single batch. Called by `Mapper#updateMany`.\n *\n * @name Adapter#updateMany\n * @method\n * @param {Object} mapper The mapper.\n * @param {Object[]} records The records to update.\n * @param {Object} [opts] Configuration options.\n * @param {boolean} [opts.raw=false] Whether to return a more detailed\n * response object.\n * @return {Promise}\n */\n updateMany (mapper, records, opts) {\n records || (records = [])\n opts || (opts = {})\n let op\n const idAttribute = mapper.idAttribute\n\n records = records.filter((record) => utils.get(record, idAttribute))\n\n // beforeUpdateMany lifecycle hook\n op = opts.op = 'beforeUpdateMany'\n return utils.resolve(this[op](mapper, records, opts))\n .then((_records) => {\n // Allow for re-assignment from lifecycle hook\n records = _records === undefined ? records : _records\n records = records.map((record) => withoutRelations(mapper, record, opts))\n op = opts.op = 'updateMany'\n this.dbg(op, mapper, records, opts)\n return utils.resolve(this._updateMany(mapper, records, opts))\n })\n .then((results) => {\n let [data, result] = results\n data || (data = [])\n result || (result = {})\n let response = new Response(data, result, 'updateMany')\n response.updated = data.length\n response = this.respond(response, opts)\n\n // afterUpdateMany lifecycle hook\n op = opts.op = 'afterUpdateMany'\n return utils.resolve(this[op](mapper, records, opts, response))\n .then((_response) => _response === undefined ? response : _response)\n })\n }\n})\n\n/**\n * Create a subclass of this Adapter:\n *\n * @example Adapter.extend\n * // Normally you would do: import {Adapter} from 'js-data'\n * const JSData = require('js-data@3.0.0-beta.10')\n * const {Adapter} = JSData\n * console.log('Using JSData v' + JSData.version.full)\n *\n * // Extend the class using ES2015 class syntax.\n * class CustomAdapterClass extends Adapter {\n * foo () { return 'bar' }\n * static beep () { return 'boop' }\n * }\n * const customAdapter = new CustomAdapterClass()\n * console.log(customAdapter.foo())\n * console.log(CustomAdapterClass.beep())\n *\n * // Extend the class using alternate method.\n * const OtherAdapterClass = Adapter.extend({\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const otherAdapter = new OtherAdapterClass()\n * console.log(otherAdapter.foo())\n * console.log(OtherAdapterClass.beep())\n *\n * // Extend the class, providing a custom constructor.\n * function AnotherAdapterClass () {\n * Adapter.call(this)\n * this.created_at = new Date().getTime()\n * }\n * Adapter.extend({\n * constructor: AnotherAdapterClass,\n * foo () { return 'bar' }\n * }, {\n * beep () { return 'boop' }\n * })\n * const anotherAdapter = new AnotherAdapterClass()\n * console.log(anotherAdapter.created_at)\n * console.log(anotherAdapter.foo())\n * console.log(AnotherAdapterClass.beep())\n *\n * @method Adapter.extend\n * @param {Object} [props={}] Properties to add to the prototype of the\n * subclass.\n * @param {Object} [props.constructor] Provide a custom constructor function\n * to be used as the subclass itself.\n * @param {Object} [classProps={}] Static properties to add to the subclass.\n * @returns {Constructor} Subclass of this Adapter class.\n */\n"],"names":["noop","args","opts","length","dbg","op","utils","resolve","noop2","unique","array","seen","final","forEach","item","push","withoutRelations","mapper","props","with","relationFields","toStrip","filter","value","indexOf","omit","reserved","Response","data","meta","fillIn","DEFAULTS","Adapter","classCallCheck","call","Component","extend","query","then","_count","results","result","response","respond","_response","undefined","_props","_create","created","map","record","_createMany","id","_destroy","_destroyAll","def","records","__opts","relationDef","getRelation","isObject","isArray","find","makeBelongsToForeignKey","relatedItem","setLocalField","keys","key","findAll","idAttribute","relatedItems","foreignKey","_find","loadRelationsFor","found","activeWith","_activeWith","activeQuery","replace","deepFillIn","_findAll","tasks","forEachRelation","task","type","loadHasOne","loadHasMany","localKeys","loadHasManyLocalKeys","foreignKeys","loadHasManyForeignKeys","loadBelongsTo","Promise","all","opt","plainCopy","singular","IDs","makeHasManyForeignKey","criteria","where","attached","get","relatedMapper","makeHasManyLocalKeys","concat","x","itemKeys","Object","makeHasManyForeignKeys","foreignKeysField","_relatedItems","relatedData","getLocalField","getForeignKey","field","isString","Error","_sum","getOpt","_update","updated","_updateAll","_records","_updateMany"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,OAAO,SAAPA,IAAO,GAAmB;oCAANC,IAAM;QAAA;;;MAC/BC,OAAOD,KAAKA,KAAKE,MAAL,GAAc,CAAnB,CAAb;OACKC,GAAL,cAASF,KAAKG,EAAd,SAAqBJ,IAArB;SACOK,aAAMC,OAAN,EAAP;CAHK;;AAMP,AAAO,IAAMC,QAAQ,SAARA,KAAQ,GAAmB;qCAANP,IAAM;QAAA;;;MAChCC,OAAOD,KAAKA,KAAKE,MAAL,GAAc,CAAnB,CAAb;OACKC,GAAL,cAASF,KAAKG,EAAd,SAAqBJ,IAArB;SACOK,aAAMC,OAAN,EAAP;CAHK;;AAMP,AAAO,IAAME,SAAS,SAATA,MAAS,CAAUC,KAAV,EAAiB;MAC/BC,OAAO,EAAb;MACMC,QAAQ,EAAd;QACMC,OAAN,CAAc,UAAUC,IAAV,EAAgB;QACxBA,QAAQH,IAAZ,EAAkB;;;UAGZI,IAAN,CAAWD,IAAX;SACKA,IAAL,IAAa,CAAb;GALF;SAOOF,KAAP;CAVK;;AAaP,AAAO,IAAMI,mBAAmB,SAAnBA,gBAAmB,CAAUC,MAAV,EAAkBC,KAAlB,EAAyBhB,IAAzB,EAA+B;WACpDA,OAAO,EAAhB;OACKiB,IAAL,KAAcjB,KAAKiB,IAAL,GAAY,EAA1B;MACMC,iBAAiBH,OAAOG,cAAP,IAAyB,EAAhD;MACMC,UAAUD,eAAeE,MAAf,CAAsB,UAACC,KAAD;WAAWrB,KAAKiB,IAAL,CAAUK,OAAV,CAAkBD,KAAlB,MA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