function execute(sql, params) {
	if ('' === sql) sql = params.shift() || '';

	if (0 === sql.trim().length) {
		console.error('\nNo SQL to process\n');
		yargs.showHelp();
		process.exit(1);
	}

	for (var i = 1; i < params.length; i++) {
		var a = params[i];
		if (a[0] !== '"' && a[0] !== "'") {
			if (+a == a) {
				// jshint ignore:line
				params[i] = +a;
			}
		}
	}

	if (argv.ast) {
		try {
			console.log(formatOutput(alasql.parse(sql, params)));
			process.exit(0);
		} catch (e) {
			console.error(e);
			process.exit(1);
		}
	}

	/*if (argv.comp) {
		try {
			console.log(alasql.compile(sql, params));
			process.exit(0);
		} catch (e) {
			console.error(e);
			process.exit(1);
		}
	}*/

	alasql
		.promise(sql, params)
		.then(function (res) {
			if (!alasql.options.stdout) {
				console.log(formatOutput(res));
			}
			process.exit(0);
		})
		.catch(function (err) {
			let errorJsonObj = JSON.parse(JSON.stringify(err, Object.getOwnPropertyNames(err)));
			console.error(
				formatOutput({
					error: errorJsonObj,
				})
			);
			process.exit(1);
		});
}
Execute SQL query

@sql {String} SQL query
@param {String} Parameters
@returns {null} Result will be printet to console.log