2016-04-01 22:25:16 +00:00
|
|
|
// Copyright IBM Corp. 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-03-16 16:17:55 +00:00
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
// connector which uses custom field settings
|
|
|
|
customFieldSettings: {
|
|
|
|
initialize: function(ds, done) {
|
|
|
|
ds.connector = {
|
|
|
|
name: 'custom',
|
|
|
|
discoverModelProperties: function(resource, options, done) {
|
|
|
|
done(null, [
|
|
|
|
{
|
|
|
|
owner: 'public',
|
|
|
|
columnName: 'name',
|
|
|
|
type: 'String',
|
|
|
|
required: false,
|
|
|
|
|
|
|
|
// custom properties listed under a key matching the connector name
|
2016-04-01 11:48:17 +00:00
|
|
|
custom: { storage: 'quantum' },
|
|
|
|
},
|
2016-03-16 16:17:55 +00:00
|
|
|
]);
|
2016-04-01 11:48:17 +00:00
|
|
|
},
|
2016-03-16 16:17:55 +00:00
|
|
|
};
|
|
|
|
ds.connector.dataSource = ds;
|
2016-04-01 11:48:17 +00:00
|
|
|
},
|
|
|
|
},
|
2016-03-16 16:17:55 +00:00
|
|
|
|
|
|
|
};
|