Method: FrOData::Query#count
- Defined in:
- lib/frodata/query.rb
#count ⇒ Integer
Executes the query to get a count of entities.
146 147 148 149 150 151 152 |
# File 'lib/frodata/query.rb', line 146 def count url_chunk = ["#{entity_set.name}/$count", assemble_criteria].compact.join('?') response = self.execute(url_chunk) # Some servers (*cough* Microsoft *cough*) seem to # return extraneous characters in the response. response.body.scan(/\d+/).first.to_i end |