pub struct IntermediateQuery {Show 16 fields
pub name: String,
pub return_type: String,
pub returns_list: bool,
pub nullable: bool,
pub arguments: Vec<IntermediateArgument>,
pub description: Option<String>,
pub sql_source: Option<String>,
pub auto_params: Option<IntermediateAutoParams>,
pub deprecated: Option<IntermediateDeprecation>,
pub jsonb_column: Option<String>,
pub relay: bool,
pub inject: IndexMap<String, String>,
pub cache_ttl_seconds: Option<u64>,
pub additional_views: Vec<String>,
pub requires_role: Option<String>,
pub relay_cursor_type: Option<String>,
}Expand description
Query definition in intermediate format
Fields§
§name: StringQuery name (e.g., “users”)
return_type: StringReturn type name (e.g., “User”)
returns_list: boolReturns a list?
nullable: boolResult is nullable?
arguments: Vec<IntermediateArgument>Query arguments
description: Option<String>Query description (from docstring)
sql_source: Option<String>SQL source (table/view name)
auto_params: Option<IntermediateAutoParams>Auto-generated parameters config
deprecated: Option<IntermediateDeprecation>Deprecation info (from @deprecated directive)
jsonb_column: Option<String>JSONB column name for extracting data (e.g., “data”) Used for tv_* (denormalized JSONB tables) pattern
relay: boolWhether this is a Relay connection query.
When true, the compiler wraps results in { edges: [{ node, cursor }], pageInfo }
and generates first/after/last/before arguments instead of limit/offset.
Requires returns_list = true and sql_source to be set.
inject: IndexMap<String, String>Server-injected parameters: SQL column name → source expression (e.g. "jwt:org_id").
Not exposed as GraphQL arguments.
cache_ttl_seconds: Option<u64>Per-query result cache TTL in seconds. Overrides the global cache TTL for this query.
additional_views: Vec<String>Additional database views this query reads beyond the primary sql_source.
Used for correct cache invalidation when a query JOINs or reads multiple views. Each entry is validated as a safe SQL identifier at schema compile time.
requires_role: Option<String>Role required to execute this query and see it in introspection.
relay_cursor_type: Option<String>Relay cursor column type: "uuid" for UUID PKs, "int64" (or absent) for bigint PKs.
Only meaningful when relay = true.
Trait Implementations§
Source§impl Clone for IntermediateQuery
impl Clone for IntermediateQuery
Source§fn clone(&self) -> IntermediateQuery
fn clone(&self) -> IntermediateQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntermediateQuery
impl Debug for IntermediateQuery
Source§impl Default for IntermediateQuery
impl Default for IntermediateQuery
Source§fn default() -> IntermediateQuery
fn default() -> IntermediateQuery
Source§impl<'de> Deserialize<'de> for IntermediateQuery
impl<'de> Deserialize<'de> for IntermediateQuery
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>,
Source§impl PartialEq for IntermediateQuery
impl PartialEq for IntermediateQuery
Source§impl Serialize for IntermediateQuery
impl Serialize for IntermediateQuery
impl Eq for IntermediateQuery
impl StructuralPartialEq for IntermediateQuery
Auto Trait Implementations§
impl Freeze for IntermediateQuery
impl RefUnwindSafe for IntermediateQuery
impl Send for IntermediateQuery
impl Sync for IntermediateQuery
impl Unpin for IntermediateQuery
impl UnsafeUnpin for IntermediateQuery
impl UnwindSafe for IntermediateQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().