Skip to content

Commit

Permalink
need to add object_status=0 to use partial indexes (#20176)
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Nov 5, 2024
1 parent 7839b95 commit 7780641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/sui-graphql-rpc/src/types/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ fn balance_query(
/// Applies the filtering criteria for balances to the input `RawQuery` and returns a new
/// `RawQuery`.
fn filter(mut query: RawQuery, owner: SuiAddress, coin_type: Option<TypeTag>) -> RawQuery {
query = filter!(query, "coin_type IS NOT NULL");
query = filter!(query, "coin_type IS NOT NULL AND object_status = 0");

query = filter!(
query,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-rpc/src/types/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ fn apply_filter(mut query: RawQuery, coin_type: &TypeTag, owner: Option<SuiAddre

query = filter!(
query,
"coin_type IS NOT NULL AND coin_type = {}",
"coin_type IS NOT NULL AND coin_type = {} AND object_status = 0",
coin_type.to_canonical_display(/* with_prefix */ true)
);

Expand Down

0 comments on commit 7780641

Please sign in to comment.