Skip to content

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

@plural

Description

@plural

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions