pub struct TableMeta {
pub entity_identity: Option<BTreeMap<String, String>>,
/* private fields */
}Expand description
High-level table metadata stored in the log.
This describes the table kind, a logical schema (optional in v0.1), and basic bookkeeping fields.
Fields§
§entity_identity: Option<BTreeMap<String, String>>v0.1: If TimeIndexSpec.entity_columns is non-empty, we pin a single entity identity per table (map keyed by column name).
Implementations§
Source§impl TableMeta
impl TableMeta
Sourcepub fn logical_schema(&self) -> Option<&LogicalSchema>
pub fn logical_schema(&self) -> Option<&LogicalSchema>
Returns the optional logical schema if it has been set.
Sourcepub fn created_at(&self) -> DateTime<Utc>
pub fn created_at(&self) -> DateTime<Utc>
Returns the UTC timestamp when the table was created.
Sourcepub fn format_version(&self) -> u32
pub fn format_version(&self) -> u32
Returns the on-disk table metadata format version.
Sourcepub fn new_time_series(index: TimeIndexSpec) -> TableMeta
pub fn new_time_series(index: TimeIndexSpec) -> TableMeta
Convenience constructor for a time-series table.
- Fills
created_atwithUtc::now(). - Fills
format_versionwithTABLE_FORMAT_VERSION. - Leaves
logical_schemaasNone; it will be adopted from the first appended segment in v0.1.
Sourcepub fn new_time_series_with_schema(
index: TimeIndexSpec,
logical_schema: LogicalSchema,
) -> TableMeta
pub fn new_time_series_with_schema( index: TimeIndexSpec, logical_schema: LogicalSchema, ) -> TableMeta
Variant that lets you explicitly pass a logical schema up front.
Sourcepub fn arrow_schema_ref(&self) -> Result<Arc<Schema>, TableMetaSchemaError>
pub fn arrow_schema_ref(&self) -> Result<Arc<Schema>, TableMetaSchemaError>
Convert the table’s logical schema to a shared Arrow SchemaRef.
Returns TableMetaSchemaError::MissingCanonicalSchema if the schema has
not yet been established for the table.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TableMeta
impl<'de> Deserialize<'de> for TableMeta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TableMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TableMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TableMeta
impl Serialize for TableMeta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for TableMeta
impl StructuralPartialEq for TableMeta
Auto Trait Implementations§
impl Freeze for TableMeta
impl RefUnwindSafe for TableMeta
impl Send for TableMeta
impl Sync for TableMeta
impl Unpin for TableMeta
impl UnsafeUnpin for TableMeta
impl UnwindSafe for TableMeta
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,
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<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§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