Class: EvilQuery::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/evil_query.rb

Direct Known Subclasses

CommentedPosts, LikedPosts, MultiStream, Participation, ShareablesFromPerson, VisibleShareableById

Instance Method Summary (collapse)

Instance Method Details

- (Object) fetch_ids!(relation, id_column)



3
4
5
6
# File 'lib/evil_query.rb', line 3

def fetch_ids!(relation, id_column)
  #the relation should be ordered and limited by here
  @class.connection.select_values(id_sql(relation, id_column))
end

- (Object) id_sql(relation, id_column)



8
9
10
# File 'lib/evil_query.rb', line 8

def id_sql(relation, id_column)
  relation.select(id_column).to_sql
end