pub struct SpatialQuery { /* private fields */ }Expand description
Spatial query builder
Implementations§
Source§impl SpatialQuery
impl SpatialQuery
Sourcepub fn geometry_column(self, column: impl Into<String>) -> Self
pub fn geometry_column(self, column: impl Into<String>) -> Self
Sets the geometry column name
Sourcepub fn where_clause(self, condition: impl Into<String>) -> Self
pub fn where_clause(self, condition: impl Into<String>) -> Self
Adds a WHERE condition
Sourcepub fn where_bbox(self, bbox: &BoundingBox) -> Result<Self>
pub fn where_bbox(self, bbox: &BoundingBox) -> Result<Self>
Adds a bounding box filter
Sourcepub fn where_intersects(self, _geometry: &Geometry) -> Result<Self>
pub fn where_intersects(self, _geometry: &Geometry) -> Result<Self>
Filters features that intersect with a geometry
Sourcepub fn where_contains(self, _geometry: &Geometry) -> Result<Self>
pub fn where_contains(self, _geometry: &Geometry) -> Result<Self>
Filters features that contain a geometry
Sourcepub fn where_within(self, _geometry: &Geometry) -> Result<Self>
pub fn where_within(self, _geometry: &Geometry) -> Result<Self>
Filters features within a geometry
Sourcepub fn where_dwithin(self, _geometry: &Geometry, distance: f64) -> Result<Self>
pub fn where_dwithin(self, _geometry: &Geometry, distance: f64) -> Result<Self>
Filters features within a distance
Sourcepub fn order_by(self, column: impl Into<String>, ascending: bool) -> Self
pub fn order_by(self, column: impl Into<String>, ascending: bool) -> Self
Adds an ORDER BY clause
Sourcepub fn order_by_distance(self, _geometry: &Geometry) -> Result<Self>
pub fn order_by_distance(self, _geometry: &Geometry) -> Result<Self>
Orders by distance from a geometry
Sourcepub async fn execute(self, pool: &ConnectionPool) -> Result<Vec<Feature>>
pub async fn execute(self, pool: &ConnectionPool) -> Result<Vec<Feature>>
Executes the query and returns features
Sourcepub async fn count(self, pool: &ConnectionPool) -> Result<i64>
pub async fn count(self, pool: &ConnectionPool) -> Result<i64>
Executes the query and returns count
Auto Trait Implementations§
impl Freeze for SpatialQuery
impl RefUnwindSafe for SpatialQuery
impl Send for SpatialQuery
impl Sync for SpatialQuery
impl Unpin for SpatialQuery
impl UnsafeUnpin for SpatialQuery
impl UnwindSafe for SpatialQuery
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