Skip to content

Commit

Permalink
cursor: for now, add #[doc(hidden)] to from_connection and from_pool …
Browse files Browse the repository at this point in the history
…as we look for ways to remove them
  • Loading branch information
mehcode authored and janaakhterov committed Mar 20, 2020
1 parent ac59fe7 commit f29c80c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sqlx-core/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ where
{
type Database: Database;

#[doc(hidden)]
fn from_pool<E>(pool: &Pool<<Self::Database as Database>::Connection>, query: E) -> Self
where
Self: Sized,
E: Execute<'q, Self::Database>;

#[doc(hidden)]
fn from_connection<E>(
connection: &'c mut <Self::Database as Database>::Connection,
query: E,
Expand Down
2 changes: 2 additions & 0 deletions sqlx-core/src/mysql/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct MySqlCursor<'c, 'q> {
impl<'c, 'q> Cursor<'c, 'q> for MySqlCursor<'c, 'q> {
type Database = MySql;

#[doc(hidden)]
fn from_pool<E>(pool: &Pool<MySqlConnection>, query: E) -> Self
where
Self: Sized,
Expand All @@ -35,6 +36,7 @@ impl<'c, 'q> Cursor<'c, 'q> for MySqlCursor<'c, 'q> {
}
}

#[doc(hidden)]
fn from_connection<E>(conn: &'c mut MySqlConnection, query: E) -> Self
where
Self: Sized,
Expand Down
2 changes: 2 additions & 0 deletions sqlx-core/src/postgres/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub struct PgCursor<'c, 'q> {
impl<'c, 'q> Cursor<'c, 'q> for PgCursor<'c, 'q> {
type Database = Postgres;

#[doc(hidden)]
fn from_pool<E>(pool: &Pool<PgConnection>, query: E) -> Self
where
Self: Sized,
Expand All @@ -35,6 +36,7 @@ impl<'c, 'q> Cursor<'c, 'q> for PgCursor<'c, 'q> {
}
}

#[doc(hidden)]
fn from_connection<E>(conn: &'c mut PgConnection, query: E) -> Self
where
Self: Sized,
Expand Down
2 changes: 2 additions & 0 deletions sqlx-core/src/sqlite/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub struct SqliteCursor<'c, 'q> {
impl<'c, 'q> Cursor<'c, 'q> for SqliteCursor<'c, 'q> {
type Database = Sqlite;

#[doc(hidden)]
fn from_pool<E>(pool: &Pool<SqliteConnection>, query: E) -> Self
where
Self: Sized,
Expand All @@ -32,6 +33,7 @@ impl<'c, 'q> Cursor<'c, 'q> for SqliteCursor<'c, 'q> {
}
}

#[doc(hidden)]
fn from_connection<E>(conn: &'c mut SqliteConnection, query: E) -> Self
where
Self: Sized,
Expand Down

0 comments on commit f29c80c

Please sign in to comment.