pub struct ResourceTypeSchema {
pub resource_type: String,
pub table_name: String,
pub parameters: HashMap<String, ParamColumns>,
pub columns: Vec<ColumnDef>,
}Expand description
The generated schema for one FHIR resource type’s search table.
Fields§
§resource_type: StringResource type name, e.g. "Patient".
table_name: StringTable name, e.g. "search_patient".
parameters: HashMap<String, ParamColumns>Search parameter code → the columns backing it.
columns: Vec<ColumnDef>All value columns, in a stable (sorted) order.
Implementations§
Source§impl ResourceTypeSchema
impl ResourceTypeSchema
Sourcepub fn columns_for(&self, code: &str) -> Option<&ParamColumns>
pub fn columns_for(&self, code: &str) -> Option<&ParamColumns>
Looks up the columns backing a search parameter code.
Sourcepub fn column_index(&self, name: &str) -> Option<usize>
pub fn column_index(&self, name: &str) -> Option<usize>
The position of a column within columns.
Batched inserts bind one fixed column list per statement, so a
resource’s values are collected into a slot per position rather than
into a per-resource list of names. columns is sorted by name, which
is what makes the lookup a binary search.
Trait Implementations§
Source§impl Clone for ResourceTypeSchema
impl Clone for ResourceTypeSchema
Source§fn clone(&self) -> ResourceTypeSchema
fn clone(&self) -> ResourceTypeSchema
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 ResourceTypeSchema
impl Debug for ResourceTypeSchema
Source§impl Default for ResourceTypeSchema
impl Default for ResourceTypeSchema
Source§fn default() -> ResourceTypeSchema
fn default() -> ResourceTypeSchema
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourceTypeSchema
impl RefUnwindSafe for ResourceTypeSchema
impl Send for ResourceTypeSchema
impl Sync for ResourceTypeSchema
impl Unpin for ResourceTypeSchema
impl UnsafeUnpin for ResourceTypeSchema
impl UnwindSafe for ResourceTypeSchema
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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