async firstOne() {
		if (this._query.values !== undefined) {
			console.log("Warning: Setting values in select statement will be ignored");
		}

		this.opType = 'select';
		this._query.table = this.tableName;
		this.parser.setOptions({ allowHtml: this.allowHtml, selectable: this.selectable });

		let queryString = this.parser.parseQueryString(this._query);

		queryString = queryString + ' limit 1';

		if (this._query.stringify) {
			this._query = {};
			return queryString;
		}

		try {
			let data = await this._exec(queryString)
			return new Promise(resolve => {
				resolve(data[0]);
			});
		} catch (error) {
			throw new Error(error);
		}
	}
/**
	 * fetch the first row found under certain conditions
	 */
fetch the first row found under certain conditions
fetch the first row found under certain conditions
async firstOne() {
		if (this._query.values !== undefined) {
			console.log("Warning: Setting values in select statement will be ignored");
		}
		this.opType = 'select';
		this._query.table = this.tableName;
		this.parser.setOptions({ allowHtml: this.allowHtml, selectable: this.selectable });
		let queryString = this.parser.parseQueryString(this._query);
		queryString = queryString + ' limit 1';
		if (this._query.stringify) {
			this._query = {};
			return queryString;
		}
		try {
			let data = await this._exec(queryString)
			return new Promise(resolve => {
				resolve(data[0]);
			});
		} catch (error) {
			throw new Error(error);
		}
	}
async firstOne ( ) { if ( this . _query . values !== undefined ) { console . log ( "Warning: Setting values in select statement will be ignored" ) ; } this . opType = 'select' ; this . _query . table = this . tableName ; this . parser . setOptions ( { allowHtml : this . allowHtml , selectable : this . selectable } ) ; let queryString = this . parser . parseQueryString ( this . _query ) ; queryString = queryString + ' limit 1' ; if ( this . _query . stringify ) { this . _query = { } ; return queryString ; } try { let data = await this . _exec ( queryString ) return new Promise ( resolve => { resolve ( data [ 0 ] ) ; } ) ; } catch ( error ) { throw new Error ( error ) ; } }
fetch the first row found under certain conditions
fetch the first row found under certain conditions