Matches on array fields use strict equality, not substring like the other fields.

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

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

評価

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

調査の方向性

Start by tracing how filter[search] builds SQL for array fields and compare it with the substring matching path for text fields. The issue includes the generated queries but names no source files or tests; identify the relevant query code and tests, then confirm array field searches return substring matches such as s:code while text field behavior remains intact.

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

説明

https://api.netrunnerdb.com/api/v3/public/printings?filter[search]=s:code returns 0 results because it generates this sql:

SELECT DISTINCT 
  "unified_printings".*
FROM 
  "unified_printings"
WHERE ( ($1 = ANY(unified_printings.lower_card_subtype_names)))

instead of doing a substring match like a text field does:
filter[search]=gamble generates

SELECT 
DISTINCT "unified_printings".* 
FROM 
"unified_printings" 
WHERE (lower(unified_printings.stripped_title) LIKE $1)

which is what we expect

主要言語
Ruby
スター
10
フォーク
9
平均マージ
2時間 59分
マージ済み PR(30日)
2

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

Null-Signal-Games/netrunnerdb-api-server のほかの issue

Null-Signal-Games/netrunnerdb-api-server の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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