use sqlx::postgres::PgQueryResult; use crate::rows::{PartialTableRow, TableRow}; pub mod user; pub struct PartialQueryResult { value: T, pg_query_result: Option } impl PartialQueryResult { pub fn new(value: T, pg_query_result: Option) -> Self { PartialQueryResult { value, pg_query_result } } pub fn value(&self) -> &T { &self.value } pub fn result(&self) -> &Option { &self.pg_query_result } } pub struct QueryResult { value: T, pg_query_result: Option } impl QueryResult { pub fn new(value: T, pg_query_result: Option) -> Self { QueryResult { value, pg_query_result } } pub fn value(&self) -> &T { &self.value } pub fn result(&self) -> &Option { &self.pg_query_result } }