driver-interface
Version:
Standardized interface for common functionality, expressed in layers. Covers communication with databases, hardware, web services, and more.
45 lines (24 loc) • 1.01 kB
JavaScript
module.exports = {
friendlyName: 'Verify model def',
description: 'Verify that the specified model definition is compatible with this adapter.',
extendedDescription: 'This assumes that the provided model def has already undergone adapter-agnostic normalization, and is considered generally valid.',
sideEffects: 'cacheable',
sync: true,
inputs: {
modelDef: {
description: 'A Waterline model definition.',
extendedDescription: 'This model definition should already be fully-formed (i.e. it should have undergone generic normalization/validation already).',
moreInfoUrl: 'http://sailsjs.com/documentation/concepts/models-and-orm/models',
example: '===',// {}
readOnly: true,
required: true
}
},
exits: {
invalid: {
description: 'The provided model definition was invalid.',
outputFriendlyName: 'Error',
outputExample: '==='// e.g. new Error('Primary key attribute should have `columnName: \'_id\'`.')
}
},
};