Struct kubos_telemetry_db::Database [−][src]
Fields
connection: SqliteConnection
Methods
impl Database
[src]
[−]
impl Database
pub fn new(path: &str) -> Self
[src]
[−]
pub fn new(path: &str) -> Self
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]
[−]
pub fn setup(&self)
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<'a>(
&self,
timestamp: f64,
subsystem: &'a str,
parameter: &'a str,
value: &'a str
) -> QueryResult<usize>
pub fn insert_systime<'a>(
&self,
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>