bmg 0.14.1 → 0.14.2

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
  SHA1:
3
- metadata.gz: 62b828608283d95c0a265acef73fbc87ae856fdc
4
- data.tar.gz: b23f841d651b88aefaa15c6df57108bbc9d81c8f
3
+ metadata.gz: 6c5a5a369833a57501c77ea1f3e71f96d82f574d
4
+ data.tar.gz: 57dcfc425645f23cbef74ab398c10a04de7991b6
5
5
  SHA512:
6
- metadata.gz: 92b722cc6ad7629d99505aa0c210a4bb00c8e736364eb9e41efe74fc2375894f2c088393b04560cea5b424b53d0178a1dbdc14dbe6bd8c006ab9703dcf81df02
7
- data.tar.gz: 568373b8a3ebd572d835f982accfdea9d3ed7d0ae336f101ac941c6593ae98645dc64fc4be24f905cf7829870420169b9328b792ce45fe8059a1ac06b94e13a8
6
+ metadata.gz: c2fb9d06219a133708f68de90242c9528077536c7f401373448cac5f20de7775f683cc5ebda23f4132f1449e2cb6409ce81ac6cd245648d96a193e5acb70e601
7
+ data.tar.gz: 181efad42653a1ab288336b46c9f21cfa1405821b3a84849a50bd7f7de3639de9195d4e91b310bf6eb5d8344761969968ef9a39db8c3180a6e28753c50f94674
data/lib/bmg/sequel.rb CHANGED
@@ -60,6 +60,7 @@ module Bmg
60
60
  module_function :sequel
61
61
 
62
62
  end
63
+ require_relative 'sequel/ext'
63
64
  require_relative 'sequel/translator'
64
65
  require_relative 'sequel/type_inference'
65
66
  require_relative 'sequel/relation'
@@ -0,0 +1,9 @@
1
+ module Sequel
2
+ class Database
3
+
4
+ def bmg_schema_cache
5
+ @bmg_schema_cache ||= {}
6
+ end
7
+
8
+ end # class Database
9
+ end # module Sequel
@@ -8,9 +8,17 @@ module Bmg
8
8
  attr_reader :sequel_db
9
9
 
10
10
  def call(name)
11
- Type.new
12
- .with_attrlist(attrlist(name))
13
- .with_keys(keys(name))
11
+ if type = sequel_db.bmg_schema_cache[name]
12
+ type
13
+ else
14
+ type = Type.new
15
+ .with_attrlist(attrlist(name))
16
+ .with_keys(keys(name))
17
+ ::Sequel.synchronize do
18
+ sequel_db.bmg_schema_cache[name] = type
19
+ end if sequel_db.cache_schema
20
+ type
21
+ end
14
22
  end
15
23
 
16
24
  def attrlist(name)
@@ -39,4 +47,4 @@ module Bmg
39
47
 
40
48
  end # class TypeInference
41
49
  end # module Sequel
42
- end # module Bmg
50
+ end # module Bmg
data/lib/bmg/version.rb CHANGED
@@ -2,7 +2,7 @@ module Bmg
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 14
5
- TINY = 1
5
+ TINY = 2
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: predicate
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: roo
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '2.7'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '2.7'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: sequel
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +148,7 @@ files:
134
148
  - lib/bmg/relation/in_memory.rb
135
149
  - lib/bmg/relation/spied.rb
136
150
  - lib/bmg/sequel.rb
151
+ - lib/bmg/sequel/ext.rb
137
152
  - lib/bmg/sequel/relation.rb
138
153
  - lib/bmg/sequel/translator.rb
139
154
  - lib/bmg/sequel/type_inference.rb
@@ -239,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
254
  version: '0'
240
255
  requirements: []
241
256
  rubyforge_project:
242
- rubygems_version: 2.5.2
257
+ rubygems_version: 2.6.11
243
258
  signing_key:
244
259
  specification_version: 4
245
260
  summary: Bmg is Alf's successor.