Skip to content

Commit

Permalink
Merge pull request #29 from Samrose-Ahmed/master
Browse files Browse the repository at this point in the history
Make Client::get and some functions public
  • Loading branch information
nooberfsh authored Aug 17, 2023
2 parents 7ead4d6 + 3d0f011 commit adf326f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl ClientBuilder {
}

pub fn schema(mut self, s: impl ToString) -> Self {
self.session.catalog = Some(s.to_string());
self.session.schema = Some(s.to_string());
self
}

Expand Down Expand Up @@ -423,7 +423,7 @@ impl Client {
retry!(self, get_next, url, self.max_attempt)
}

async fn get<T: Presto + 'static>(&self, sql: String) -> Result<QueryResult<T>> {
pub async fn get<T: Presto + 'static>(&self, sql: String) -> Result<QueryResult<T>> {
let req = self.client.post(self.url.clone()).body(sql);
let req = {
let session = self.session.read().await;
Expand All @@ -441,7 +441,7 @@ impl Client {
self.send(req).await
}

async fn get_next<T: Presto + 'static>(&self, url: &str) -> Result<QueryResult<T>> {
pub async fn get_next<T: Presto + 'static>(&self, url: &str) -> Result<QueryResult<T>> {
let req = self.client.get(url);
let req = {
let session = self.session.read().await;
Expand Down
2 changes: 1 addition & 1 deletion src/types/data_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<T: Presto> DataSet<T> {
self.data.as_slice()
}

pub(crate) fn merge(&mut self, other: DataSet<T>) {
pub fn merge(&mut self, other: DataSet<T>) {
self.data.extend(other.data)
}
}
Expand Down

0 comments on commit adf326f

Please sign in to comment.