2018-09-17 16:00:12 +00:00
|
|
|
// Copyright IBM Corp. 2013,2016. All Rights Reserved.
|
|
|
|
// Node module: loopback-datasource-juggler
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2016-08-22 19:55:22 +00:00
|
|
|
'use strict';
|
2018-12-07 14:54:29 +00:00
|
|
|
const kvMemory = require('../lib/connectors/kv-memory');
|
|
|
|
const DataSource = require('..').DataSource;
|
2016-08-08 08:15:22 +00:00
|
|
|
|
2017-01-06 03:32:41 +00:00
|
|
|
describe('Optimized KeyValue-Memory connector', function() {
|
2018-12-07 14:54:29 +00:00
|
|
|
const dataSourceFactory = function() {
|
2016-08-19 17:46:59 +00:00
|
|
|
return new DataSource({connector: kvMemory});
|
2016-08-08 08:15:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
require('./kvao.suite')(dataSourceFactory);
|
|
|
|
});
|
2017-01-06 03:32:41 +00:00
|
|
|
|
|
|
|
describe('Unoptimized KeyValue-Memory connector', function() {
|
2018-12-07 14:54:29 +00:00
|
|
|
const dataSourceFactory = function() {
|
|
|
|
const ds = new DataSource({connector: kvMemory});
|
2017-01-06 03:32:41 +00:00
|
|
|
|
|
|
|
// disable optimized methods
|
|
|
|
ds.connector.deleteAll = false;
|
|
|
|
|
|
|
|
return ds;
|
|
|
|
};
|
|
|
|
|
|
|
|
require('./kvao.suite')(dataSourceFactory);
|
|
|
|
});
|