Skip to content

Commit

Permalink
fix: get messages between query over message_id typo (#5607)
Browse files Browse the repository at this point in the history
Co-authored-by: agautam478 <[email protected]>
  • Loading branch information
zedongh and agautam478 authored Feb 1, 2024
1 parent ebbc603 commit b3abd25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/persistence/sql/sqlplugin/postgres/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
templateEnqueueMessageQuery = `INSERT INTO queue (queue_type, message_id, message_payload) VALUES(:queue_type, :message_id, :message_payload)`
templateGetLastMessageIDQuery = `SELECT message_id FROM queue WHERE queue_type=$1 ORDER BY message_id DESC LIMIT 1 FOR UPDATE`
templateGetMessagesQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and message_id > $2 ORDER BY message_id ASC LIMIT $3`
templateGetMessagesBetweenQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and messageid > $2 and message_id <= $3 ORDER BY message_id ASC LIMIT $4`
templateGetMessagesBetweenQuery = `SELECT message_id, message_payload FROM queue WHERE queue_type = $1 and message_id > $2 and message_id <= $3 ORDER BY message_id ASC LIMIT $4`
templateDeleteMessageQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id = $2`
templateDeleteMessagesBeforeQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id < $2`
templateRangeDeleteMessagesQuery = `DELETE FROM queue WHERE queue_type = $1 and message_id > $2 and message_id <= $3`
Expand Down

0 comments on commit b3abd25

Please sign in to comment.