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

feat: add exact search mode #3842

Merged

Conversation

quake
Copy link
Member

@quake quake commented Feb 16, 2023

What problem does this PR solve?

backport nervosnetwork/ckb-indexer#64

Problem Summary: Developer may need to match the exact script for the query in some cases, currently the rpc only has prefix matching, the developer can only get the cells and then filter them on the client side.

What is changed and how it works?

this PR adds the exact match mode.

Check List

Tests

  • Unit test

Release note

Title Only: Include only the PR title in the release note.

@quake quake requested a review from a team as a code owner February 16, 2023 01:36
@quake quake requested review from zhangsoledad and doitian and removed request for a team February 16, 2023 01:36
@zhangsoledad zhangsoledad added this pull request to the merge queue Feb 16, 2023
Merged via the queue into nervosnetwork:develop with commit 4d4ad61 Feb 16, 2023
pub script: Script,
/// Script Type
pub script_type: IndexerScriptType,
/// Script search mode, optional default is `prefix`, means search script with prefix
pub script_search_mode: Option<IndexerScriptSearchMode>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are only two states here, null == prefix, and I think #[serde(default)] is a better approach

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.

4 participants