#[repr(C)]pub struct SparqlQueryContext {
pub patterns: [Pattern; 128],
pub pattern_count: usize,
pub expressions: [Expression; 128],
pub expression_count: usize,
pub paths: [Path; 128],
pub path_count: usize,
pub subqueries: [SparqlQuery; 16],
pub subquery_count: usize,
pub variable_hashes: [u64; 16],
pub variable_count: usize,
pub function_args: [ExpressionId; 64],
pub function_arg_count: usize,
}Expand description
Flat query context arena - pre-allocated, no heap allocation
Fields§
§patterns: [Pattern; 128]Flat array of all patterns in the query
pattern_count: usizeNumber of patterns currently allocated
expressions: [Expression; 128]Flat array of all expressions in the query
expression_count: usizeNumber of expressions currently allocated
paths: [Path; 128]Flat array of all property paths in the query
path_count: usizeNumber of paths currently allocated
subqueries: [SparqlQuery; 16]Flat array of subqueries (for nested queries)
subquery_count: usizeNumber of subqueries currently allocated
variable_hashes: [u64; 16]Variable name to ID mapping (simplified - stores as hash for now)
variable_count: usizeNumber of variables
function_args: [ExpressionId; 64]Argument storage for function calls (flat array)
function_arg_count: usizeNumber of function args
Implementations§
Source§impl SparqlQueryContext
impl SparqlQueryContext
pub fn new() -> Self
Sourcepub fn alloc_pattern(&mut self, pattern: Pattern) -> Result<PatternId, String>
pub fn alloc_pattern(&mut self, pattern: Pattern) -> Result<PatternId, String>
Allocate a new pattern, returns its ID
Sourcepub fn alloc_expression(
&mut self,
expr: Expression,
) -> Result<ExpressionId, String>
pub fn alloc_expression( &mut self, expr: Expression, ) -> Result<ExpressionId, String>
Allocate a new expression, returns its ID
Sourcepub fn alloc_path(&mut self, path: Path) -> Result<PathId, String>
pub fn alloc_path(&mut self, path: Path) -> Result<PathId, String>
Allocate a new property path, returns its ID
Sourcepub fn alloc_subquery(&mut self, query: SparqlQuery) -> Result<u16, String>
pub fn alloc_subquery(&mut self, query: SparqlQuery) -> Result<u16, String>
Allocate a new subquery, returns its ID
Sourcepub fn register_variable(&mut self, name: &str) -> Result<VariableId, String>
pub fn register_variable(&mut self, name: &str) -> Result<VariableId, String>
Register a variable name, returns its ID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SparqlQueryContext
impl RefUnwindSafe for SparqlQueryContext
impl Send for SparqlQueryContext
impl Sync for SparqlQueryContext
impl Unpin for SparqlQueryContext
impl UnsafeUnpin for SparqlQueryContext
impl UnwindSafe for SparqlQueryContext
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.