summaryrefslogtreecommitdiff
path: root/dichroism/src/product_repo.rs
blob: 93176b2ab2c5e1fef6e37182e8087fa689d0fedb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
use crate::entities;
use crate::models;
use diesel::prelude::*;
use diesel::result::Error;

type DBConn = SqliteConnection;

pub fn read_products(conn: &DBConn) -> Result<Vec<models::Product>, Error> {
    use crate::schema::products::dsl::*;
    let results = products.load::<entities::Product>(conn)?;
    todo!()
}