query_helper 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/query_helper/sql_manipulator.rb +1 -1
- data/lib/query_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0971fc10b2b990185b05e538e41dcb898033baa6e9f3f59c22a5c024fead8bb
|
4
|
+
data.tar.gz: 55e383eadc934c0ff9f1cb44236033b5c93b6d7b302210fc10eaff1c8e4d614f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f5c67987554c03af1a0cf2d6a72bc3e225463c33fc5e8b53fbc5689fe05888bcb364f702d771b47f23c1cf356b8c0a01d0c1c39e56afd9931e55c50cdc0d6a7
|
7
|
+
data.tar.gz: 8a65504c1ba6e8f7f5088e6dcdbeb132b438781c63efec29eb79f527d0fb18919af1f4570f10be3e0453bea014892c3dd8372388c2f6e8b8a9b536197c3f683a
|
data/Gemfile.lock
CHANGED
@@ -55,7 +55,7 @@ class QueryHelper
|
|
55
55
|
|
56
56
|
def insert_order_by_and_limit_clause
|
57
57
|
@sql.slice!(@parser.limit_clause) if @parser.limit_included? # remove existing limit clause
|
58
|
-
@sql.slice!(@parser.order_by_clause) if @parser.order_by_included? # remove existing order by clause
|
58
|
+
@sql.slice!(@parser.order_by_clause) if @parser.order_by_included? && @order_by_clauses.length > 0 # remove existing order by clause
|
59
59
|
@sql += " order by #{@order_by_clauses.join(", ")} " if @order_by_clauses.length > 0
|
60
60
|
@sql += " limit :limit offset :offset " if @include_limit_clause
|
61
61
|
end
|
data/lib/query_helper/version.rb
CHANGED