diff options
author | Dessalines <tyhou13@gmx.com> | 2020-01-30 21:15:58 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-01-30 21:15:58 -0500 |
commit | 5188bddd4ddb1d4f4bc4add24db210789054c2a5 (patch) | |
tree | f68f8cebb4189acb591bbd129fa052b1d09619d6 /server/src | |
parent | 65adb0d15dcb10382dadca2694ee17b206c384fd (diff) | |
parent | 8cbdba1da39c15d2a3d13919398fc4d4c8ef2c6c (diff) |
Merge branch 'dev' into websocket_scopes
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/db/user_mention_view.rs | 37 | ||||
-rw-r--r-- | server/src/version.rs | 2 |
2 files changed, 33 insertions, 6 deletions
diff --git a/server/src/db/user_mention_view.rs b/server/src/db/user_mention_view.rs index 7a45d222..1cf43984 100644 --- a/server/src/db/user_mention_view.rs +++ b/server/src/db/user_mention_view.rs @@ -1,4 +1,3 @@ -use super::user_mention_view::user_mention_view::BoxedQuery; use super::*; use diesel::pg::Pg; @@ -31,6 +30,34 @@ table! { } } +table! { + user_mention_mview (id) { + id -> Int4, + user_mention_id -> Int4, + creator_id -> Int4, + post_id -> Int4, + parent_id -> Nullable<Int4>, + content -> Text, + removed -> Bool, + read -> Bool, + published -> Timestamp, + updated -> Nullable<Timestamp>, + deleted -> Bool, + community_id -> Int4, + banned -> Bool, + banned_from_community -> Bool, + creator_name -> Varchar, + creator_avatar -> Nullable<Text>, + score -> BigInt, + upvotes -> BigInt, + downvotes -> BigInt, + user_id -> Nullable<Int4>, + my_vote -> Nullable<Int4>, + saved -> Nullable<Bool>, + recipient_id -> Int4, + } +} + #[derive( Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize, QueryableByName, Clone, )] @@ -63,7 +90,7 @@ pub struct UserMentionView { pub struct UserMentionQueryBuilder<'a> { conn: &'a PgConnection, - query: BoxedQuery<'a, Pg>, + query: super::user_mention_view::user_mention_mview::BoxedQuery<'a, Pg>, for_user_id: i32, sort: &'a SortType, unread_only: bool, @@ -73,9 +100,9 @@ pub struct UserMentionQueryBuilder<'a> { impl<'a> UserMentionQueryBuilder<'a> { pub fn create(conn: &'a PgConnection, for_user_id: i32) -> Self { - use super::user_mention_view::user_mention_view::dsl::*; + use super::user_mention_view::user_mention_mview::dsl::*; - let query = user_mention_view.into_boxed(); + let query = user_mention_mview.into_boxed(); UserMentionQueryBuilder { conn, @@ -109,7 +136,7 @@ impl<'a> UserMentionQueryBuilder<'a> { } pub fn list(self) -> Result<Vec<UserMentionView>, Error> { - use super::user_mention_view::user_mention_view::dsl::*; + use super::user_mention_view::user_mention_mview::dsl::*; let mut query = self.query; diff --git a/server/src/version.rs b/server/src/version.rs index f2428229..c6b30c76 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.6.5"; +pub const VERSION: &str = "v0.6.7"; |