Browse Source

docs: adr-65 adjustments (#6401)

v0.34/x
Marko 4 years ago
committed by GitHub
parent
commit
10fc43f182
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      docs/architecture/adr-065-custom-event-indexing.md

+ 5
- 8
docs/architecture/adr-065-custom-event-indexing.md View File

@ -22,6 +22,7 @@
## Changelog
- April 1, 2021: Initial Draft (@alexanderbez)
- April 28, 2021: Specify search capabilities are only supported through the KV indexer (@marbar3778)
## Status
@ -135,6 +136,8 @@ This type of `EventSink` indexes block and transaction events into a [PostgreSQL
database. We define and automatically migrate the following schema when the
`IndexerService` starts.
The postgres eventsink will not support `tx_search` and `block_search`.
```sql
-- Table Definition ----------------------------------------------
@ -265,17 +268,11 @@ func (es *PSQLEventSink) IndexTxEvents(txr *abci.TxResult) error {
}
func (es *PSQLEventSink) SearchBlockEvents(ctx context.Context, q *query.Query) ([]int64, error) {
sqlStmt = sq.Select("height").Distinct().From("block_events").Where(q.String())
// execute sqlStmt db query and scan into integer rows...
return nil, errors.New("block search is not supported via the postgres event sink")
}
func (es *PSQLEventSink) SearchTxEvents(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) {
sqlStmt = sq.Select("tx_result_id").Distinct().From("tx_events").Where(q.String())
// execute sqlStmt db query and scan into integer rows...
// query tx_results records and scan into binary slice rows...
// decode each row into a TxResult...
return nil, errors.New("tx search is not supported via the postgres event sink")
}
```


Loading…
Cancel
Save