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

Document relation#wrap

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
ruby, sql
領域
documentation

調査の方向性

Start by locating the existing documentation for Relation#wrap and Relation#combine; the issue does not name a file or test. Explain when each is appropriate, how their data loading differs, and that wrap uses inner joins so records without associated data are excluded. Done means readers can distinguish the two behaviors and understand the example.

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

説明

docsite help wanted

Docs need to further flesh out what Relation#wrap is used for and how it's used in comparison with Relation#combine

Notes
  • wrap should be used when you have an aggregate that always has associated data, in rom-sql it uses inner join to load it so basically you get all the data in one db query
  • compared to combine which queries each part individually; merging data happens in memory regardless
  • note that wrap uses inner joins, so users wrapping tanks would only return users that actually have tasks
Solnic mind dump

Wrap is a special type of a relation which returns data from multiple relations in a single "query", but that's just an implementation detail. What's important is that wraps represent a single "concept", even though the data comes from multiple sources. Basically when you use a wrap, it should mean that something always comes with additional data from other sources, ie a user with its address, a book with its pages etc.

when you use a combine, it means that ie you have a user, and some times you have a user with an address too one thing we will do in the near future, is that wrap will work with both embedded values based on prefixed attributes OR another table
so you may have users.address_street users.address_city etc. and set it address as an embedded value for wrapping and maybe later on it will be moved to a separate table, and it'll continue work in the same way as before

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

環境構築

はじめの一歩

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

rom-rb/rom-sql のほかの issue

rom-rb/rom-sql の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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