Indexing Status
Read the indexing status snapshot for an ENSDb Writer instance from the shared ensnode.metadata table. See Connect for setup.
It is the name of an ENSNode Schema, which is a database schema within an ENSDb instance, used to store metadata about ENSDb Writer instances that have ever connected to the ENSDb instance. There can be only one ENSNode Schema per
ENSDb instance, and its name is always
ensnode.
SQL
SELECT value -> 'indexingStatus' as indexing_status_snapshotFROM "ensnode".metadataWHERE ens_indexer_schema_name = 'ensindexer_0'AND key = 'indexing_metadata_context'; Output
| # | indexing_status_snapshot |
|---|---|
| 1 | |
Output matches a point in time snapshot of ENSDb result from our Alpha Hosted ENSNode instance. Live output depends on the configuration of your ENSNode instance and also changes that may have happened in ENS since this point in time snapshot example response was captured.
See how to connect to ENSDb and get access to the
ensDb query builder and ensIndexerSchema
schema definition in the Connect example if you haven't already.
TypeScript
import { IndexingMetadataContextStatusCodes } from "@ensnode/ensdb-sdk";
const indexingMetadataContext = await ensDbReader.getIndexingMetadataContext();
if (indexingMetadataContext.statusCode === IndexingMetadataContextStatusCodes.Initialized) { const { indexingStatus } = indexingMetadataContext; console.log({ indexingStatus });} Output
| # | indexingStatus |
|---|---|
| 1 | |
Output matches a point in time snapshot of ENSDb result from our Alpha Hosted ENSNode instance. Live output depends on the configuration of your ENSNode instance and also changes that may have happened in ENS since this point in time snapshot example response was captured.