function query(sql, cache_options) {
	let result;

	// only cache during build, because
	// parquet can/will eventually change during dev
	if (cache_options?.prerendering) {
		result = get_arrow_if_sql_already_run(sql);
	}

	// TODO: This just fails, where is the process going?
	// if cache missed, fallback to querying
	if (!result) {
		result = connection.query(sql);
	}

	if (cache_options) {
		cache_for_hash(sql, result, cache_options);
	}

	return arrowTableToJSON(result);
}
Queries the database with the given SQL statement.

@param {string} sql
@param {Parameters<typeof cache_for_hash>[2]} [cache_options]
@returns {Record<string, unknown>[]}