mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-16 17:34:33 +00:00
rename Executor::execute to Executor::fetch
This commit is contained in:
@@ -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)]
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user