Merge remote-tracking branch 'magurotuna/doc-links'

This commit is contained in:
Ryan Leckey 2020-07-24 07:33:27 -07:00
commit 40f0a22765
9 changed files with 29 additions and 29 deletions

View File

@ -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<T: ?Sized>: private_column_index::Sealed + Debug {
/// Returns a valid positional index into the row or statement, [`ColumnIndexOutOfBounds`], or,

View File

@ -20,7 +20,7 @@ pub type BoxDynError = Box<dyn StdError + 'static + Send + Sync>;
/// 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`")]

View File

@ -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.

View File

@ -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<F, O>(self, f: F) -> Map<'q, DB, impl TryMapRow<DB, Output = O>, 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<F>(self, f: F) -> Map<'q, DB, F, A>
where

View File

@ -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, <DB as HasArguments<'q>>::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

View File

@ -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

View File

@ -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<T, Error>
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<T, Error>
@ -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<I>(
&self,

View File

@ -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<T, Error>
@ -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<T, Error>

View File

@ -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