fix
This commit is contained in:
parent
aecd4ca291
commit
4bef3d8964
@ -169,7 +169,7 @@ func (self *PostgresDatabase) prepareStatements() {
|
|||||||
DeleteArticle_5: "DELETE FROM ArticleAttachments WHERE message_id = $1",
|
DeleteArticle_5: "DELETE FROM ArticleAttachments WHERE message_id = $1",
|
||||||
DeleteThread: "DELETE FROM ArticleThreads WHERE root_message_id = $1",
|
DeleteThread: "DELETE FROM ArticleThreads WHERE root_message_id = $1",
|
||||||
DeleteArticleV8: "DELETE FROM ArticlePosts WHERE message_id = $1",
|
DeleteArticleV8: "DELETE FROM ArticlePosts WHERE message_id = $1",
|
||||||
DeleteThreadV8: "DELETE FROM ArticlePosts WHERE root_message_id = $1 OR message_id = $1",
|
DeleteThreadV8: "DELETE FROM ArticlePosts WHERE ref_id = $1 OR message_id = $1",
|
||||||
GetThreadReplyPostModels_1: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ORDER BY time_posted DESC LIMIT $2 ) ORDER BY time_posted ASC",
|
GetThreadReplyPostModels_1: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ORDER BY time_posted DESC LIMIT $2 ) ORDER BY time_posted ASC",
|
||||||
GetThreadReplyPostModels_2: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ) ORDER BY time_posted ASC",
|
GetThreadReplyPostModels_2: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ) ORDER BY time_posted ASC",
|
||||||
GetThreadReplies_1: "SELECT message_id FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ORDER BY time_posted DESC LIMIT $2 ) ORDER BY time_posted ASC",
|
GetThreadReplies_1: "SELECT message_id FROM ArticlePosts WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 ORDER BY time_posted DESC LIMIT $2 ) ORDER BY time_posted ASC",
|
||||||
@ -181,7 +181,7 @@ func (self *PostgresDatabase) prepareStatements() {
|
|||||||
HasArticle: "SELECT 1 FROM Articles WHERE message_id = $1",
|
HasArticle: "SELECT 1 FROM Articles WHERE message_id = $1",
|
||||||
HasArticleLocal: "SELECT 1 FROM ArticlePosts WHERE message_id = $1",
|
HasArticleLocal: "SELECT 1 FROM ArticlePosts WHERE message_id = $1",
|
||||||
GetPostAttachments: "SELECT filepath FROM ArticleAttachments WHERE message_id = $1",
|
GetPostAttachments: "SELECT filepath FROM ArticleAttachments WHERE message_id = $1",
|
||||||
GetThreadAttachments: "SELECT filepath FROM ArticleAttachments WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE root_message_id = $1 OR message_id = $1)",
|
GetThreadAttachments: "SELECT filepath FROM ArticleAttachments WHERE message_id IN ( SELECT message_id FROM ArticlePosts WHERE ref_id = $1 OR message_id = $1)",
|
||||||
GetPostAttachmentModels: "SELECT filepath, filename FROM ArticleAttachments WHERE message_id = $1",
|
GetPostAttachmentModels: "SELECT filepath, filename FROM ArticleAttachments WHERE message_id = $1",
|
||||||
RegisterArticle_1: "INSERT INTO Articles (message_id, message_id_hash, message_newsgroup, time_obtained, message_ref_id) VALUES($1, $2, $3, $4, $5)",
|
RegisterArticle_1: "INSERT INTO Articles (message_id, message_id_hash, message_newsgroup, time_obtained, message_ref_id) VALUES($1, $2, $3, $4, $5)",
|
||||||
RegisterArticle_2: "UPDATE Newsgroups SET last_post = $1 WHERE name = $2",
|
RegisterArticle_2: "UPDATE Newsgroups SET last_post = $1 WHERE name = $2",
|
||||||
|
Reference in New Issue
Block a user