handleResponse(data, operation) {
        if (!operation.isAltered && data.rows.length > 0) {
            // returning data
            return data.rows;
        } if (operation.isAltered) {
            if (operation.type === 'insert' && data.rowCount === 1) {
                // return inserted row id
                return data.rows[0].id;
            }
            // data altered successfully - return affected rows
            const affectedRows = data.hasOwnProperty('rowCount') ? data.rowCount : false;
            return affectedRows;
        }
        // select statement but no data found
        return false;
    }
/**
	 * handle query response depending on query operation type
	 * @param {array} data
	 * @param {object} operation
	 */
handle query response depending on query operation type
@param {array} data
@param {object} operation
handle query response depending on query operation type @param { array } data @param { object } operation
handleResponse(data, operation) {
        if (!operation.isAltered && data.rows.length > 0) {
            return data.rows;
        } if (operation.isAltered) {
            if (operation.type === 'insert' && data.rowCount === 1) {
                return data.rows[0].id;
            }
            const affectedRows = data.hasOwnProperty('rowCount') ? data.rowCount : false;
            return affectedRows;
        }
        return false;
    }
handleResponse ( data , operation ) { if ( ! operation . isAltered && data . rows . length > 0 ) { return data . rows ; } if ( operation . isAltered ) { if ( operation . type === 'insert' && data . rowCount === 1 ) { return data . rows [ 0 ] . id ; } const affectedRows = data . hasOwnProperty ( 'rowCount' ) ? data . rowCount : false ; return affectedRows ; } return false ; }
handle query response depending on query operation type
 @param {array} data
 @param {object} operation
handle query response depending on query operation type @param { array } data @param { object } operation
// returning data // return inserted row id // data altered successfully - return affected rows // select statement but no data found