pub struct PropertyDescriptor {Show 13 fields
pub name: String,
pub pg_type: String,
pub nullable: bool,
pub default_sql: Option<String>,
pub default_pyql: Option<String>,
pub description: Option<String>,
pub check_constraints: Vec<String>,
pub is_exclusive: bool,
pub is_pk: bool,
pub is_readonly: bool,
pub rewrites: Vec<RewriteEntry>,
pub tuple_members: Option<Vec<TupleMemberDescriptor>>,
pub column_type: Option<String>,
}Fields§
§name: String§pg_type: StringPostgreSQL column type, e.g. text, int8, uuid. Always a plain
base type — every read/write/cast/comparison site relies on that, so
a registered custom scalar’s own DOMAIN name lives in column_type
instead, never here.
nullable: bool§default_sql: Option<String>SQL expression for the column DEFAULT clause.
default_pyql: Option<String>PyQL expression to be compiled to SQL at DDL-emit time.
Takes precedence over default_sql when both could be set (they won’t be).
description: Option<String>§check_constraints: Vec<String>Pre-compiled SQL CHECK expressions, e.g. "price >= 0".
is_exclusive: boolTrue when a UNIQUE constraint applies to this column alone.
is_pk: boolTrue when this column is the table primary key.
is_readonly: boolTrue when the transpiler should reject PyQL updates targeting this pointer.
rewrites: Vec<RewriteEntry>§tuple_members: Option<Vec<TupleMemberDescriptor>>Some only for a structural pylon.Tuple[...]-typed property — its
element shape, for decode-time ShapeNode building. A nominal
@pylon.named_tuple-typed property instead carries its shape via the
__nt__:module::Name pg_type marker + NamedTupleDescriptor.members.
column_type: Option<String>Some("\"schema\".\"Name\"") only when this property’s scalar type is
a registered custom scalar (see pylon.scalar(..., name=...) /
the @pylon.scalar decorator form) — the schema-qualified name of
the PostgreSQL DOMAIN that scalar compiles to (see
export::emit_scalars). Consulted only for the column’s own DDL
type (CREATE TABLE / ADD COLUMN); every other use of this
property (casts, comparisons, wire decode) keeps using pg_type’s
plain base type, so a domain-typed column still round-trips exactly
like its base type — Postgres enforces the domain’s CHECK on writes
regardless of which type name the read/write path itself uses.
Trait Implementations§
Source§impl Clone for PropertyDescriptor
impl Clone for PropertyDescriptor
Source§impl Debug for PropertyDescriptor
impl Debug for PropertyDescriptor
Source§impl<'de> Deserialize<'de> for PropertyDescriptor
impl<'de> Deserialize<'de> for PropertyDescriptor
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>,
Auto Trait Implementations§
impl Freeze for PropertyDescriptor
impl RefUnwindSafe for PropertyDescriptor
impl Send for PropertyDescriptor
impl Sync for PropertyDescriptor
impl Unpin for PropertyDescriptor
impl UnsafeUnpin for PropertyDescriptor
impl UnwindSafe for PropertyDescriptor
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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>,
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.