Skip to content

Commit

Permalink
fixed auto type test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Tariq authored and Ali Tariq committed Aug 26, 2024
1 parent f18c216 commit 67df9a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions diesel/src/pg/expression/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,8 @@ define_sql_function! {
#[cfg(feature = "postgres_backend")]
define_sql_function! {
/// Returns an array initialized with supplied value and dimensions,
/// optionally with lower bounds other than 1
/// optionally with lower bounds other than 1. This function omits the optional
/// lower bound argument. See [array_fill_with_lower_bound] for that.
///
/// # Example
///
Expand Down Expand Up @@ -1039,7 +1040,7 @@ define_sql_function! {
#[cfg(feature = "postgres_backend")]
define_sql_function! {
/// Returns an array initialized with supplied value and dimensions,
/// optionally with lower bounds other than 1
/// with lower bounds other than 1
///
/// # Example
///
Expand Down
6 changes: 3 additions & 3 deletions diesel/src/pg/expression/helper_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,10 @@ pub type cardinality<A> = super::functions::cardinality<SqlTypeOf<A>, A>;
/// Return type of [`array_fill(value,array)`](super::functions::array_fill())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_fill<E> = super::functions::array_fill<SqlTypeOf<E>, E, Array<Integer>>;
pub type array_fill<E, A> = super::functions::array_fill<SqlTypeOf<E>, E, A>;

/// Return type of [`array_fill_with_lower_bound(value,array,array)`](super::functions::array_fill_with_lower_bound())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_fill_with_lower_bound<E> =
super::functions::array_fill_with_lower_bound<SqlTypeOf<E>, E, Array<Integer>, Array<Integer>>;
pub type array_fill_with_lower_bound<E, A1, A2> =
super::functions::array_fill_with_lower_bound<SqlTypeOf<E>, E, A1, A2>;
4 changes: 2 additions & 2 deletions diesel_derives/tests/auto_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ fn postgres_functions() -> _ {
array_to_string(pg_extras::array, pg_extras::name),
array_to_string_with_null_string(pg_extras::array, pg_extras::name, pg_extras::name),
cardinality(pg_extras::array),
array_fill(pg_extras::id),
array_fill_with_lower_bound(pg_extras::id),
array_fill(pg_extras::id, pg_extras::array),
array_fill_with_lower_bound(pg_extras::id, pg_extras::array, pg_extras::array),
)
}

Expand Down

0 comments on commit 67df9a6

Please sign in to comment.