Module: ROM::SQL::SequelAPI
- Defined in:
- lib/rom/sql/relation/sequel_api.rb
Overview
Query API for SQL::Relation
Instance Method Summary collapse
-
#having(*args, &block) ⇒ Relation
Restrict a relation to match grouping criteria.
-
#inner_join(*args, &block) ⇒ Relation
Join with another relation using INNER JOIN.
-
#left_join(*args, &block) ⇒ Relation
Join other relation using LEFT OUTER JOIN.
-
#order(*args, &block) ⇒ Relation
Set order for the relation.
-
#select(*args, &block) ⇒ Relation
Select specific columns for select clause.
-
#select_append(*args, &block) ⇒ Relation
Append specific columns to select clause.
-
#where(*args, &block) ⇒ Relation
Restrict a relation to match criteria.
Instance Method Details
#having(*args, &block) ⇒ Relation
Restrict a relation to match grouping criteria
70 71 72 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 70 def having(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#inner_join(*args, &block) ⇒ Relation
Join with another relation using INNER JOIN
99 100 101 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 99 def inner_join(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#left_join(*args, &block) ⇒ Relation
Join other relation using LEFT OUTER JOIN
114 115 116 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 114 def left_join(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#order(*args, &block) ⇒ Relation
Set order for the relation
84 85 86 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 84 def order(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#select(*args, &block) ⇒ Relation
Select specific columns for select clause
16 17 18 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 16 def select(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#select_append(*args, &block) ⇒ Relation
Append specific columns to select clause
31 32 33 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 31 def select_append(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |
#where(*args, &block) ⇒ Relation
Restrict a relation to match criteria
If block is passed it’ll be executed in the context of a condition builder object.
52 53 54 |
# File 'lib/rom/sql/relation/sequel_api.rb', line 52 def where(*args, &block) new(dataset.__send__(__method__, *args, &block)) end |