Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Make the AggsUTXOs table migration script insert rows that have 0 quantity value

オープン
#357 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
sql, typescript
領域
databases

調査の方向性

示されている AggsUTXOs INSERT を含むマイグレーションファイルを出発点とし、WHERE 句と集約が数量 0 のデータをどのように処理するかを調べます。関連する数量 0 の AggsUTXOs 行が挿入されるようにマイグレーションを更新し、報告されたケースに一致するデータで検証します。

索引モデルが issue の本文から書いたものです。

説明

Here is the AggsUTXOs table's migration script.

INSERT INTO "AggsUTXOs"("assetType", "address", "totalAssetQuantity", "utxoQuantity", "createdAt", "updatedAt")
                SELECT "assetType", "address", SUM("quantity") as "totalAssetQuantity", COUNT(*) as "utxoQuantity", NOW(), NOW()
                FROM "UTXOs" WHERE "usedBlockNumber" IS NULL GROUP BY "assetType", "address"

To ignore used UTXOs, the migration script filters the used UTXOs using the where clause. If a user sent all assets they have to another user, the quantity column value of the AggsUTXOs table's row will be zero. The migration script above does not insert the row that has the zero value in the quantity column.

This behavior is subtle. And can be ignored.

主要言語
TypeScript
スター
21
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CodeChain-io/codechain-indexer のほかの issue

CodeChain-io/codechain-indexer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。