pub struct ChainQueryFilter {
    pub sequence_range: ChainQueryFilterRange,
    pub entry_type: Option<EntryType>,
    pub entry_hashes: Option<HashSet<HoloHash<Entry>, RandomState>>,
    pub action_type: Option<ActionType>,
    pub include_entries: bool,
    pub order_descending: bool,
}
Expand description

Specifies arguments to a query of the source chain, including ordering and filtering.

This struct is used to construct an actual SQL query on the database, and also has methods to allow filtering in-memory.

Fields

sequence_range: ChainQueryFilterRange

Limit the results to a range of records according to their actions.

entry_type: Option<EntryType>

Filter by EntryType

entry_hashes: Option<HashSet<HoloHash<Entry>, RandomState>>

Filter by a list of EntryHash.

action_type: Option<ActionType>

Filter by ActionType

include_entries: bool

Include the entries in the records

order_descending: bool

The query should be ordered in descending order (default is ascending), when run as a database query. There is no provisioning for in-memory ordering.

Implementations

Create a no-op ChainQueryFilter which returns everything.

Filter on sequence range.

Filter on entry type.

Filter on entry hashes.

Filter on action type.

Include the entries in the RecordsVec that is returned.

Set the order to ascending.

Set the order to ascending.

If the sequence range supports fork disambiguation, apply it to remove actions that are not in the correct branch. Numerical range bounds do NOT support fork disambiguation, and neither does unbounded, but everything hash bounded does.

Filter a vector of hashed actions according to the query.

Filter a vector of records according to the query.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serialize this value into the given Serde serializer. 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.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

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.

The type for metadata in pointers and references to 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