blob: 93176b2ab2c5e1fef6e37182e8087fa689d0fedb (
plain) (
tree)
|
|
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!()
}
|