pub struct QueryEngine { /* private fields */ }Expand description
Query parser and executor
Implementations§
Source§impl QueryEngine
impl QueryEngine
Sourcepub fn parse(&self, sql: &str) -> Result<QueryPlan>
pub fn parse(&self, sql: &str) -> Result<QueryPlan>
Parse SQL query into query plan
§Errors
Returns error if:
- SQL syntax is invalid
- Query uses unsupported features (JOINs, subqueries, etc.)
- Multiple statements provided
§Example
use trueno_db::query::QueryEngine;
let engine = QueryEngine::new();
let plan = engine.parse("SELECT id, name FROM users WHERE age > 18")?;
assert_eq!(plan.table, "users");Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryEngine
impl RefUnwindSafe for QueryEngine
impl Send for QueryEngine
impl Sync for QueryEngine
impl Unpin for QueryEngine
impl UnsafeUnpin for QueryEngine
impl UnwindSafe for QueryEngine
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