pub struct SelectPermission {
pub columns: ColumnSet,
pub filter: Value,
pub limit: Option<u64>,
pub allow_aggregations: bool,
pub computed_fields: Vec<String>,
}Expand description
Which rows a role may read, and which of their columns.
Fields§
§columns: ColumnSetThe columns this role can see. Every other column of the table is not merely unreadable but absent from the type, which is what makes a permission a statement about the schema rather than about a request.
filter: ValueWhich rows. A boolean expression in the same shape a where argument
takes, with one addition: a string like X-Hasura-User-Id stands for
the caller’s session variable of that name.
Left uninterpreted here. Reading it is the query builder’s job, and a document that carries a predicate this server cannot compile should fail where the compilation is, not where the parsing is.
limit: Option<u64>The most rows a single request may read. A ceiling, not a default: a request asking for more gets this, and one asking for fewer gets what it asked for.
allow_aggregations: boolWhether this role may ask for aggregates. Hasura keeps it separate from reading rows because counting rows you cannot see is a way of seeing them.
computed_fields: Vec<String>Which computed fields this role may ask for. Empty is none, not all: a computed field runs a function over a row, so it can answer questions the column permissions were written to prevent.
Trait Implementations§
Source§impl Clone for SelectPermission
impl Clone for SelectPermission
Source§fn clone(&self) -> SelectPermission
fn clone(&self) -> SelectPermission
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SelectPermission
impl Debug for SelectPermission
Source§impl Default for SelectPermission
impl Default for SelectPermission
Source§fn default() -> SelectPermission
fn default() -> SelectPermission
Source§impl<'de> Deserialize<'de> for SelectPermission
impl<'de> Deserialize<'de> for SelectPermission
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 SelectPermission
impl PartialEq for SelectPermission
Source§impl Serialize for SelectPermission
impl Serialize for SelectPermission
impl StructuralPartialEq for SelectPermission
Auto Trait Implementations§
impl Freeze for SelectPermission
impl RefUnwindSafe for SelectPermission
impl Send for SelectPermission
impl Sync for SelectPermission
impl Unpin for SelectPermission
impl UnsafeUnpin for SelectPermission
impl UnwindSafe for SelectPermission
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more