pub trait AnyQuery:
Debug
+ Any
+ Send
+ Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn format(&self, col: &str) -> String;
fn to_expr(&self, col: String) -> Expr;
fn dyn_eq(&self, other: &dyn AnyQuery) -> bool;
}Expand description
Different scalar indices may support different kinds of queries
For example, a btree index can support a wide range of queries (e.g. x > 7) while an index based on FTS only supports queries like “x LIKE ‘foo’”
This trait is used when we need an object that can represent any kind of query
Note: if you are implementing this trait for a query type then you probably also need to implement the crate::scalar::expression::ScalarQueryParser trait to create instances of your query at parse time.
Required Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".