Module: Spider::Model::Storage::Db::Dialects::NoTotalRows
- Included in:
- MSSQL
- Defined in:
- lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
Instance Method Summary collapse
Instance Method Details
#total_rows ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/spiderfw/model/storage/db/dialects/no_total_rows.rb', line 5 def total_rows return nil unless @last_executed q = @last_query.clone unless (q[:offset] || q[:limit]) return @last_result ? @last_result.length : nil end q.delete(:offset); q.delete(:limit); q[:order]= [] q[:query_type] = :count return query(q) end |