Skip to content

feat: add a way to retrieve msgs backwards#505

Open
Bilb wants to merge 1 commit intooxen-io:devfrom
Bilb:feat/various-retrieve-additions
Open

feat: add a way to retrieve msgs backwards#505
Bilb wants to merge 1 commit intooxen-io:devfrom
Bilb:feat/various-retrieve-additions

Conversation

@Bilb
Copy link
Copy Markdown
Contributor

@Bilb Bilb commented Mar 13, 2025

No description provided.

@Bilb Bilb force-pushed the feat/various-retrieve-additions branch 6 times, most recently from 405ef13 to 6242dfd Compare March 16, 2025 21:32
@Bilb Bilb force-pushed the feat/various-retrieve-additions branch from 6242dfd to 5577991 Compare March 16, 2025 21:35
"WHERE owner = ? AND namespace = ? ORDER BY id LIMIT ?");
"SELECT hash, namespace, timestamp, expiry, data FROM messages "
"WHERE owner = ? AND namespace = ? {} ORDER BY id {} LIMIT ?"_format(
last_id ? "AND id > ?" : "", reverse_direction ? "DESC" : "ASC"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure of this, but is this working properly if both last_id and reverse_direction are true? I think when both are specified the AND id > ? should get flipped to AND id < ?.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants