pub struct Model {Show 13 fields
pub id: i64,
pub key: String,
pub value: String,
pub value_type: ConfigValueType,
pub requires_restart: bool,
pub is_sensitive: bool,
pub source: ConfigSource,
pub visibility: ConfigVisibility,
pub namespace: String,
pub category: String,
pub description: String,
pub updated_at: DateTimeUtc,
pub updated_by: Option<i64>,
}Expand description
Runtime system configuration SeaORM model.
Fields§
§id: i64Stable row id.
key: StringStable configuration key.
value: StringStorage value. List-like values are JSON strings.
value_type: ConfigValueTypeStorage value type.
requires_restart: boolWhether changes require process restart to take effect.
is_sensitive: boolWhether APIs and audit logs should redact this value.
source: ConfigSourceSystem-defined or custom user-defined source.
visibility: ConfigVisibilityConsumer visibility.
namespace: StringOptional product namespace. Existing Aster services use an empty namespace.
category: StringProduct category for UI grouping.
description: StringProduct description for admin UIs.
updated_at: DateTimeUtcLast update timestamp.
updated_by: Option<i64>Optional actor user id.
Implementations§
Trait Implementations§
Source§impl From<Model> for ActiveModel
impl From<Model> for ActiveModel
Source§impl FromQueryResult for Model
impl FromQueryResult for Model
Source§fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
Instantiate a Model from a [QueryResult] Read more
Source§fn from_query_result_nullable(
row: &QueryResult,
pre: &str,
) -> Result<Self, TryGetError>
fn from_query_result_nullable( row: &QueryResult, pre: &str, ) -> Result<Self, TryGetError>
§fn from_query_result_optional(
res: &QueryResult,
pre: &str,
) -> Result<Option<Self>, DbErr>
fn from_query_result_optional( res: &QueryResult, pre: &str, ) -> Result<Option<Self>, DbErr>
Transform the error from instantiating a Model from a [QueryResult]
and converting it to an Option
§fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
Source§impl IntoActiveModel<ActiveModel> for Model
impl IntoActiveModel<ActiveModel> for Model
Source§fn into_active_model(self) -> ActiveModel
fn into_active_model(self) -> ActiveModel
Method to call to perform the conversion
Source§impl ModelTrait for Model
impl ModelTrait for Model
Source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
Read the value of one column.
Source§fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
Type of the value stored by a column, used by reflection helpers
such as Arrow conversion.
Source§fn try_set(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
v: Value,
) -> Result<(), DbErr>
fn try_set( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, ) -> Result<(), DbErr>
Write a value to one column, returning an error if the value’s type
does not match the column.
§fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
Write a value to one column. Panics if the value’s type doesn’t match
the column; prefer
try_set when the value comes
from untrusted input.Build a [
Select] for models related to self via the
Self::Entity: Related<R> relation. Use it together with .one(db) /
.all(db) to fetch the related rows.§fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>where
L: Linked<FromEntity = Self::Entity>,
fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>where
L: Linked<FromEntity = Self::Entity>,
Build a [
Select] that follows a multi-hop link out of self. The
hops are described by a [Linked] implementation.§fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
Delete a model
§fn get_primary_key_value(&self) -> ValueTuple
fn get_primary_key_value(&self) -> ValueTuple
Get the primary key value of the Model
Source§impl RuntimeConfigRecord for Model
impl RuntimeConfigRecord for Model
Source§fn config_key(&self) -> &str
fn config_key(&self) -> &str
Returns the stable configuration key.
Source§fn config_value(&self) -> &str
fn config_value(&self) -> &str
Returns the storage string for this configuration row.
Source§fn config_requires_restart(&self) -> bool
fn config_requires_restart(&self) -> bool
Returns whether hot updates should be ignored after first load.
Source§impl TryFrom<ActiveModel> for Model
impl TryFrom<ActiveModel> for Model
Source§impl TryIntoModel<Model> for ActiveModel
impl TryIntoModel<Model> for ActiveModel
Source§fn try_into_model(self) -> Result<Model, DbErr>
fn try_into_model(self) -> Result<Model, DbErr>
Attempt the conversion, returning an error if a required column is
not set.
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> PartialModelTrait for Twhere
T: ModelTrait + FromQueryResult,
impl<T> PartialModelTrait for Twhere
T: ModelTrait + FromQueryResult,
§fn select_cols_nested<S>(
select: S,
prefix: Option<&str>,
alias: Option<&'static str>,
) -> Swhere
S: QuerySelect,
fn select_cols_nested<S>(
select: S,
prefix: Option<&str>,
alias: Option<&'static str>,
) -> Swhere
S: QuerySelect,
Used when nesting these structs into each other. Read more
§fn select_cols<S>(select: S) -> Swhere
S: QuerySelect,
fn select_cols<S>(select: S) -> Swhere
S: QuerySelect,
Add the partial model’s columns to a [
QuerySelect]’s projection. Read more§impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
§fn try_into_model(self) -> Result<M, DbErr>
fn try_into_model(self) -> Result<M, DbErr>
Attempt the conversion, returning an error if a required column is
not set.