quality
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-11-23 15:00:16 -08:00
parent e7191f5d57
commit 1b9a9a0b72
1 changed files with 3 additions and 3 deletions

View File

@ -96,8 +96,8 @@ const getMessageBySignatureFromConversationSQLStmt = `select ID from channel_%d_
// getMessageByContentHashFromConversationSQLStmt is a template for selecting conversation messages by content hash
const getMessageByContentHashFromConversationSQLStmt = `select ID from channel_%d_%d_chat where ContentHash=(?) order by ID desc limit 1;`
// getLocalIndexOfMessageIdSQLStmt is a template for fetching the offset of a message from the bottom of the database.
const getLocalIndexOfMessageIdSQLStmt = `select count (*) from channel_%d_%d_chat where ID >= (?) order by ID desc;`
// getLocalIndexOfMessageIDSQLStmt is a template for fetching the offset of a message from the bottom of the database.
const getLocalIndexOfMessageIDSQLStmt = `select count (*) from channel_%d_%d_chat where ID >= (?) order by ID desc;`
// getMessageCountFromConversationSQLStmt is a template for fetching the count of a messages in a conversation channel
const getMessageCountFromConversationSQLStmt = `select count(*) from channel_%d_%d_chat;`
@ -546,7 +546,7 @@ func (cps *CwtchProfileStorage) GetRowNumberByMessageID(conversation int, channe
_, exists := cps.channelRowNumberStmts[channelID]
if !exists {
conversationStmt, err := cps.db.Prepare(fmt.Sprintf(getLocalIndexOfMessageIdSQLStmt, conversation, channel))
conversationStmt, err := cps.db.Prepare(fmt.Sprintf(getLocalIndexOfMessageIDSQLStmt, conversation, channel))
if err != nil {
log.Errorf("error executing transaction: %v", err)
return -1, err