querier 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/querier.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ce7e6b8f56aa2fb643082d298c3a25426d8b607abb644d73d7f007aec08ef4c1
|
4
|
+
data.tar.gz: 5d384132bf782ae5de45fda80280c067023ad0cab89774887fcea4ba621fe260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78819735bf56a43a639c2675323b87ec9a800ff5137ec547262f904ece1fd30cf94326221ca7cc552f39d9eda611f1918917bd6e32cb2f5b1c10b819bdeac37a
|
7
|
+
data.tar.gz: 4c8113e0588fde92b305171e85b625e9ec4db86ab16e1cf821ce288c87c6e1730bfdda79c24053529bb47d2e4b2b65972294c53161c1649e4a75f1db6e3414c6
|
data/lib/querier.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
class Querier
|
2
|
-
|
3
2
|
PARAM_NAME_INDEX = 0
|
4
3
|
PARAM_VALUE_INDEX = 1
|
5
4
|
|
@@ -24,6 +23,11 @@ class Querier
|
|
24
23
|
fill_query_params(query_template: @query_template, query_params: @query_params)
|
25
24
|
end
|
26
25
|
|
26
|
+
def to_file
|
27
|
+
file_name = "querier #{Time.now.strftime "[%d-%m-%Y]-[%Hh %Mm %Ss]"}.sql"
|
28
|
+
File.open("tmp/#{file_name}", 'w') {|f| f << self.to_sql}
|
29
|
+
end
|
30
|
+
|
27
31
|
private
|
28
32
|
|
29
33
|
def get_param_value raw_query_param
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: querier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gedean Dias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Active Record queries with variable number of params
|
14
14
|
email: gedean.dias@gmail.com
|
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
41
|
+
rubygems_version: 2.7.4
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: Active Record Querier
|