Skip to content

Commit 41b224d

Browse files
committed
'get_any' note in macro docs
1 parent b9f53b4 commit 41b224d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ormx-macros/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mod utils;
5050
///
5151
/// # Accessors: Getters
5252
/// ormx will generate accessor functions for fields annotated with `#[ormx(get_one)]`,
53-
/// `#[ormx(get_optional)]` and `#[ormx(get_many)]`.
53+
/// `#[ormx(get_optional)]`, `#[ormx(get_many)]` and `#[ormx(get_any)]`.
5454
/// These functions can be used to query a row by the value of the annotated field.
5555
///
5656
/// The generated function will have these signature:
@@ -63,6 +63,9 @@ mod utils;
6363
/// **`#[ormx(get_many)]`**:
6464
/// `{pub} async fn get_by_{field_name}(&{field_type}) -> Result<Vec<Self>>`
6565
///
66+
/// **`#[ormx(get_any)]`**:
67+
/// `{pub} async fn get_by_{field_name}(&[{field_type}]) -> Result<Vec<Self>>`
68+
///
6669
/// By default, the function will be named `get_by_{field_name)`, though this can be changed by
6770
/// supplying a custom name: `#[ormx(get_one = by_id)]`.
6871
/// By default, the function will take a reference to the type of the annotated field as an argument,

0 commit comments

Comments
 (0)