Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get messages between query over message_id typo #5607

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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