diff --git a/sqlx-core/src/column.rs b/sqlx-core/src/column.rs index 0b9b087c..80bd0f43 100644 --- a/sqlx-core/src/column.rs +++ b/sqlx-core/src/column.rs @@ -34,10 +34,10 @@ pub(crate) mod private_column { /// /// This trait is sealed and cannot be implemented for types outside of SQLx. /// -/// [`Row`]: trait.Row.html -/// [`Statement`]: trait.Statement.html -/// [`get`]: trait.Row.html#method.get -/// [`try_get`]: trait.Row.html#method.try_get +/// [`Row`]: crate::row::Row +/// [`Statement`]: crate::statement::Statement +/// [`get`]: crate::row::Row::get +/// [`try_get`]: crate::row::Row::try_get /// pub trait ColumnIndex: private_column_index::Sealed + Debug { /// Returns a valid positional index into the row or statement, [`ColumnIndexOutOfBounds`], or, diff --git a/sqlx-core/src/error.rs b/sqlx-core/src/error.rs index d2554f20..a6e9f903 100644 --- a/sqlx-core/src/error.rs +++ b/sqlx-core/src/error.rs @@ -20,7 +20,7 @@ pub type BoxDynError = Box; /// An unexpected `NULL` was encountered during decoding. /// -/// Returned from [`Row::get`] if the value from the database is `NULL`, +/// Returned from [`Row::get`](sqlx_core::row::Row::get) if the value from the database is `NULL`, /// and you are not decoding into an `Option`. #[derive(thiserror::Error, Debug)] #[error("unexpected null; try decoding as an `Option`")] diff --git a/sqlx-core/src/executor.rs b/sqlx-core/src/executor.rs index 26df59b2..4ef86cbf 100644 --- a/sqlx-core/src/executor.rs +++ b/sqlx-core/src/executor.rs @@ -18,9 +18,9 @@ use std::fmt::Debug; /// /// Implemented for the following: /// -/// * [`&Pool`] -/// * [`&mut PoolConnection`] -/// * [`&mut Connection`] +/// * [`&Pool`](super::pool::Pool) +/// * [`&mut PoolConnection`](super::pool::PoolConnection) +/// * [`&mut Connection`](super::connection::Connection) /// pub trait Executor<'c>: Send + Debug + Sized { type Database: Database; @@ -179,8 +179,8 @@ pub trait Executor<'c>: Send + Debug + Sized { /// /// Implemented for the following: /// -/// * [`&str`] -/// * [`Query`] +/// * [`&str`](std::str) +/// * [`Query`](super::query::Query) /// pub trait Execute<'q, DB: Database>: Send + Sized { /// Gets the SQL that will be executed. diff --git a/sqlx-core/src/query.rs b/sqlx-core/src/query.rs index 5a75ceb1..b5b373e4 100644 --- a/sqlx-core/src/query.rs +++ b/sqlx-core/src/query.rs @@ -111,8 +111,8 @@ where /// /// See [`try_map`](Query::try_map) for a fallible version of this method. /// - /// The [`query_as`](crate::query_as::query_as) method will construct a mapped query using - /// a [`FromRow`](crate::row::FromRow) implementation. + /// The [`query_as`](super::query_as::query_as) method will construct a mapped query using + /// a [`FromRow`](super::from_row::FromRow) implementation. #[inline] pub fn map(self, f: F) -> Map<'q, DB, impl TryMapRow, A> where @@ -124,8 +124,8 @@ where /// Map each row in the result to another type. /// - /// The [`query_as`](crate::query_as::query_as) method will construct a mapped query using - /// a [`FromRow`](crate::row::FromRow) implementation. + /// The [`query_as`](super::query_as::query_as) method will construct a mapped query using + /// a [`FromRow`](super::from_row::FromRow) implementation. #[inline] pub fn try_map(self, f: F) -> Map<'q, DB, F, A> where diff --git a/sqlx-core/src/query_as.rs b/sqlx-core/src/query_as.rs index a141eec5..ba0441e8 100644 --- a/sqlx-core/src/query_as.rs +++ b/sqlx-core/src/query_as.rs @@ -152,7 +152,7 @@ where } /// Make a SQL query that is mapped to a concrete type -/// using [`FromRow`](crate::row::FromRow). +/// using [`FromRow`]. #[inline] pub fn query_as<'q, DB, O>(sql: &'q str) -> QueryAs<'q, DB, O, >::Arguments> where @@ -166,7 +166,7 @@ where } /// Make a SQL query, with the given arguments, that is mapped to a concrete type -/// using [`FromRow`](crate::row::FromRow). +/// using [`FromRow`]. #[inline] pub fn query_as_with<'q, DB, O, A>(sql: &'q str, arguments: A) -> QueryAs<'q, DB, O, A> where diff --git a/sqlx-core/src/query_scalar.rs b/sqlx-core/src/query_scalar.rs index 17607c93..d19fc7ed 100644 --- a/sqlx-core/src/query_scalar.rs +++ b/sqlx-core/src/query_scalar.rs @@ -141,7 +141,7 @@ where } /// Make a SQL query that is mapped to a single concrete type -/// using [`FromRow`](crate::row::FromRow). +/// using [`FromRow`]. #[inline] pub fn query_scalar<'q, DB, O>( sql: &'q str, @@ -156,7 +156,7 @@ where } /// Make a SQL query, with the given arguments, that is mapped to a single concrete type -/// using [`FromRow`](crate::row::FromRow). +/// using [`FromRow`]. #[inline] pub fn query_scalar_with<'q, DB, O, A>(sql: &'q str, arguments: A) -> QueryScalar<'q, DB, O, A> where diff --git a/sqlx-core/src/row.rs b/sqlx-core/src/row.rs index dd51c61f..99c86af0 100644 --- a/sqlx-core/src/row.rs +++ b/sqlx-core/src/row.rs @@ -104,9 +104,9 @@ pub trait Row: private_row::Sealed + Unpin + Send + Sync + 'static { /// * [`ColumnIndexOutOfBounds`] if the `usize` index was greater than the number of columns in the row. /// * [`ColumnDecode`] if the value could not be decoded into the requested type. /// - /// [`ColumnDecode`]: crate::Error::ColumnDecode - /// [`ColumnNotFound`]: crate::Error::ColumnNotFound - /// [`ColumnIndexOutOfBounds`]: crate::Error::ColumnIndexOutOfBounds + /// [`ColumnDecode`]: Error::ColumnDecode + /// [`ColumnNotFound`]: Error::ColumnNotFound + /// [`ColumnIndexOutOfBounds`]: Error::ColumnIndexOutOfBounds /// fn try_get<'r, T, I>(&'r self, index: I) -> Result where @@ -144,9 +144,9 @@ pub trait Row: private_row::Sealed + Unpin + Send + Sync + 'static { /// * [`ColumnIndexOutOfBounds`] if the `usize` index was greater than the number of columns in the row. /// * [`ColumnDecode`] if the value could not be decoded into the requested type. /// - /// [`ColumnDecode`]: crate::Error::ColumnDecode - /// [`ColumnNotFound`]: crate::Error::ColumnNotFound - /// [`ColumnIndexOutOfBounds`]: crate::Error::ColumnIndexOutOfBounds + /// [`ColumnDecode`]: Error::ColumnDecode + /// [`ColumnNotFound`]: Error::ColumnNotFound + /// [`ColumnIndexOutOfBounds`]: Error::ColumnIndexOutOfBounds /// #[inline] fn try_get_unchecked<'r, T, I>(&'r self, index: I) -> Result @@ -169,8 +169,8 @@ pub trait Row: private_row::Sealed + Unpin + Send + Sync + 'static { /// * [`ColumnNotFound`] if the column by the given name was not found. /// * [`ColumnIndexOutOfBounds`] if the `usize` index was greater than the number of columns in the row. /// - /// [`ColumnNotFound`]: crate::Error::ColumnNotFound - /// [`ColumnIndexOutOfBounds`]: crate::Error::ColumnIndexOutOfBounds + /// [`ColumnNotFound`]: Error::ColumnNotFound + /// [`ColumnIndexOutOfBounds`]: Error::ColumnIndexOutOfBounds /// fn try_get_raw( &self, diff --git a/sqlx-core/src/value.rs b/sqlx-core/src/value.rs index a4744dbe..88558610 100644 --- a/sqlx-core/src/value.rs +++ b/sqlx-core/src/value.rs @@ -57,7 +57,7 @@ pub trait Value { /// /// * [`Decode`] if the value could not be decoded into the requested type. /// - /// [`Decode`]: crate::Error::Decode + /// [`Decode`]: Error::Decode /// #[inline] fn try_decode<'r, T>(&'r self) -> Result @@ -84,7 +84,7 @@ pub trait Value { /// /// * [`Decode`] if the value could not be decoded into the requested type. /// - /// [`Decode`]: crate::Error::Decode + /// [`Decode`]: Error::Decode /// #[inline] fn try_decode_unchecked<'r, T>(&'r self) -> Result diff --git a/src/macros.rs b/src/macros.rs index 6cb4e635..2d17b82c 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1,6 +1,6 @@ /// Statically checked SQL query with `println!()` style syntax. /// -/// This expands to an instance of [QueryAs][crate::QueryAs] that outputs an ad-hoc anonymous struct type, +/// This expands to an instance of [`QueryAs`](sqlx_core::query_as::QueryAs) that outputs an ad-hoc anonymous struct type, /// if the query has output columns, or `()` (unit) otherwise: /// /// ```rust,ignore