pub struct ApiReqUserSearchData {
    pub user_id: i32,
    pub creator_user_id: Option<i32>,
    pub data_id: Option<i32>,
    pub filename: Option<String>,
    pub data_type: Option<String>,
    pub above_bytes: Option<i64>,
    pub below_bytes: Option<i64>,
    pub comments: Option<String>,
    pub encoding: Option<String>,
    pub sloc: Option<String>,
}
Expand description

ApiReqUserSearchData

Request Type For search_user_data

Handles searching for many users_data record(s) from the db with optional filters

This type is the deserialized input for: search_user_data(crate::requests::user::search_user_data::search_user_data]

Usage

This type is constructed from the deserialized bytes (&[u8]) argument on the search_user_data function.

Arguments

  • user_id - i32 - user id
  • creator_user_id - Option<i32> - filter by users_data.user_id
  • data_id - Option<i32> - filter by users_data.id
  • filename - Option<String> - filter by users_data.filename with a ILIKE operation
  • data_type - Option<String> - filter by users_data.data_type https://www.google.com/search?q=rust+bigint+postgres postgres size_in_bytes field is a BIGINT type
  • above_bytes - Option<i64> - filter by users_data.above_bytes (relative to users_data.size_in_bytes value)
  • below_bytes - Option<i64> - filter by users_data.below_bytes (relative to users_data.size_in_bytes value)
  • comments - Option<String> - filter by users_data.comments with a ILIKE operation
  • encoding - Option<String> - filter by users_data.encoding
  • sloc - Option<String> - filter by users_data.sloc the s3 storage location

Fields

user_id: i32creator_user_id: Option<i32>data_id: Option<i32>filename: Option<String>data_type: Option<String>above_bytes: Option<i64>below_bytes: Option<i64>comments: Option<String>encoding: Option<String>sloc: Option<String>

Implementations

implementation for handling complex search filtering using sql

get_sql

Build the v1 search query string based on the the requested values.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more