(index)
| 786 | } |
| 787 | |
| 788 | static _conformIndex(index) { |
| 789 | if (!index.fields) { |
| 790 | throw new Error('Missing "fields" property for index definition'); |
| 791 | } |
| 792 | |
| 793 | index = _.defaults(index, { |
| 794 | type: '', |
| 795 | parser: null |
| 796 | }); |
| 797 | |
| 798 | if (index.type && index.type.toLowerCase() === 'unique') { |
| 799 | index.unique = true; |
| 800 | delete index.type; |
| 801 | } |
| 802 | |
| 803 | return index; |
| 804 | } |
| 805 | |
| 806 | |
| 807 | static _uniqIncludes(options) { |
no outgoing calls
no test coverage detected