pub struct TextProjectionExpr { /* private fields */ }Expand description
TextProjectionExpr
Shared narrow text-projection expression over one source field. This remains a terminal/projection helper, not a generic expression system. Literal slots preserve the exact shipped SQL text-function argument family.
Implementations§
Source§impl TextProjectionExpr
impl TextProjectionExpr
Sourcepub fn new(field: impl Into<String>, transform: TextProjectionTransform) -> Self
pub fn new(field: impl Into<String>, transform: TextProjectionTransform) -> Self
Build one no-literal text projection over a source field.
Sourcepub fn with_literal(
field: impl Into<String>,
transform: TextProjectionTransform,
literal: impl FieldValue,
) -> Self
pub fn with_literal( field: impl Into<String>, transform: TextProjectionTransform, literal: impl FieldValue, ) -> Self
Build one text projection carrying one literal argument.
Sourcepub fn with_two_literals(
field: impl Into<String>,
transform: TextProjectionTransform,
literal: impl FieldValue,
literal2: impl FieldValue,
) -> Self
pub fn with_two_literals( field: impl Into<String>, transform: TextProjectionTransform, literal: impl FieldValue, literal2: impl FieldValue, ) -> Self
Build one text projection carrying two literal arguments.
Sourcepub const fn transform(&self) -> TextProjectionTransform
pub const fn transform(&self) -> TextProjectionTransform
Return the transform taxonomy for this projection expression.
Sourcepub fn with_optional_literal(self, literal: Option<Value>) -> Self
pub fn with_optional_literal(self, literal: Option<Value>) -> Self
Override the first optional literal argument.
Sourcepub fn with_optional_second_literal(self, literal: Option<Value>) -> Self
pub fn with_optional_second_literal(self, literal: Option<Value>) -> Self
Override the second optional literal argument.
Sourcepub fn with_optional_third_literal(self, literal: Option<Value>) -> Self
pub fn with_optional_third_literal(self, literal: Option<Value>) -> Self
Override the third optional literal argument.
Sourcepub fn sql_label(&self) -> String
pub fn sql_label(&self) -> String
Render the stable SQL-style output label for this projection.
Sourcepub fn apply_value(&self, value: Value) -> Result<Value, QueryError>
pub fn apply_value(&self, value: Value) -> Result<Value, QueryError>
Apply this projection to one already-loaded scalar value.
Trait Implementations§
Source§impl Clone for TextProjectionExpr
impl Clone for TextProjectionExpr
Source§fn clone(&self) -> TextProjectionExpr
fn clone(&self) -> TextProjectionExpr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextProjectionExpr
impl Debug for TextProjectionExpr
Source§impl PartialEq for TextProjectionExpr
impl PartialEq for TextProjectionExpr
impl Eq for TextProjectionExpr
impl StructuralPartialEq for TextProjectionExpr
Auto Trait Implementations§
impl Freeze for TextProjectionExpr
impl RefUnwindSafe for TextProjectionExpr
impl Send for TextProjectionExpr
impl Sync for TextProjectionExpr
impl Unpin for TextProjectionExpr
impl UnsafeUnpin for TextProjectionExpr
impl UnwindSafe for TextProjectionExpr
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