Skip to content

Commit

Permalink
Minor documentation fixes
Browse files Browse the repository at this point in the history
This commit fixes a list of documentation warnings shown while running
rustdoc. This mostly fixes broken links
  • Loading branch information
weiznich committed Feb 14, 2025
1 parent a80ddaa commit 54501b5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions diesel/src/pg/expression/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where
elements.into_array_expression()
}

/// Return type of [`array(tuple_or_subselect)`](super::dsl::array)
/// Return type of [`array(tuple_or_subselect)`](super::dsl::array())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array<ST, T> = <T as IntoArrayExpression<ST>>::ArrayExpression;
Expand All @@ -72,7 +72,7 @@ pub type array<ST, T> = <T as IntoArrayExpression<ST>>::ArrayExpression;
(`AsExpressionList` is a deprecated trait alias for `IntoArrayExpression`)"
)]
pub trait IntoArrayExpression<ST: SqlType + TypedExpressionType> {
/// Type of the expression returned by [AsArrayExpression::as_in_expression]
/// Type of the expression returned by [IntoArrayExpression::into_array_expression]
type ArrayExpression: Expression<SqlType = sql_types::Array<ST>>;

/// Construct the diesel query dsl representation of
Expand Down
8 changes: 4 additions & 4 deletions diesel/src/pg/expression/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ extern "SQL" {

/// Converts each array element to its text representation and concatenates those elements
/// separated by the delimiter string. `NULL` entries are omitted in this variant.
/// See [array_to_string_with_null_string] for a variant with that argument.
/// See [array_to_string_with_null_string](array_to_string_with_null_string()) for a variant with that argument.
///
/// # Example
///
Expand Down Expand Up @@ -1115,7 +1115,7 @@ extern "SQL" {

/// Returns an array initialized with supplied value and dimensions,
/// optionally with lower bounds other than 1. This function omits the optional
/// lower bound argument. See [array_fill_with_lower_bound] for that.
/// lower bound argument. See [array_fill_with_lower_bound](array_fill_with_lower_bound()) for that.
///
/// # Example
///
Expand Down Expand Up @@ -1229,7 +1229,7 @@ extern "SQL" {

/// Returns the subscript of the first occurrence of the second argument in the array, or NULL if it's not present.
/// If the third argument is given, the search begins at that subscript. This function omits the third argument.
/// See [array_position_with_subscript].
/// See [array_position_with_subscript](array_position_with_subscript()).
///
/// The array must be one-dimensional. Comparisons are done using IS NOT DISTINCT FROM semantics,
/// so it is possible to search for NULL.
Expand Down Expand Up @@ -2107,7 +2107,7 @@ extern "SQL" {
/// Builds a JSON object out of a text array. The array must have an even number of members,
/// in which case they are taken as alternating key/value pairs. This function also has a form that
/// that takes keys and values as separate text array arguments.
/// See [jsonb_object_with_keys_and_values]
/// See [jsonb_object_with_keys_and_values](jsonb_object_with_keys_and_values())
///
/// # Example
///
Expand Down
34 changes: 17 additions & 17 deletions diesel/src/pg/expression/helper_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,48 +130,48 @@ pub type IntersectionRange<Lhs, Rhs> = Intersection<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type NullsFirst<T> = super::operators::NullsFirst<T>;

/// The return type of [`expr.is_json()`](super::expression_methods::PgExpressionMethods::is_json)
/// The return type of [`expr.is_json()`](super::expression_methods::PgTextExpressionMethods::is_json())
#[cfg(feature = "postgres_backend")]
pub type IsJson<T> = super::operators::IsJson<T>;

/// The return type of [`expr.is_not_json()`](super::expression_methods::PgExpressionMethods::is_not_json)
/// The return type of [`expr.is_not_json()`](super::expression_methods::PgTextExpressionMethods::is_not_json())
#[cfg(feature = "postgres_backend")]
pub type IsNotJson<T> = super::operators::IsNotJson<T>;

/// The return type of [`expr.is_json_object()`](super::expression_methods::PgExpressionMethods::is_json_object)
/// The return type of [`expr.is_json_object()`](super::expression_methods::PgTextExpressionMethods::is_json_object())
#[cfg(feature = "postgres_backend")]
pub type IsJsonObject<T> = super::operators::IsJsonObject<T>;

/// The return type of [`expr.is_not_json_object()`](super::expression_methods::PgExpressionMethods::is_not_json_object)
/// The return type of [`expr.is_not_json_object()`](super::expression_methods::PgTextExpressionMethods::is_not_json_object())
#[cfg(feature = "postgres_backend")]
pub type IsNotJsonObject<T> = super::operators::IsNotJsonObject<T>;

/// The return type of [`expr.is_json_array()`](super::expression_methods::PgExpressionMethods::is_json_array)
/// The return type of [`expr.is_json_array()`](super::expression_methods::PgTextExpressionMethods::is_json_array())
#[cfg(feature = "postgres_backend")]
pub type IsJsonArray<T> = super::operators::IsJsonArray<T>;

/// The return type of [`expr.is_not_json_array()`](super::expression_methods::PgExpressionMethods::is_not_json_array)
/// The return type of [`expr.is_not_json_array()`](super::expression_methods::PgTextExpressionMethods::is_not_json_array())
#[cfg(feature = "postgres_backend")]
pub type IsNotJsonArray<T> = super::operators::IsNotJsonArray<T>;

/// The return type of [`expr.is_json_scalar()`](super::expression_methods::PgExpressionMethods::is_json_scalar)
/// The return type of [`expr.is_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_json_scalar())
#[cfg(feature = "postgres_backend")]
pub type IsJsonScalar<T> = super::operators::IsJsonScalar<T>;

/// The return type of [`expr.is_not_json_scalar()`](super::expression_methods::PgExpressionMethods::is_not_json_scalar)
/// The return type of [`expr.is_not_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_not_json_scalar())
#[cfg(feature = "postgres_backend")]
pub type IsNotJsonScalar<T> = super::operators::IsNotJsonScalar<T>;

/// The return type of [`expr.nulls_last()`](super::expression_methods::PgSortExpressionMethods::nulls_last)
/// The return type of [`expr.nulls_last()`](super::expression_methods::PgSortExpressionMethods::nulls_last())
#[cfg(feature = "postgres_backend")]
pub type NullsLast<T> = super::operators::NullsLast<T>;

/// The return type of [`expr.at_time_zone(tz)`](super::expression_methods::PgTimestampExpressionMethods::at_time_zone)
/// The return type of [`expr.at_time_zone(tz)`](super::expression_methods::PgTimestampExpressionMethods::at_time_zone())
#[cfg(feature = "postgres_backend")]
pub type AtTimeZone<Lhs, Rhs> =
Grouped<super::date_and_time::AtTimeZone<Lhs, AsExprOf<Rhs, VarChar>>>;

/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgNetExpressionMethods::contains)
/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgNetExpressionMethods::contains())
/// for network types
#[cfg(feature = "postgres_backend")]
pub type ContainsNet<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExprOf<Rhs, Inet>>>;
Expand Down Expand Up @@ -340,7 +340,7 @@ pub type NotLikeBinary<Lhs, Rhs> = crate::dsl::NotLike<Lhs, Rhs>;
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;

/// Return type of [`array_to_string_with_null_string(arr, delim, null_str)`](super::functions::array_to_string_with_null_string)
/// Return type of [`array_to_string_with_null_string(arr, delim, null_str)`](super::functions::array_to_string_with_null_string())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_to_string_with_null_string<A, D, N> =
Expand All @@ -351,7 +351,7 @@ pub type array_to_string_with_null_string<A, D, N> =
N, // The null string
>;

/// Return type of [`array_to_string(arr, delim)`](super::functions::array_to_string)
/// Return type of [`array_to_string(arr, delim)`](super::functions::array_to_string())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_to_string<A, D> = super::functions::array_to_string<
Expand Down Expand Up @@ -472,18 +472,18 @@ pub type array_lower<A, D> = super::functions::array_lower<SqlTypeOf<A>, A, D>;
#[cfg(feature = "postgres_backend")]
pub type array_upper<A, D> = super::functions::array_upper<SqlTypeOf<A>, A, D>;

/// Return type of [`array_position(array,element)`](super::functions::array_position)
/// Return type of [`array_position(array, element)`](super::functions::array_position())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_position<A, E> = super::functions::array_position<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;

/// Return type of [`array_position_with_subscript(array,element,subscript)`](super::functions::array_position_with_subscript)
/// Return type of [`array_position_with_subscript(array,element, subscript)`](super::functions::array_position_with_subscript())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_position_with_subscript<A, E, S> =
super::functions::array_position_with_subscript<SqlTypeOf<A>, SqlTypeOf<E>, A, E, S>;

/// Return type of [`array_positions(array,element)`](super::functions::array_positions)
/// Return type of [`array_positions(array, element)`](super::functions::array_positions())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_positions<A, E> =
Expand All @@ -499,7 +499,7 @@ pub type array_ndims<A> = super::functions::array_ndims<SqlTypeOf<A>, A>;
#[cfg(feature = "postgres_backend")]
pub type array_shuffle<A> = super::functions::array_shuffle<SqlTypeOf<A>, A>;

/// Return type of [`array_sample(array,n)`](super::function::array_sample())
/// Return type of [`array_sample(array,n)`](super::functions::array_sample())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_sample<A, N> = super::functions::array_sample<SqlTypeOf<A>, A, N>;
Expand Down
10 changes: 5 additions & 5 deletions diesel/src/sqlite/connection/sqlite_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> {
/// If the underlying value is not a string sqlite will convert it
/// into a string and return that value instead.
///
/// Use the [`value_type()`] function to determine the actual
/// Use the [`value_type()`](Self::value_type()) function to determine the actual
/// type of the value.
///
/// See <https://www.sqlite.org/c3ref/value_blob.html> for details
Expand All @@ -125,7 +125,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> {
/// If the underlying value is not a blob sqlite will convert it
/// into a blob and return that value instead.
///
/// Use the [`value_type()`] function to determine the actual
/// Use the [`value_type()`](Self::value_type()) function to determine the actual
/// type of the value.
///
/// See <https://www.sqlite.org/c3ref/value_blob.html> for details
Expand All @@ -152,7 +152,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> {
/// If the underlying value is not an integer sqlite will convert it
/// into an integer and return that value instead.
///
/// Use the [`value_type()`] function to determine the actual
/// Use the [`value_type()`](Self::value_type()) function to determine the actual
/// type of the value.
///
/// See <https://www.sqlite.org/c3ref/value_blob.html> for details
Expand All @@ -165,7 +165,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> {
/// If the underlying value is not a string sqlite will convert it
/// into a string and return that value instead.
///
/// Use the [`value_type()`] function to determine the actual
/// Use the [`value_type()`](Self::value_type()) function to determine the actual
/// type of the value.
///
/// See <https://www.sqlite.org/c3ref/value_blob.html> for details
Expand All @@ -178,7 +178,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> {
/// If the underlying value is not a string sqlite will convert it
/// into a string and return that value instead.
///
/// Use the [`value_type()`] function to determine the actual
/// Use the [`value_type()`](Self::value_type()) function to determine the actual
/// type of the value.
///
/// See <https://www.sqlite.org/c3ref/value_blob.html> for details
Expand Down

0 comments on commit 54501b5

Please sign in to comment.