Enhance store for querying multiple entities

未關閉
#2,872 0 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
graphql, rust, sql
領域
api, backend

研究方向

從 issue 中顯示的 host store 介面開始,將其針對單一 entity 的取得、設定和移除操作與 GraphQL 範例 Entity.findAll 進行比較。釐清是否有意支援多 entity 查詢或公開 SQL;在達成共識的查詢介面並定義行為後即可完成。

由索引模型根據 Issue 內容生成。

描述

area/store enhancement

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Currently the host store interface only supports interacting with one entity at a time:

/**
 * Host store interface.
 */
export declare namespace store {
  function get(entity: string, id: string): Entity | null
  function set(entity: string, id: string, data: Entity): void
  function remove(entity: string, id: string): void
}

What is the expected behavior?

The store should expose functions similar to the GraphQL interface like:

let entities = Entity.findAll(where: { blockHash: "0xdeadbeef" });

Or even expose the SQL interface?

主要語言
Rust
星號
3.2k
分支
1.1k
平均合併
4 天 1 小時
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

graphprotocol/graph-node 的其他 Issue

查看 graphprotocol/graph-node 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。