pub struct SavedQuery {
pub name: String,
pub sql: String,
pub description: Option<String>,
pub created_at: DateTime<Utc>,
}Expand description
A named SQL query stored in the workspace.
Stored queries are always read-only at the SQL level — the save path
enforces crate::engine::is_read_only_sql so accidentally persisting
a destructive statement is impossible. The created_at field is
populated server-side at save time.
Fields§
§name: StringHuman-friendly identifier; used as the path component in the corresponding resource URIs.
sql: StringThe SQL string that will be run when the result resource is read.
description: Option<String>Optional free-form description of what the query answers.
created_at: DateTime<Utc>Server-side save time in UTC.
Implementations§
Trait Implementations§
Source§impl Clone for SavedQuery
impl Clone for SavedQuery
Source§fn clone(&self) -> SavedQuery
fn clone(&self) -> SavedQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SavedQuery
impl Debug for SavedQuery
Source§impl<'de> Deserialize<'de> for SavedQuery
impl<'de> Deserialize<'de> for SavedQuery
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
impl Eq for SavedQuery
Source§impl PartialEq for SavedQuery
impl PartialEq for SavedQuery
Source§impl Serialize for SavedQuery
impl Serialize for SavedQuery
impl StructuralPartialEq for SavedQuery
Auto Trait Implementations§
impl Freeze for SavedQuery
impl RefUnwindSafe for SavedQuery
impl Send for SavedQuery
impl Sync for SavedQuery
impl Unpin for SavedQuery
impl UnsafeUnpin for SavedQuery
impl UnwindSafe for SavedQuery
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request