Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Oct 26, 2023
1 parent 183a15f commit 1be43e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/sui-graphql-rpc/src/context_data/db_data_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,11 @@ impl QueryBuilder {
after_tx_seq_num: Option<i64>,
before_tx_seq_num: Option<i64>,
) -> Result<transactions::BoxedQuery<'a, Pg>, Error> {
let mut query = transactions::dsl::transactions.into_boxed();

if let Some(cursor_val) = cursor {
if descending_order {
let filter_value =
before_tx_seq_num.map_or(cursor_val, |b| std::cmp::min(b, cursor_val));
query = query.filter(transactions::dsl::tx_sequence_number.lt(filter_value));
} else {
Expand Down

0 comments on commit 1be43e1

Please sign in to comment.