MCPcopy
hub / github.com/sequelize/sequelize / _conformIndex

Method _conformIndex

lib/model.js:765–781  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

763 }
764
765 static _conformIndex(index) {
766 if (!index.fields) {
767 throw new Error('Missing "fields" property for index definition');
768 }
769
770 index = _.defaults(index, {
771 type: '',
772 parser: null
773 });
774
775 if (index.type && index.type.toLowerCase() === 'unique') {
776 index.unique = true;
777 delete index.type;
778 }
779
780 return index;
781 }
782
783
784 static _uniqIncludes(options) {

Callers 3

initMethod · 0.95
refreshAttributesMethod · 0.95
addIndexQueryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected