pub struct SqlProjectionHint {
pub database: String,
pub projection_template: String,
pub estimated_reduction_percent: u32,
}Expand description
SQL projection hint for database-specific field projection optimization.
When a type has a large JSONB payload, the compiler can generate SQL that projects only the requested fields, reducing network payload and JSON deserialization overhead.
Fields§
§database: StringDatabase type (e.g., “postgresql”, “mysql”, “sqlite”).
projection_template: StringThe projection SQL template.
Example for PostgreSQL:
jsonb_build_object('id', data->>'id', 'email', data->>'email')
estimated_reduction_percent: u32Estimated reduction in payload size (percentage 0-100).
Trait Implementations§
Source§impl Clone for SqlProjectionHint
impl Clone for SqlProjectionHint
Source§fn clone(&self) -> SqlProjectionHint
fn clone(&self) -> SqlProjectionHint
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 SqlProjectionHint
impl Debug for SqlProjectionHint
Source§impl<'de> Deserialize<'de> for SqlProjectionHint
impl<'de> Deserialize<'de> for SqlProjectionHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SqlProjectionHint
impl PartialEq for SqlProjectionHint
Source§impl Serialize for SqlProjectionHint
impl Serialize for SqlProjectionHint
impl StructuralPartialEq for SqlProjectionHint
Auto Trait Implementations§
impl Freeze for SqlProjectionHint
impl RefUnwindSafe for SqlProjectionHint
impl Send for SqlProjectionHint
impl Sync for SqlProjectionHint
impl Unpin for SqlProjectionHint
impl UnsafeUnpin for SqlProjectionHint
impl UnwindSafe for SqlProjectionHint
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