-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gql][indexer] index chain identifier into its own table
- Loading branch information
Showing
9 changed files
with
80 additions
and
17 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
crates/sui-graphql-e2e-tests/tests/epoch/chain_identifier.exp
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,14 @@ | ||
processed 3 tasks | ||
|
||
init: | ||
C: object(0,0) | ||
|
||
task 1 'create-checkpoint'. lines 8-8: | ||
Checkpoint created: 1 | ||
|
||
task 2 'run-graphql'. lines 10-13: | ||
Response: { | ||
"data": { | ||
"chainIdentifier": "8f58ad28" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
crates/sui-graphql-e2e-tests/tests/epoch/chain_identifier.move
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,12 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
//# init --protocol-version 48 --simulator --accounts C | ||
|
||
|
||
//# create-checkpoint | ||
|
||
//# run-graphql | ||
{ | ||
chainIdentifier | ||
} |
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
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/pg/2024-07-13-003534_chain_identifier/down.sql
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,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS chain_identifier; |
6 changes: 6 additions & 0 deletions
6
crates/sui-indexer/migrations/pg/2024-07-13-003534_chain_identifier/up.sql
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,6 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE chain_identifier | ||
( | ||
checkpoint_digest BYTEA NOT NULL, | ||
PRIMARY KEY(checkpoint_digest) | ||
); |
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
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