dynamodb-api 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e26469278271c2105d8178a710e44188444669bc5b0e5836d8841563af38f5e5
4
- data.tar.gz: b93ba92f5c00e7c7062cea8b8b9c014a80fcd22a7f8ad687d47b0d04737676c1
3
+ metadata.gz: c55c5bee72292279c0bd8971f8c0482b284f254a2c2148c1ab749be54acea2a2
4
+ data.tar.gz: eb1456697a712eecdaa28d044053f7f978311922e7a42344e0e98bedfbc8a3e4
5
5
  SHA512:
6
- metadata.gz: 15b00f5440b621d9f515c207ce2beef65ab094c94e2504dfdf32392a23476cba273734908da29a2202e55d9abdb16059c3a7152dc117c13e2550b629408bb5eb
7
- data.tar.gz: 5a9fef74495cf50628c0c4e4ed69016246272fec57b243c99d610bb109db4ac4b650a9d77b95631c55159fbaba8abd864387f65776f4442cd2df2cc8cedebd4c
6
+ metadata.gz: 3909d6062659de0d273184ecfd2e152f516bec7ba6c1bb20a2fc248bb226ccb17ff101d1ceefbea1a0db104bc04a12bbd1aa41467482fc575439e3e4c27f8f4d
7
+ data.tar.gz: 8ef953db6c060e6999951de14d4b4bd9ef293c2f4655db4ec48392d8c57e3255cbccd58a0f3d81a19cece40c3fbe269891f57233c46ac95e005a9e751fcacb1a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynamodb-api (0.3.2)
4
+ dynamodb-api (0.3.3)
5
5
  activesupport (>= 4)
6
6
  aws-sdk (~> 2)
7
7
 
@@ -1,13 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'dynamodb/api/relation'
4
+
3
5
  module Dynamodb
4
6
  module Api
5
7
  class Query # :nodoc:
8
+ include Relation
6
9
  attr_reader :client
7
- attr_reader :relation
8
10
 
9
11
  def initialize
10
- @relation = Relation.new
11
12
  @client = Adapter.new.client
12
13
  end
13
14
 
@@ -19,18 +20,18 @@ module Dynamodb
19
20
 
20
21
  def build_query
21
22
  {
22
- table_name: @relation.from_clause.name,
23
- index_name: @relation.index_clause.name,
24
- select: @relation.select_clause.name,
25
- scan_index_forward: @relation.order_clause.direct,
26
- key_conditions: @relation.where_clause.key_conditions
23
+ table_name: from_clause.name,
24
+ index_name: index_clause.name,
25
+ select: select_clause.name,
26
+ scan_index_forward: order_clause.direct,
27
+ key_conditions: where_clause.key_conditions
27
28
  }.merge(build_filter_clause)
28
29
  end
29
30
 
30
31
  def build_filter_clause
31
32
  {
32
- filter_expression: @relation.filter_clause.expression,
33
- expression_attribute_values: @relation.filter_clause.values
33
+ filter_expression: filter_clause.expression,
34
+ expression_attribute_values: filter_clause.values
34
35
  }
35
36
  end
36
37
  end
@@ -4,7 +4,7 @@ require 'dynamodb/api/relation/query_methods'
4
4
 
5
5
  module Dynamodb
6
6
  module Api
7
- class Relation # :nodoc:
7
+ module Relation # :nodoc:
8
8
  include QueryMethods
9
9
  attr_accessor :index_clause
10
10
  attr_accessor :from_clause
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class FilterClause # :nodoc:
7
7
  attr_reader :expression
8
8
  attr_reader :values
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class FromClause # :nodoc:
7
7
  attr_reader :name
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class GlobalSecondaryIndex
7
7
  attr_reader :name
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class OrderClause # :nodoc:
7
7
  attr_reader :direct
8
8
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dynamodb/api/relation/from_clause'
4
-
5
3
  module Dynamodb
6
4
  module Api
7
5
  module QueryMethods # :nodoc:
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class SelectClause # :nodoc:
7
7
  attr_reader :name
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Dynamodb
4
4
  module Api
5
- class Relation
5
+ module Relation
6
6
  class WhereClause # :nodoc:
7
7
  attr_reader :key_conditions
8
8
 
@@ -1,5 +1,5 @@
1
1
  module Dynamodb
2
2
  module Api
3
- VERSION = '0.3.2'.freeze
3
+ VERSION = '0.3.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamodb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - WalkerSumida
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-23 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk