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

Đang mở
#438 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby, sql
Lĩnh vực
api, database

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Ruby
Star
10
Fork
9
Merge trung bình
2 giờ 59 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Null-Signal-Games/netrunnerdb-api-server

Tất cả issue của Null-Signal-Games/netrunnerdb-api-server

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.