querier 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -0
  3. data/lib/querier.rb +5 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ec1f9125483e0166d0996f231ff42f06a9ac5e7cc2da9b2e0d31ea9c62947f4
4
- data.tar.gz: 8866efc382250a6d3e3a3a6e76cf164f31786c8c2dc42a838afe89339e8025fc
3
+ metadata.gz: 87c48d900c8bc55a2f243a7b6f5f0a6a09934111a97b2a1473a8085fe3812419
4
+ data.tar.gz: 22b6a63a4ab9026812b9b64e1e82acbd4da724598d3064598c17713cd4fca1bd
5
5
  SHA512:
6
- metadata.gz: 2e84803fd02bc35e4f94f7ffadaeadf89fdf6235bb0f4c4cb6c6c3b6f857dc391bc1bef6b316cd1f37e1a854c6021cc83d82670130d0a6c9fa43ea75865b8ba6
7
- data.tar.gz: a1b0d4fa64e0d1d14c01fdf297b5868bd5e50eb4bf104f6cd63c54711f10ec7279f59c49ec2f2df7fe9a4fcf12c193b711fac0e86028db1faf29a5865f715ccd
6
+ metadata.gz: f7bae86825831e8cc9356cb77aea20b212646e4018d036a24f3ca09b4a35ad35aefab4f6ae40d52ca332815ef04996f6814a0e87da4e6485e0794cbf53d3c8fd
7
+ data.tar.gz: feb4ed977acae65a211e801abf6a19dd6adcd8206ccb41098580af74f98f0b1c70ea16bbc40b3647a4a6b9193a6ed872726250196bda9ad43e1c393b32cf0cd4
data/README.md CHANGED
File without changes
data/lib/querier.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'active_record'
2
+
1
3
  class Querier
2
4
  PARAM_NAME_INDEX = 0
3
5
  PARAM_VALUE_INDEX = 1
@@ -11,10 +13,10 @@ class Querier
11
13
 
12
14
  attr_reader :query_execution_count, :query_template, :query_params
13
15
 
14
- def initialize(template_query_params)
16
+ def initialize(template_query_params = {})
15
17
  @active_record_class = self.class.active_record_class || self.class.superclass.active_record_class
16
18
  @query_execution_count = 0
17
- @query_params = template_query_params.dup
19
+ @query_params = template_query_params
18
20
  end
19
21
 
20
22
  def execute
@@ -72,7 +74,7 @@ class Querier
72
74
  end
73
75
 
74
76
  def fill_query_params(query_template:, query_params:)
75
- query = query_template.dup
77
+ query = query_template
76
78
 
77
79
  query_params.each_pair do |query_param|
78
80
  query_param_name = query_param[PARAM_NAME_INDEX].to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: querier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
- rubygems_version: 3.2.26
40
+ rubygems_version: 3.2.27
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: Active Record Querier