pub struct EvalContext<'a> {
pub columns: &'a [ColumnSchema],
pub table_alias: Option<&'a str>,
pub params: &'a [Value],
pub default_text_search_config: Option<&'a str>,
}Expand description
Resolution context for evaluating a single row. table_alias is the alias
(or table name) callers should accept as the qualifier on a column ref —
e.g. FROM users AS u makes u.name valid and rejects other.name.
Fields§
§columns: &'a [ColumnSchema]§table_alias: Option<&'a str>§params: &'a [Value]v6.1.1 — bound parameters for $N placeholders inside the
expression tree. Empty for simple queries; populated by the
prepared-statement Execute path with Bind values converted
to Value. Index N (1-based per PG) hits params[N-1].
default_text_search_config: Option<&'a str>v7.12.1 — session text-search config (from SET default_text_search_config = '<name>'). Resolved when the
engine builds an EvalContext and consumed by the FTS
function dispatcher when to_tsvector(text) /
plainto_tsquery(text) etc are called without an explicit
config arg. None falls through to simple.
Implementations§
Source§impl<'a> EvalContext<'a>
impl<'a> EvalContext<'a>
pub const fn new( columns: &'a [ColumnSchema], table_alias: Option<&'a str>, ) -> Self
Sourcepub const fn with_params(self, params: &'a [Value]) -> Self
pub const fn with_params(self, params: &'a [Value]) -> Self
v6.1.1 — attach a parameter buffer for $N placeholder
resolution. The slice must outlive the context; callers
construct it from the prepared statement’s Bind values.
Sourcepub const fn with_default_text_search_config(self, cfg: Option<&'a str>) -> Self
pub const fn with_default_text_search_config(self, cfg: Option<&'a str>) -> Self
v7.12.1 — attach the session’s
default_text_search_config. Used by the FTS function
dispatcher when no explicit config arg is given.
Trait Implementations§
Source§impl<'a> Clone for EvalContext<'a>
impl<'a> Clone for EvalContext<'a>
Source§fn clone(&self) -> EvalContext<'a>
fn clone(&self) -> EvalContext<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more