function schemas(connection) {
  return query(`
    SELECT table, name, type
    FROM system.columns
    WHERE database = '${connection.database}'
    ORDER BY table
  `, connection).then(({ rows }) => ({
    columnnames: [ 'tablename', 'column_name', 'data_type' ],
    rows
  }));
}
The following function will return a list of schemas.
@param {Object} connection connection parameters
@returns {Promise} that resolves to {
                   columnnames: [ 'tablename', 'column_name','data_type' ],
                   rows: [[tablename1, columnname1, datatype1], ...]] }