pub struct EntityQuery {
pub entity_type: String,
pub filters: Vec<QueryFilter>,
pub order_by: Option<(String, SortOrder)>,
pub limit: Option<usize>,
pub offset: Option<usize>,
}Expand description
Query filter for entities.
Build queries using the builder methods:
use chainindex_core::entity::{EntityQuery, QueryFilter, SortOrder};
let query = EntityQuery::new("erc20_transfer")
.filter(QueryFilter::Eq("from".into(), serde_json::json!("0xAlice")))
.order_by("block_number", SortOrder::Desc)
.limit(10);Fields§
§entity_type: StringThe entity type to query.
filters: Vec<QueryFilter>Filters to apply.
order_by: Option<(String, SortOrder)>Sort order.
limit: Option<usize>Maximum number of results.
offset: Option<usize>Number of results to skip.
Implementations§
Source§impl EntityQuery
impl EntityQuery
Trait Implementations§
Source§impl Clone for EntityQuery
impl Clone for EntityQuery
Source§fn clone(&self) -> EntityQuery
fn clone(&self) -> EntityQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntityQuery
impl Debug for EntityQuery
Source§impl Default for EntityQuery
impl Default for EntityQuery
Source§fn default() -> EntityQuery
fn default() -> EntityQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EntityQuery
impl RefUnwindSafe for EntityQuery
impl Send for EntityQuery
impl Sync for EntityQuery
impl Unpin for EntityQuery
impl UnsafeUnpin for EntityQuery
impl UnwindSafe for EntityQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more