wolf_core 1.0.110 → 1.0.111

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f0b3de2f23f0b48587cf68e1ffcc37a4258b7cf30cc1d71748a9247506bd026
4
- data.tar.gz: aeb2d86838e5a18913984cbf23fef8328a0c0c76d16dfa16bd438e4321341181
3
+ metadata.gz: 1e6a2a30cc5f46012d3c97f9042add53dbc535447b49a7735f35337b3bd14ec2
4
+ data.tar.gz: f7bc9c33ca6ddd4c30ebd89542eb776f95b65070949ba57cbb30a8054cbe938e
5
5
  SHA512:
6
- metadata.gz: cf848bb9fa8fd9ef21d20e37b684d7eef5b6f83e89dbb02f6081090da121005b454e35d0a5faf215d8d6efe861797671c8077c21a6f5f088bd86e228ab97ce67
7
- data.tar.gz: b01c81220e321e039524c7597b38e3e72fdc65ec9afcf9633b7228f416cbe99f940b1467c0aa43285536f8c89152876717f243152cda8869f3e8a3726d8d0c64
6
+ metadata.gz: e7a427c44f7dec4b85016f86fad8938c9f57a97a2767f8c23aa24eb338dcf0c1bd4a3704bcf806f9cd44a8b15c27c4b86c52b0ac683d48338fe2738fb3946acd
7
+ data.tar.gz: f19767117ae8390a558c60d30ffd19351bd5e8b041a47038e6d4955f0d308ff31017cd5daebc8f2f51bdd9dfec1d76eea1718bd28dcad5c7434677bd155de969
@@ -26,13 +26,14 @@ module WolfCore
26
26
  instance.get_item(get_params).item
27
27
  end
28
28
 
29
- def query(table_name:, key_condition_expression:, expression_attribute_values:, index_name: nil)
29
+ def query(table_name:, key_condition_expression:, expression_attribute_values:, index_name: nil, limit: nil)
30
30
  query_params = {
31
31
  table_name: table_name,
32
32
  key_condition_expression: key_condition_expression,
33
33
  expression_attribute_values: expression_attribute_values
34
34
  }
35
35
  query_params[:index_name] = index_name if index_name
36
+ query_params[:limit] = limit if limit
36
37
  instance.query(query_params).items
37
38
  end
38
39
  end
@@ -2,12 +2,24 @@ module WolfCore
2
2
  module NoSqlDbOperations
3
3
  module_function
4
4
 
5
- def query_no_sql_items(table_name:, key_condition_expression:, expression_attribute_values:, index_name: nil)
5
+ def get_no_sql_item_by_index(table_name:, key_condition_expression:, expression_attribute_values:, index_name: nil)
6
+ items = query_no_sql_items(
7
+ table_name: table_name,
8
+ key_condition_expression: key_condition_expression,
9
+ expression_attribute_values: expression_attribute_values,
10
+ index_name: index_name,
11
+ limit: 1
12
+ )
13
+ items.first
14
+ end
15
+
16
+ def query_no_sql_items(table_name:, key_condition_expression:, expression_attribute_values:, index_name: nil, limit: nil)
6
17
  NoSqlDbDataSource.query(
7
18
  table_name: table_name,
8
19
  key_condition_expression: key_condition_expression,
9
20
  expression_attribute_values: expression_attribute_values,
10
- index_name: index_name
21
+ index_name: index_name,
22
+ limit: limit
11
23
  )
12
24
  end
13
25
 
@@ -25,15 +37,5 @@ module WolfCore
25
37
  index_name: index_name
26
38
  )
27
39
  end
28
-
29
- def get_no_sql_item_by_index(table_name:, key_condition_expression:, expression_attribute_values:, index_name: )
30
- items = query_no_sql_items(
31
- table_name: table_name,
32
- key_condition_expression: key_condition_expression,
33
- expression_attribute_values: expression_attribute_values,
34
- index_name: index_name
35
- )
36
- items.first
37
- end
38
40
  end
39
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.110"
4
+ VERSION = "1.0.111"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.110
4
+ version: 1.0.111
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo