kbam 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kbam.rb +6 -3
- data/lib/kbam/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af73a5db8f0985e7be2bd8482f788d04147129fc
|
4
|
+
data.tar.gz: 3b13df4aac2290939b1ad4030735b09d36069af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f1e68a1ce465b5ece0063aa379cba4c7e0724f042c8dc61cf78aa6e3a6500d7e75290c490aba337e50765ea0eaa50032a50b2737344012a98bcd6c7580913ae
|
7
|
+
data.tar.gz: d6cf93a5a6adbbadca00077820989f935f40f272e5d7f7ecbe4c269b73a8b35a1f385a0906d6abf02c8f851d109e7f4108491beeb1cc30f75de7c746b87ab48b
|
data/lib/kbam.rb
CHANGED
@@ -9,6 +9,8 @@ require 'kbam/extension.rb'
|
|
9
9
|
class Kbam
|
10
10
|
attr_reader :is_nested
|
11
11
|
attr_writer :is_nested
|
12
|
+
attr_reader :no_count
|
13
|
+
attr_writer :no_count
|
12
14
|
|
13
15
|
@@client = nil
|
14
16
|
@@sugar = false
|
@@ -51,6 +53,7 @@ class Kbam
|
|
51
53
|
@last_query = nil
|
52
54
|
@result = nil
|
53
55
|
@is_nested = false
|
56
|
+
@no_count = false
|
54
57
|
@query_type = SELECT
|
55
58
|
#@count_query = nil
|
56
59
|
|
@@ -634,10 +637,10 @@ class Kbam
|
|
634
637
|
alias_method :length, :count
|
635
638
|
|
636
639
|
def total
|
637
|
-
if @result != nil
|
640
|
+
if @result != nil && ! @no_count
|
638
641
|
@@client.query("SELECT FOUND_ROWS() AS count").first["count"]
|
639
642
|
else
|
640
|
-
warning "Can't count total for empty result"
|
643
|
+
warning "Can't count total for empty result. Or no count error."
|
641
644
|
end
|
642
645
|
end
|
643
646
|
|
@@ -711,7 +714,7 @@ class Kbam
|
|
711
714
|
|
712
715
|
def compose_select
|
713
716
|
select_string = "\nSELECT\n "
|
714
|
-
unless is_nested
|
717
|
+
unless is_nested || @no_count
|
715
718
|
select_string += "SQL_CALC_FOUND_ROWS "
|
716
719
|
end
|
717
720
|
|
data/lib/kbam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kbam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leopold Burdyl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|