Class: Gitlab::SQL::Except
- Inherits:
-
SetOperator
- Object
- SetOperator
- Gitlab::SQL::Except
- Defined in:
- lib/gitlab/sql/except.rb
Overview
Class for building SQL EXCEPT statements.
ORDER BYs are dropped from the relations as the final sort order is not guaranteed any way.
Example usage:
except = Gitlab::SQL::Except.new([user.projects, user.personal_projects])
sql = except.to_sql
Project.where("id IN (#{sql})")
Class Method Summary collapse
Methods inherited from SetOperator
#initialize, #operator_keyword_fragment, #to_sql
Constructor Details
This class inherits a constructor from Gitlab::SQL::SetOperator
Class Method Details
.operator_keyword ⇒ Object
17 18 19 |
# File 'lib/gitlab/sql/except.rb', line 17 def self.operator_keyword 'EXCEPT' end |