pub struct Features {
pub database: String,
pub version: Option<String>,
pub extension_schema: Option<String>,
/* private fields */
}Expand description
What one database offers: the TimescaleDB version, its functions and the columns of its information views.
Fields§
§database: String§version: Option<String>§extension_schema: Option<String>Implementations§
Source§impl Features
impl Features
Sourcepub fn new(
database: &str,
version: Option<&str>,
extension_schema: Option<&str>,
columns: &[(&str, &str)],
functions: &[(&str, &str)],
) -> Features
pub fn new( database: &str, version: Option<&str>, extension_schema: Option<&str>, columns: &[(&str, &str)], functions: &[(&str, &str)], ) -> Features
Features from probed names; version and extension_schema are None when TimescaleDB is absent.
pub fn installed(&self) -> bool
Sourcepub fn has(&self, view: &str, column: &str) -> bool
pub fn has(&self, view: &str, column: &str) -> bool
True when the timescaledb_information view has the column.
Sourcepub fn has_all(&self, view: &str, columns: &[&str]) -> bool
pub fn has_all(&self, view: &str, columns: &[&str]) -> bool
True when the timescaledb_information view has every listed column.
Sourcepub fn require(&self, view: &str, columns: &[&str]) -> Result<(), ToolError>
pub fn require(&self, view: &str, columns: &[&str]) -> Result<(), ToolError>
Fails with an internal error naming the first view column the query needs and this version lacks.
Sourcepub fn function(&self, schema: &str, name: &str) -> Option<String>
pub fn function(&self, schema: &str, name: &str) -> Option<String>
The function as a qualified call prefix when the schema holds it.
Sourcepub fn extension_function(&self, name: &str) -> Option<String>
pub fn extension_function(&self, name: &str) -> Option<String>
The function as a qualified call prefix when the extension’s schema holds it.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Features
impl Freeze for Features
impl Move for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnsafeUnpin for Features
impl UnwindSafe for Features
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<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> ⓘ
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