server/drivers/presto/_presto.js
function send(config, query) {
  if (!config.url) {
    return Promise.reject(new Error('config.url is required'));
  }
  const results = {
    data: []
  };
  return fetch(`${config.url}/v1/statement`, {
    method: 'POST',
    body: query,
    headers: getHeaders(config)
  })
    .then(response => response.json())
    .then(statement => handleStatementAndGetMore(results, statement, config));
}
function send(config, query) {
  if (!config.url) {
    return Promise.reject(new Error('config.url is required'));
  }
  const results = {
    data: []
  };
  return fetch(`${config.url}/v1/statement`, {
    method: 'POST',
    body: query,
    headers: getHeaders(config)
  })
    .then(response => response.json())
    .then(statement => handleStatementAndGetMore(results, statement, config));
}
function send ( config , query ) { if ( ! config . url ) { return Promise . reject ( new Error ( 'config.url is required' ) ) ; } const results = { data : [ ] } ; return fetch ( ` ${ config . url } ` , { method : 'POST' , body : query , headers : getHeaders ( config ) } ) . then ( response => response . json ( ) ) . then ( statement => handleStatementAndGetMore ( results , statement , config ) ) ; }
Given config and query, returns promise with the results
Given config and query returns promise with the results