Skip to content

Commit

Permalink
Switch the generic argument order to make it conistent with the real …
Browse files Browse the repository at this point in the history
…argument order
  • Loading branch information
weiznich committed Aug 2, 2024
1 parent 263d1f1 commit 4f843d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions diesel/src/pg/expression/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,23 705,23 @@ define_sql_function! {
/// # use diesel::dsl::array_append;
/// # use diesel::sql_types::{Nullable, Integer, Array};
/// # let connection = &mut establish_connection();
/// let ints = diesel::select(array_append::<Integer, Array<_>, _, _>(vec![1, 2], 3))
/// let ints = diesel::select(array_append::<Array<_>, Integer, _, _>(vec![1, 2], 3))
/// .get_result::<Vec<i32>>(connection)?;
/// assert_eq!(vec![1, 2, 3], ints);
///
/// let ints = diesel::select(array_append::<Nullable<Integer>, Array<_>, _, _>(vec![Some(1), Some(2)], None::<i32>))
/// let ints = diesel::select(array_append::<Array<_>, Nullable<Integer>, _, _>(vec![Some(1), Some(2)], None::<i32>))
/// .get_result::<Vec<Option<i32>>>(connection)?;
/// assert_eq!(vec![Some(1), Some(2), None], ints);
///
/// let ints = diesel::select(array_append::<Integer, Nullable<Array<_>>, _, _>(None::<Vec<i32>>, 3))
/// let ints = diesel::select(array_append::<Nullable<Array<_>>, Integer, _, _>(None::<Vec<i32>>, 3))
/// .get_result::<Vec<i32>>(connection)?;
/// assert_eq!(vec![3], ints);
///
/// let ints = diesel::select(array_append::<Nullable<Integer>, Nullable<Array<_>>, _, _>(None::<Vec<i32>>, None::<i32>))
/// let ints = diesel::select(array_append::<Nullable<Array<_>>, Nullable<Integer>, _, _>(None::<Vec<i32>>, None::<i32>))
/// .get_result::<Vec<Option<i32>>>(connection)?;
/// assert_eq!(vec![None], ints);
/// # Ok(())
/// # }
/// ```
fn array_append<T: SingleValue, Arr: ArrayOrNullableArray<Inner=T> SingleValue>(a: Arr, e: T) -> Array<T>;
fn array_append<Arr: ArrayOrNullableArray<Inner=T> SingleValue, T: SingleValue>(a: Arr, e: T) -> Array<T>;
}

0 comments on commit 4f843d6

Please sign in to comment.