dohmysql 0.2.36 → 0.2.38

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
  SHA1:
3
- metadata.gz: 5f7fbbbfcda4cae5bf7e253da4a1e2ad7d421746
4
- data.tar.gz: 901ad6ff0f5a1677a20cb9557c792e1f7ae36aad
3
+ metadata.gz: be78a9bf98c4fb22c81cccafa69d54b3b33d966d
4
+ data.tar.gz: 43a4e28f6f54cb089948aaf3550bed05aa0451b0
5
5
  SHA512:
6
- metadata.gz: 398f0edf8c22df32fcdb917834eb14fbba80b318f474d71e34c16f5a09a131ab667c30f3e68bd522af04c5ba7cd2488a86b84ea803b7ec7da285493f51dc769f
7
- data.tar.gz: 205e30e59c67ed7e3db63c1a0013b470b958c760e2e36859e0e0e6610f38b69a707d618d6312440a7e24f9550764fe711faccaba958c525a625eb1e65f63637e
6
+ metadata.gz: 1709aa613e82da715774d6d440d438151f108ee4594146f3e4bdce1219a8d650ccc4a62ad7c7b217a54771114fc8475bdf62e49f45912c2ef134ede0f70362ff
7
+ data.tar.gz: a071ebf9580d082cbb78edb23ea82ed707bb96c34bbc19655678427e7fa475230dab574f8b4ad283dfeb6f3c829c8a76f9e51d7067aff429303db84172f8ec9a
@@ -3,7 +3,7 @@ require 'dohutil/core_ext/force_deep_copy'
3
3
  module DohDb
4
4
 
5
5
  class AbstractRow
6
- attr_accessor :keys, :values
6
+ attr_accessor :keys, :values, :table
7
7
  force_deep_copy :keys, :values
8
8
 
9
9
  def at(index)
@@ -6,7 +6,11 @@ class ReadOnlyRow < AbstractRow
6
6
  # can accept 2 arguments: keys array, values array
7
7
  # or 1 argument: a hash
8
8
  def initialize(*args)
9
- keys, values = parse_initialize_args(*args)
9
+ parsed_args = parse_initialize_args(*args)
10
+ if parsed_args.size == 3
11
+ @table = parsed_args.pop
12
+ end
13
+ keys, values = parsed_args
10
14
  @keys = keys.freeze
11
15
  @values = values.freeze
12
16
  freeze
@@ -4,7 +4,6 @@ require 'sqlstmt/update'
4
4
  module DohDb
5
5
 
6
6
  class AbstractSmartRow < AbstractRow
7
- attr_accessor :table
8
7
  attr_reader :changed_keys
9
8
 
10
9
  def initialize(keys, values)
@@ -8,6 +8,9 @@ class TypedRowBuilder
8
8
  if arg.is_a?(String)
9
9
  @row_klass = SmartRow
10
10
  @table = arg
11
+ elsif arg.is_a?(Hash)
12
+ @row_klass = ReadOnlyRow
13
+ @table = arg[:read]
11
14
  else
12
15
  @row_klass = arg
13
16
  @table = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohmysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.36
4
+ version: 0.2.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani Mason
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-08 00:00:00.000000000 Z
12
+ date: 2013-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dohroot