rename Executor::execute to Executor::fetch

This commit is contained in:
Ryan Leckey
2020-02-29 12:19:17 -08:00
parent 72b60e8a7d
commit 0afcf33395
7 changed files with 31 additions and 31 deletions

View File

@@ -349,7 +349,7 @@ impl Connection for PgConnection {
}
fn ping(&mut self) -> BoxFuture<crate::Result<()>> {
Box::pin(self.execute("SELECT 1").map_ok(|_| ()))
Box::pin(self.fetch("SELECT 1").map_ok(|_| ()))
}
#[doc(hidden)]

View File

@@ -58,7 +58,7 @@ impl PgConnection {
impl<'e> Executor<'e> for &'e mut super::PgConnection {
type Database = Postgres;
fn execute<'q, E>(self, query: E) -> PgCursor<'e, 'q>
fn fetch<'q, E>(self, query: E) -> PgCursor<'e, 'q>
where
E: Execute<'q, Self::Database>,
{
@@ -67,11 +67,11 @@ impl<'e> Executor<'e> for &'e mut super::PgConnection {
#[doc(hidden)]
#[inline]
fn execute_by_ref<'q, E>(&mut self, query: E) -> PgCursor<'_, 'q>
fn fetch_by_ref<'q, E>(&mut self, query: E) -> PgCursor<'_, 'q>
where
E: Execute<'q, Self::Database>,
{
self.execute(query)
self.fetch(query)
}
}