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
Merged
Show file tree
Hide file tree
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
15 changes: 14 additions & 1 deletion rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ The crate `ckb-rpc`'s minimum supported rustc version is 1.67.1.
* [Type `IndexerCellsCapacity`](#type-indexercellscapacity)
* [Type `IndexerOrder`](#type-indexerorder)
* [Type `IndexerRange`](#type-indexerrange)
* [Type `IndexerScriptSearchMode`](#type-indexerscriptsearchmode)
* [Type `IndexerScriptType`](#type-indexerscripttype)
* [Type `IndexerSearchKey`](#type-indexersearchkey)
* [Type `IndexerSearchKeyFilter`](#type-indexersearchkeyfilter)
Expand Down Expand Up @@ -5961,6 +5962,16 @@ A array represent (half-open) range bounded inclusively below and exclusively ab



### Type `IndexerScriptSearchMode`

IndexerScriptSearchMode represent script search mode, default is prefix search

`IndexerScriptSearchMode` is equivalent to `"prefix" | "exact"`.

* Mode `prefix` search script with prefix
* Mode `exact` search script with exact match


### Type `IndexerScriptType`

ScriptType `Lock` | `Type`
Expand All @@ -5979,10 +5990,12 @@ SearchKey represent indexer support params

`IndexerSearchKey` is a JSON object with the following fields.

* `script`: [`Script`](#type-script) - Script, supports prefix search
* `script`: [`Script`](#type-script) - Script

* `script_type`: [`IndexerScriptType`](#type-indexerscripttype) - Script Type

* `script_search_mode`: [`IndexerScriptSearchMode`](#type-indexerscriptsearchmode) `|` `null` - Script search mode, optional default is `prefix`, means search script with prefix

* `filter`: [`IndexerSearchKeyFilter`](#type-indexersearchkeyfilter) `|` `null` - filter cells by following conditions, all conditions are optional

* `with_data`: `boolean` `|` `null` - bool, optional default is `true`, if with_data is set to false, the field of returning cell.output_data is null in the result
Expand Down
Loading