BigW Consortium Gitlab

  1. 18 Nov, 2015 2 commits
    • Fix UNION syntax for MySQL · 9eefae69
      Yorick Peterse authored
      Apparently MySQL doesn't support this syntax:
      
          (...) UNION (...)
      
      instead it only supports:
      
          ...
          UNION
          ...
    • Added Gitlab::SQL::Union class · d769596a
      Yorick Peterse authored
      This class can be used to join multiple AcitveRecord::Relation objects
      together using a SQL UNION statement. ActiveRecord < 5.0 sadly doesn't
      support UNION and existing Gems out there don't handle prepared
      statements (e.g. they never incremented the variable bindings).