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 the archive table names in docs #33

Merged
merged 1 commit into from
Nov 8, 2023
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
4 changes: 2 additions & 2 deletions pgmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (p *PGMQ) Pop(ctx context.Context, queue string) (*Message, error) {
// Archive moves a message from the queue table to the archive table by its
// id. View messages on the archive table with sql:
//
// select * from pgmq_<queue_name>_archive;
// SELECT * FROM pgmq.a_<queue_name>;
func (p *PGMQ) Archive(ctx context.Context, queue string, msgID int64) (bool, error) {
var archived bool
err := p.db.QueryRow(ctx, "SELECT pgmq.archive($1, $2::bigint)", queue, msgID).Scan(&archived)
Expand All @@ -251,7 +251,7 @@ func (p *PGMQ) Archive(ctx context.Context, queue string, msgID int64) (bool, er
// ArchiveBatch moves a batch of messages from the queue table to the archive
// table by their ids. View messages on the archive table with sql:
//
// SELECT * FROM pgmq.a_<queue_name>_archive;
// SELECT * FROM pgmq.a_<queue_name>;
func (p *PGMQ) ArchiveBatch(ctx context.Context, queue string, msgIDs []int64) ([]int64, error) {
rows, err := p.db.Query(ctx, "SELECT pgmq.archive($1, $2::bigint[])", queue, msgIDs)
if err != nil {
Expand Down