[][src]Struct kubos_telemetry_db::Database

pub struct Database {
    pub connection: SqliteConnection,
}

Fields

connection: SqliteConnection

Methods

impl Database[src][]

pub fn new(path: &str) -> Self[src][]

Construct new database structure and database file if needed

Arguments

path - Path to database file

Panics

Attempts to connect to sqlite database and will panic! if connection fails.

pub fn setup(&self)[src][]

Check if database has correct table and creates table if needed

Panics

Will panic! if fails to locate and/or create telemetry table

pub fn insert<'a>(
    &self,
    timestamp: f64,
    subsystem: &'a str,
    parameter: &'a str,
    value: &'a str
) -> QueryResult<usize>
[src]

pub fn insert_systime<'a>(
    &self,
    subsystem: &'a str,
    parameter: &'a str,
    value: &'a str
) -> QueryResult<usize>
[src]

pub fn insert_bulk(&self, entries: Vec<Entry>) -> QueryResult<usize>[src]

Auto Trait Implementations

impl Send for Database

impl Unpin for Database

impl !Sync for Database

impl UnwindSafe for Database

impl !RefUnwindSafe for Database

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> IntoSql for T[+]