docs: add back type module documentation

This commit is contained in:
Ryan Leckey 2020-06-18 19:14:16 -07:00
parent 21717b47a0
commit 8b4ef3f0b8
2 changed files with 19 additions and 9 deletions

View File

@ -58,6 +58,21 @@ pub mod ty_match;
#[doc(hidden)]
pub mod result_ext;
/// Conversions between Rust and SQL types.
///
/// To see how each SQL type maps to a Rust type, see the corresponding `types` module for each
/// database:
///
/// * [PostgreSQL](../postgres/types/index.html)
/// * [MySQL](../mysql/types/index.html)
/// * [SQLite](../sqlite/types/index.html)
/// * [MSSQL](../mssql/types/index.html)
///
/// Any external types that have had [`Type`] implemented for, are re-exported in this module
/// for convenience as downstream users need to use a compatible version of the external crate
/// to take advantage of the implementation.
///
/// [`Type`]: types/trait.Type.html
pub mod types {
pub use sqlx_core::types::*;
@ -84,10 +99,11 @@ pub mod decode {
pub use sqlx_macros::Decode;
}
/// Return types for the `query` family of functions and macros.
pub mod query {
pub use sqlx_core::query::{query, query_with, Map, Query};
pub use sqlx_core::query_as::{query_as, query_as_with, QueryAs};
pub use sqlx_core::query_scalar::{query_scalar, query_scalar_with, QueryScalar};
pub use sqlx_core::query::{Map, Query};
pub use sqlx_core::query_as::QueryAs;
pub use sqlx_core::query_scalar::QueryScalar;
}
/// Convenience re-export of common traits.

View File

@ -1,6 +0,0 @@
//! Traits linking Rust types to SQL types.
pub use sqlx_core::types::*;
#[cfg(feature = "macros")]
pub use sqlx_macros::HasSqlType;