diff --git a/sqlx-core/src/mysql/mod.rs b/sqlx-core/src/mysql/mod.rs index 7efddc38..5c6de5a1 100644 --- a/sqlx-core/src/mysql/mod.rs +++ b/sqlx-core/src/mysql/mod.rs @@ -24,6 +24,7 @@ mod types; mod util; /// An alias for [`Pool`], specialized for **MySQL**. +#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))] pub type MySqlPool = crate::pool::Pool; make_query_as!(MySqlQueryAs, MySql, MySqlRow); diff --git a/sqlx-core/src/postgres/connection.rs b/sqlx-core/src/postgres/connection.rs index db42f1ba..bb0fb95a 100644 --- a/sqlx-core/src/postgres/connection.rs +++ b/sqlx-core/src/postgres/connection.rs @@ -16,7 +16,7 @@ use crate::postgres::stream::PgStream; use crate::postgres::{sasl, tls}; use crate::url::Url; -/// An asynchronous connection to a [Postgres][super::Postgres] database. +/// An asynchronous connection to a [Postgres](struct.Postgres.html) database. /// /// The connection string expected by [Connect::connect] should be a PostgreSQL connection /// string, as documented at diff --git a/sqlx-core/src/postgres/database.rs b/sqlx-core/src/postgres/database.rs index 399b2f67..b4a18189 100644 --- a/sqlx-core/src/postgres/database.rs +++ b/sqlx-core/src/postgres/database.rs @@ -1,3 +1,5 @@ +//! Types which represent various database drivers. + use crate::database::{Database, HasCursor, HasRawValue, HasRow}; use crate::postgres::row::PgValue; diff --git a/sqlx-core/src/postgres/mod.rs b/sqlx-core/src/postgres/mod.rs index 853514ac..2b22388e 100644 --- a/sqlx-core/src/postgres/mod.rs +++ b/sqlx-core/src/postgres/mod.rs @@ -24,6 +24,7 @@ mod tls; pub mod types; /// An alias for [`Pool`][crate::Pool], specialized for **Postgres**. +#[cfg_attr(docsrs, doc(cfg(feature = "postgres")))] pub type PgPool = crate::pool::Pool; make_query_as!(PgQueryAs, Postgres, PgRow); diff --git a/sqlx-core/src/postgres/types/raw/mod.rs b/sqlx-core/src/postgres/types/raw/mod.rs index 79f22768..d0bcda48 100644 --- a/sqlx-core/src/postgres/types/raw/mod.rs +++ b/sqlx-core/src/postgres/types/raw/mod.rs @@ -2,4 +2,4 @@ mod numeric; mod record; pub use numeric::{PgNumeric, PgNumericSign}; -pub use record::{PgRecordEncoder, PgRecordDecoder}; +pub use record::{PgRecordDecoder, PgRecordEncoder}; diff --git a/sqlx-core/src/sqlite/connection.rs b/sqlx-core/src/sqlite/connection.rs index 2f1eaded..a689556e 100644 --- a/sqlx-core/src/sqlite/connection.rs +++ b/sqlx-core/src/sqlite/connection.rs @@ -22,7 +22,7 @@ use crate::url::Url; #[derive(Clone, Copy)] pub(super) struct SqliteConnectionHandle(pub(super) NonNull); -/// A connection to a [SQLite][super::Sqlite] database. +/// A connection to a [Sqlite](struct.Sqlite.html) database. pub struct SqliteConnection { pub(super) handle: SqliteConnectionHandle, pub(super) worker: Worker, diff --git a/sqlx-core/src/sqlite/mod.rs b/sqlx-core/src/sqlite/mod.rs index 21221c4f..b28fff80 100644 --- a/sqlx-core/src/sqlite/mod.rs +++ b/sqlx-core/src/sqlite/mod.rs @@ -1,3 +1,5 @@ +//! **SQLite** database and connection types. + mod arguments; mod connection; mod cursor; @@ -20,6 +22,7 @@ pub use types::SqliteTypeInfo; pub use value::SqliteValue; /// An alias for [`Pool`][crate::Pool], specialized for **Sqlite**. +#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))] pub type SqlitePool = crate::pool::Pool; make_query_as!(SqliteQueryAs, Sqlite, SqliteRow); diff --git a/src/lib.rs b/src/lib.rs index 576cfa87..89919b25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,6 +55,7 @@ pub mod ty_match; #[doc(hidden)] pub mod result_ext; +/// Types and traits for encoding values for the database. pub mod encode { pub use sqlx_core::encode::{Encode, IsNull}; @@ -62,6 +63,7 @@ pub mod encode { pub use sqlx_macros::Encode; } +/// Types and traits for decoding values from the database. pub mod decode { pub use sqlx_core::decode::Decode; @@ -69,6 +71,7 @@ pub mod decode { pub use sqlx_macros::Decode; } +/// Convenience re-export of common traits. pub mod prelude { pub use super::Connect; pub use super::Connection;