select(select) {
		if (!Array.isArray(select)) {
			throw new SyntaxError(`select() parameter 1 should be an array, ${typeof select} given.`);
		}

		this._query.select = '';
		let distinctAdded = false;
		//validating select fields
		for (let index = 0; index < select.length; index++) {
			let field = select[index];
			if (typeof field === 'string') {
				continue;
			} else if (typeof field === 'object' && field.type === 'DISTINCT' && !distinctAdded) {
				this._query.select += field.query;
				select.splice(index, 1);
				distinctAdded = true;
			} else {
				throw new SyntaxError('Unknown data type select field', field);
			}
		};

		this._query.select += select.join(', ');
		return this;
	}
/**
	 * assigns both table name and selected columns
	 * @param array select 
	 * @returns {Query}
	 */
assigns both table name and selected columns
@param array select
@returns {Query}
assigns both table name and selected columns @param array select @returns { Query }
select(select) {
		if (!Array.isArray(select)) {
			throw new SyntaxError(`select() parameter 1 should be an array, ${typeof select} given.`);
		}
		this._query.select = '';
		let distinctAdded = false;
		for (let index = 0; index < select.length; index++) {
			let field = select[index];
			if (typeof field === 'string') {
				continue;
			} else if (typeof field === 'object' && field.type === 'DISTINCT' && !distinctAdded) {
				this._query.select += field.query;
				select.splice(index, 1);
				distinctAdded = true;
			} else {
				throw new SyntaxError('Unknown data type select field', field);
			}
		};
		this._query.select += select.join(', ');
		return this;
	}
select ( select ) { if ( ! Array . isArray ( select ) ) { throw new SyntaxError ( ` ${ typeof select } ` ) ; } this . _query . select = '' ; let distinctAdded = false ; for ( let index = 0 ; index < select . length ; index ++ ) { let field = select [ index ] ; if ( typeof field === 'string' ) { continue ; } else if ( typeof field === 'object' && field . type === 'DISTINCT' && ! distinctAdded ) { this . _query . select += field . query ; select . splice ( index , 1 ) ; distinctAdded = true ; } else { throw new SyntaxError ( 'Unknown data type select field' , field ) ; } } ; this . _query . select += select . join ( ', ' ) ; return this ; }
assigns both table name and selected columns
 @param array select
 @returns {Query}
assigns both table name and selected columns @param array select @returns { Query }
//validating select fields