src/Select/Select.js
/**
	 * Fetch values and index by the given field name
	 * @param {String} byField  The field by which to index (e.g. id)
	 * @return {Promise<Object>}
	 */
Fetch values and index by the given field name
@param {String} byField  The field by which to index
@return {Promise}
Fetch values and index by the given field name @param { String } byField The field by which to index @return { Promise }
async fetchIndexed(byField, options = {}) {
		options.sql = this.toString();
		const { queries, results, fields } = await this.fetch(options);
		const indexed = {};
		results.forEach(r => (indexed[r[byField]] = r));
		return { queries, results: indexed, fields };
	}
async fetchIndexed ( byField , options = { } ) { options . sql = this . toString ( ) ; const { queries , results , fields } = await this . fetch ( options ) ; const indexed = { } ; results . forEach ( r => ( indexed [ r [ byField ] ] = r ) ) ; return { queries , results : indexed , fields } ; }
Fetch values and index by the given field name
 @param {String} byField  The field by which to index (e.g.
Fetch values and index by the given field name @param { String } byField The field by which to index ( e . g .