UNPKG

859 BJavaScriptView Raw
1// Copyright IBM Corp. 2016. All Rights Reserved.
2// Node module: loopback-datasource-juggler
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6'use strict';
7module.exports = {
8
9 // connector which uses custom field settings
10 customFieldSettings: {
11 initialize: function(ds, done) {
12 ds.connector = {
13 name: 'custom',
14 discoverModelProperties: function(resource, options, done) {
15 done(null, [
16 {
17 owner: 'public',
18 columnName: 'name',
19 type: 'String',
20 required: false,
21
22 // custom properties listed under a key matching the connector name
23 custom: {storage: 'quantum'},
24 },
25 ]);
26 },
27 };
28 ds.connector.dataSource = ds;
29 },
30 },
31
32};