(index)
| 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) { |
no outgoing calls
no test coverage detected