Sha256: 75f9b3ab257bdc83ff0689418e7632c6921117e22c34dece3b729ab94d2f50cf

Contents?: true

Size: 520 Bytes

Versions: 40

Compression:

Stored size: 520 Bytes

Contents

module Spider; module Model; module Storage; module Db; module Dialects
    
    module NoTotalRows
        
        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
        
    end
    
end; end; end; end; end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
spiderfw-0.6.20 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.19 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.18 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.17 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.16 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.15 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.14 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.13 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.12 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.11 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.10 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.9 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.8 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.7 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.6 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.5 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.4 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.3 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.2 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb
spiderfw-0.6.1 lib/spiderfw/model/storage/db/dialects/no_total_rows.rb