aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_db
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-23 14:03:24 +0000
committerFuwn <[email protected]>2021-05-23 14:03:24 +0000
commitc44f893422a36fb53b90f43b7ae1eaff5d9a0506 (patch)
tree91866c6b8ba0596e0f22f3d02b1411afdfbce0ff /crates/whirl_db
parentfix(config): doc comment format (diff)
downloadwhirl-c44f893422a36fb53b90f43b7ae1eaff5d9a0506.tar.xz
whirl-c44f893422a36fb53b90f43b7ae1eaff5d9a0506.zip
docs(global): more documentation
Diffstat (limited to 'crates/whirl_db')
-rw-r--r--crates/whirl_db/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/whirl_db/src/lib.rs b/crates/whirl_db/src/lib.rs
index 35f05ae..4f8050e 100644
--- a/crates/whirl_db/src/lib.rs
+++ b/crates/whirl_db/src/lib.rs
@@ -14,13 +14,14 @@
#[macro_use]
extern crate diesel;
-pub mod models;
+mod models;
mod schema;
use diesel::prelude::*;
// use crate::db::models::*;
+/// Establish a connection to the SQLite database.
pub fn establish_connection() -> SqliteConnection {
let database_url = std::env::var("DATABASE_URL").unwrap_or_else(|_| "whirl.sqlite3".to_string());
SqliteConnection::establish(&database_url)
@@ -31,7 +32,7 @@ pub fn establish_connection() -> SqliteConnection {
#[cfg(test)]
#[test]
#[ignore]
-pub fn show_serials() {
+fn show_serials() {
use crate::{models::SerialNumber, schema::serial_numbers::dsl::*};
dotenv::dotenv().ok();