-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tx list function name fuzzy search
- Loading branch information
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
migrations/1727186561690_idx-contract-call-function-name-trgm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** @param { import("node-pg-migrate").MigrationBuilder } pgm */ | ||
exports.up = pgm => { | ||
pgm.sql('CREATE EXTENSION IF NOT EXISTS pg_trgm;'); | ||
|
||
pgm.sql(` | ||
CREATE INDEX idx_contract_call_function_name_trgm | ||
ON txs | ||
USING gin (contract_call_function_name gin_trgm_ops); | ||
`); | ||
}; | ||
|
||
/** @param { import("node-pg-migrate").MigrationBuilder } pgm */ | ||
exports.down = pgm => { | ||
pgm.sql(` | ||
DROP INDEX IF EXISTS idx_contract_call_function_name_trgm; | ||
`); | ||
|
||
pgm.sql('DROP EXTENSION IF EXISTS pg_trgm;'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters