• Alex Kalderimis's avatar
    Add composite ID query support · 0f73c047
    Alex Kalderimis authored
    This allows us to search for sets of items by multiple values in a
    single query, e.g. a query semantically equivalent to:
    
    ```sql
    select from things
      where (a,b,c) in ((?,?,?), ...)
    ```
    
    or the expanded form:
    
    ```
    select from things
      where ((a = ? and b = ? and c = ?)
             or
             (a = ? and b = ? and c = ?)
             ...
             )
    ```
    
    This is provided by a concern `WhereComposite` which allows us to search
    in this way.
    
    We support structs as well as hashes as input.
    0f73c047
issue.rb 11.6 KB