odba 1.1.9 → 1.2.1
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 +4 -4
- data/.github/workflows/devenv.yml +34 -0
- data/.github/workflows/ruby.yml +8 -8
- data/.gitignore +15 -0
- data/History.md +131 -0
- data/README.md +77 -1
- data/Rakefile +3 -15
- data/devenv.lock +171 -0
- data/devenv.nix +66 -0
- data/devenv.yaml +16 -0
- data/lib/odba/cache.rb +395 -344
- data/lib/odba/cache_entry.rb +42 -31
- data/lib/odba/connection_pool.rb +99 -72
- data/lib/odba/drbwrapper.rb +26 -18
- data/lib/odba/id_server.rb +20 -20
- data/lib/odba/index.rb +249 -215
- data/lib/odba/index_definition.rb +17 -17
- data/lib/odba/marshal.rb +15 -14
- data/lib/odba/odba.rb +40 -32
- data/lib/odba/odba_error.rb +4 -2
- data/lib/odba/persistable.rb +460 -414
- data/lib/odba/storage.rb +328 -277
- data/lib/odba/stub.rb +166 -153
- data/lib/odba/version.rb +1 -1
- data/lib/odba.rb +9 -9
- data/odba.gemspec +8 -3
- data/test/example.rb +47 -0
- data/test/helper.rb +6 -0
- data/test/suite.rb +7 -0
- data/test/test_array.rb +38 -33
- data/test/test_cache.rb +666 -622
- data/test/test_cache_entry.rb +51 -71
- data/test/test_connection_pool.rb +70 -25
- data/test/test_drbwrapper.rb +31 -20
- data/test/test_hash.rb +98 -89
- data/test/test_id_server.rb +30 -32
- data/test/test_index.rb +191 -158
- data/test/test_marshal.rb +15 -25
- data/test/test_persistable.rb +378 -369
- data/test/test_storage.rb +510 -471
- data/test/test_stub.rb +147 -135
- metadata +63 -20
- data/Guide.txt +0 -36
- data/History.txt +0 -91
- data/Manifest.txt +0 -38
- data/install.rb +0 -1098
- data/lib/odba/18_19_loading_compatibility.rb +0 -77
data/test/test_stub.rb
CHANGED
|
@@ -1,175 +1,187 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
# encoding: utf-8
|
|
3
2
|
# ODBA::TestStub -- odba -- 08.12.2011 -- mhatakeyama@ywesee.com
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require
|
|
8
|
-
require
|
|
9
|
-
require 'flexmock'
|
|
10
|
-
require 'odba/stub'
|
|
11
|
-
require 'odba/persistable'
|
|
12
|
-
require 'odba/odba'
|
|
13
|
-
require 'yaml'
|
|
3
|
+
require_relative "helper"
|
|
4
|
+
require "odba/stub"
|
|
5
|
+
require "odba/persistable"
|
|
6
|
+
require "odba/odba"
|
|
7
|
+
require "yaml"
|
|
14
8
|
|
|
15
9
|
module ODBA
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
class Stub
|
|
11
|
+
attr_accessor :receiver, :odba_class
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class TestStub < Test::Unit::TestCase
|
|
20
15
|
include FlexMock::TestCase
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
def setup
|
|
17
|
+
@odba_container = flexmock("odba_container")
|
|
18
|
+
@cache = ODBA.cache = flexmock("cache")
|
|
19
|
+
@receiver = flexmock("receiver")
|
|
20
|
+
@stub = Stub.new(9, @odba_container, @receiver)
|
|
21
|
+
end
|
|
22
|
+
|
|
27
23
|
def teardown
|
|
28
24
|
@cache = ODBA.cache = nil
|
|
29
|
-
super
|
|
30
25
|
end
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
|
|
27
|
+
def test_method_missing
|
|
28
|
+
receiver = flexmock
|
|
33
29
|
@cache.should_receive(:fetch).with(9, FlexMock.any).once.and_return(receiver)
|
|
34
30
|
receiver.should_receive(:foo_method).with(3)
|
|
35
31
|
@odba_container.should_receive(:odba_replace_stubs).with(9, FlexMock.any).and_return(@stub)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
@stub.foo_method(3)
|
|
33
|
+
receiver.flexmock_verify
|
|
34
|
+
@odba_container.flexmock_verify
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def test_method_missing_receiver_nil
|
|
38
|
+
@stub.receiver = nil
|
|
39
|
+
cache = ODBA.cache
|
|
40
|
+
receiver = flexmock
|
|
44
41
|
@cache.should_receive(:fetch).with(FlexMock.any, FlexMock.any).once.and_return(receiver)
|
|
45
42
|
receiver.should_receive(:foo_method).with(3)
|
|
46
43
|
@odba_container.should_receive(:odba_replace_stubs).with(FlexMock.any, FlexMock.any).and_return(@stub)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
@stub.foo_method(3)
|
|
45
|
+
@odba_container.flexmock_verify
|
|
46
|
+
cache.flexmock_verify
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def test_method_missing__odba_class_nil # backward-compatibility
|
|
50
|
+
@stub.odba_class = nil
|
|
51
|
+
receiver = flexmock
|
|
54
52
|
@cache.should_receive(:fetch).with(FlexMock.any, FlexMock.any).once.and_return(receiver)
|
|
55
53
|
receiver.should_receive(:foo_method).with(3)
|
|
56
54
|
@odba_container.should_receive(:odba_replace_stubs).with(FlexMock.any, FlexMock.any)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
@stub.foo_method(3)
|
|
56
|
+
@odba_container.flexmock_verify
|
|
57
|
+
ODBA.cache.flexmock_verify
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def test_odba_receiver
|
|
61
|
+
@cache.should_receive(:fetch).with(9, @odba_container).and_return("odba_instance")
|
|
62
|
+
@odba_container.should_receive(:odba_replace_stubs).with(@stub.odba_id, "odba_instance").and_return(true)
|
|
63
|
+
@stub.odba_receiver
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def test_send_instance_methods
|
|
67
|
+
receiver = "odba_instance"
|
|
68
|
+
@odba_container.should_ignore_missing
|
|
69
69
|
@cache.should_receive(:fetch).with(9, FlexMock.any).once.and_return(receiver)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
omit("Why does this fail")
|
|
71
|
+
@stub.taint
|
|
72
|
+
assert_equal(true, receiver.tainted?)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_instance_method_not_sent
|
|
76
|
+
assert_equal(true, @stub.is_a?(Persistable))
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def test_send_class
|
|
80
|
+
flexmock
|
|
79
81
|
@odba_container.should_receive(:odba_replace_stubs).with(FlexMock.any, FlexMock.any)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
assert_equal(FlexMock, @stub.class)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def test_respond_to
|
|
86
|
+
receiver = flexmock("receiver")
|
|
84
87
|
@odba_container.should_receive(:odba_replace_stubs).with(FlexMock.any, FlexMock.any)
|
|
85
88
|
@cache.should_receive(:fetch).with(FlexMock.any, FlexMock.any).once.and_return(receiver)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
receiver.flexmock_verify
|
|
90
|
+
assert_equal(false, @stub.respond_to?(:odba_replace))
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def test_array_methods
|
|
94
|
+
stub = Stub.new(9, [], [])
|
|
91
95
|
@cache.should_receive(:fetch).with(FlexMock.any, FlexMock.any).and_return([])
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
96
|
+
assert_equal([], stub)
|
|
97
|
+
stub = Stub.new(9, [], [])
|
|
98
|
+
assert([] == stub)
|
|
99
|
+
[
|
|
100
|
+
"&", "+", "-", "<=>", "==",
|
|
101
|
+
"concat", "equal?", "replace", "|"
|
|
102
|
+
].each { |method|
|
|
103
|
+
stub = Stub.new(9, [], [])
|
|
104
|
+
[].send(method, stub)
|
|
105
|
+
}
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def test_hash_methods
|
|
109
|
+
stub = Stub.new(9, [], {})
|
|
110
|
+
@cache.should_receive(:fetch).with(FlexMock.any, FlexMock.any).times(5).and_return({})
|
|
111
|
+
assert_equal({}, stub)
|
|
112
|
+
stub = Stub.new(9, [], {})
|
|
113
|
+
assert({} == stub)
|
|
114
|
+
[
|
|
115
|
+
"merge", "merge!", "replace"
|
|
116
|
+
].each { |method|
|
|
117
|
+
stub = Stub.new(9, [], {})
|
|
118
|
+
{}.send(method, stub)
|
|
119
|
+
}
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def test_hash__fetch
|
|
123
|
+
stub = Stub.new(9, [], {})
|
|
118
124
|
@cache.should_receive(:include?).with(9).and_return(false)
|
|
119
|
-
@cache.should_receive(:fetch_collection_element).with(9,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
@cache.should_receive(:fetch_collection_element).with(9, "bar").and_return("foo")
|
|
126
|
+
assert_equal("foo", stub["bar"])
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def test_hash__fetch__2
|
|
130
|
+
stub = Stub.new(9, [], {})
|
|
124
131
|
@cache.should_receive(:include?).with(9).and_return(false)
|
|
125
|
-
@cache.should_receive(:fetch_collection_element).with(9,
|
|
126
|
-
@cache.should_receive(:fetch).with(9, []).and_return({
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
@cache.should_receive(:fetch_collection_element).with(9, "bar").and_return(nil)
|
|
133
|
+
@cache.should_receive(:fetch).with(9, []).and_return({"bar" => "foo"})
|
|
134
|
+
assert_equal("foo", stub["bar"])
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def test_hash__fetch__already_in_cache
|
|
138
|
+
stub = Stub.new(9, [], {})
|
|
131
139
|
@cache.should_receive(:include?).with(9).and_return(true)
|
|
132
|
-
@cache.should_receive(:fetch).with(9, []).and_return({
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
@cache.should_receive(:fetch).with(9, []).and_return({"bar" => "foo"})
|
|
141
|
+
assert_equal("foo", stub["bar"])
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def test_hash_key__1
|
|
145
|
+
stub = Stub.new(9, nil, nil)
|
|
146
|
+
@cache.should_receive(:fetch).with(9, nil).and_return(@receiver)
|
|
147
|
+
@cache.should_receive(:fetch).with(9, @odba_container)
|
|
139
148
|
.and_return(@receiver)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
149
|
+
@cache.should_receive(:fetch).with(8, nil).and_return("other")
|
|
150
|
+
@odba_container.should_ignore_missing
|
|
151
|
+
hash = {stub => "success"}
|
|
152
|
+
assert_equal("success", hash[@stub])
|
|
144
153
|
other = Stub.new(8, nil, nil)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
154
|
+
assert_nil(hash[other])
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def test_to_yaml
|
|
158
|
+
omit "Don't know why the stub does not work for Ruby 2.x or later"
|
|
159
|
+
flexmock(@cache, fetch: nil)
|
|
151
160
|
yaml = @stub.odba_isolated_stub.to_yaml
|
|
152
|
-
|
|
161
|
+
loaded = YAML.load(yaml)
|
|
153
162
|
assert(loaded.is_a?(Stub), "loading from yaml should return a Stub")
|
|
154
|
-
|
|
155
|
-
|
|
163
|
+
assert_equal(9, loaded.odba_id)
|
|
164
|
+
end
|
|
165
|
+
|
|
156
166
|
def test_odba_clear_receiver
|
|
157
|
-
@stub.instance_variable_set(
|
|
167
|
+
@stub.instance_variable_set(:@receiver, flexmock)
|
|
158
168
|
@stub.odba_clear_receiver
|
|
159
|
-
assert_nil(@stub.instance_variable_get(
|
|
169
|
+
assert_nil(@stub.instance_variable_get(:@receiver))
|
|
160
170
|
end
|
|
171
|
+
|
|
161
172
|
def test_odba_unsaved
|
|
162
173
|
assert_equal(false, @stub.odba_unsaved?)
|
|
163
174
|
end
|
|
164
|
-
|
|
175
|
+
|
|
176
|
+
def test_hash_key__2
|
|
165
177
|
receiver = Object.new
|
|
166
178
|
receiver.extend(Persistable)
|
|
167
|
-
receiver.instance_variable_set(
|
|
179
|
+
receiver.instance_variable_set(:@odba_id, 9)
|
|
168
180
|
stub = Stub.new(9, nil, nil)
|
|
169
181
|
@cache.should_receive(:fetch).with(9, nil).and_return(receiver)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
182
|
+
hash = {stub => "success"}
|
|
183
|
+
assert_equal("success", hash[stub])
|
|
184
|
+
assert_equal("success", hash[receiver])
|
|
185
|
+
end
|
|
186
|
+
end
|
|
175
187
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: odba
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 1980-01-
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: observer
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: drb
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: stringio
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
13
54
|
- !ruby/object:Gem::Dependency
|
|
14
55
|
name: ydbi
|
|
15
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -84,18 +125,18 @@ dependencies:
|
|
|
84
125
|
name: flexmock
|
|
85
126
|
requirement: !ruby/object:Gem::Requirement
|
|
86
127
|
requirements:
|
|
87
|
-
- -
|
|
128
|
+
- - '='
|
|
88
129
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
130
|
+
version: 2.4.0
|
|
90
131
|
type: :development
|
|
91
132
|
prerelease: false
|
|
92
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
134
|
requirements:
|
|
94
|
-
- -
|
|
135
|
+
- - '='
|
|
95
136
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
137
|
+
version: 2.4.0
|
|
97
138
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
139
|
+
name: test-unit
|
|
99
140
|
requirement: !ruby/object:Gem::Requirement
|
|
100
141
|
requirements:
|
|
101
142
|
- - ">="
|
|
@@ -109,7 +150,7 @@ dependencies:
|
|
|
109
150
|
- !ruby/object:Gem::Version
|
|
110
151
|
version: '0'
|
|
111
152
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
153
|
+
name: debug
|
|
113
154
|
requirement: !ruby/object:Gem::Requirement
|
|
114
155
|
requirements:
|
|
115
156
|
- - ">="
|
|
@@ -123,7 +164,7 @@ dependencies:
|
|
|
123
164
|
- !ruby/object:Gem::Version
|
|
124
165
|
version: '0'
|
|
125
166
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
167
|
+
name: simplecov
|
|
127
168
|
requirement: !ruby/object:Gem::Requirement
|
|
128
169
|
requirements:
|
|
129
170
|
- - ">="
|
|
@@ -142,18 +183,18 @@ executables: []
|
|
|
142
183
|
extensions: []
|
|
143
184
|
extra_rdoc_files: []
|
|
144
185
|
files:
|
|
186
|
+
- ".github/workflows/devenv.yml"
|
|
145
187
|
- ".github/workflows/ruby.yml"
|
|
146
188
|
- ".gitignore"
|
|
147
189
|
- Gemfile
|
|
148
|
-
-
|
|
149
|
-
- History.txt
|
|
190
|
+
- History.md
|
|
150
191
|
- LICENSE.txt
|
|
151
|
-
- Manifest.txt
|
|
152
192
|
- README.md
|
|
153
193
|
- Rakefile
|
|
154
|
-
-
|
|
194
|
+
- devenv.lock
|
|
195
|
+
- devenv.nix
|
|
196
|
+
- devenv.yaml
|
|
155
197
|
- lib/odba.rb
|
|
156
|
-
- lib/odba/18_19_loading_compatibility.rb
|
|
157
198
|
- lib/odba/cache.rb
|
|
158
199
|
- lib/odba/cache_entry.rb
|
|
159
200
|
- lib/odba/connection_pool.rb
|
|
@@ -174,6 +215,9 @@ files:
|
|
|
174
215
|
- sql/create_tables.sql
|
|
175
216
|
- sql/object.sql
|
|
176
217
|
- sql/object_connection.sql
|
|
218
|
+
- test/example.rb
|
|
219
|
+
- test/helper.rb
|
|
220
|
+
- test/suite.rb
|
|
177
221
|
- test/test_array.rb
|
|
178
222
|
- test/test_cache.rb
|
|
179
223
|
- test/test_cache_entry.rb
|
|
@@ -189,8 +233,8 @@ files:
|
|
|
189
233
|
homepage: https://github.com/zdavatz/odba
|
|
190
234
|
licenses:
|
|
191
235
|
- GPL-v2
|
|
192
|
-
metadata:
|
|
193
|
-
|
|
236
|
+
metadata:
|
|
237
|
+
changelog_uri: https://github.com/zdavatz/odba/blob/master/History.md
|
|
194
238
|
rdoc_options: []
|
|
195
239
|
require_paths:
|
|
196
240
|
- lib
|
|
@@ -198,15 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
198
242
|
requirements:
|
|
199
243
|
- - ">="
|
|
200
244
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: '
|
|
245
|
+
version: '3.2'
|
|
202
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
247
|
requirements:
|
|
204
248
|
- - ">="
|
|
205
249
|
- !ruby/object:Gem::Version
|
|
206
250
|
version: '0'
|
|
207
251
|
requirements: []
|
|
208
|
-
rubygems_version: 3.
|
|
209
|
-
signing_key:
|
|
252
|
+
rubygems_version: 3.6.9
|
|
210
253
|
specification_version: 4
|
|
211
254
|
summary: Ruby Software for ODDB.org Memory Management
|
|
212
255
|
test_files: []
|
data/Guide.txt
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
= odba
|
|
2
|
-
|
|
3
|
-
ODBA is an unintrusive Object Cache system. It adresses the crosscutting
|
|
4
|
-
concern of object storage by disconnecting and serializing objects into
|
|
5
|
-
storage. All disconnected connections are replaced by instances of
|
|
6
|
-
ODBA::Stub, thus enabling transparent object-loading.
|
|
7
|
-
|
|
8
|
-
== ODBA supports
|
|
9
|
-
|
|
10
|
-
* transparent loading of connected objects
|
|
11
|
-
* index-vectors
|
|
12
|
-
* transactions
|
|
13
|
-
* transparently fetches Hash-Elements without loading the entire Hash
|
|
14
|
-
|
|
15
|
-
== Example
|
|
16
|
-
include 'odba'
|
|
17
|
-
|
|
18
|
-
# connect default storage manager to a relational database
|
|
19
|
-
ODBA.storage.dbi = ODBA::ConnectionPool.new('DBI::pg::database', 'user', 'pw')
|
|
20
|
-
|
|
21
|
-
class Counter
|
|
22
|
-
include ODBA::Persistable
|
|
23
|
-
def initialize
|
|
24
|
-
@pos = 0
|
|
25
|
-
end
|
|
26
|
-
def up
|
|
27
|
-
@pos += 1
|
|
28
|
-
self.odba_store
|
|
29
|
-
@pos
|
|
30
|
-
end
|
|
31
|
-
def down
|
|
32
|
-
@pos -= 1
|
|
33
|
-
self.odba_store
|
|
34
|
-
@pos
|
|
35
|
-
end
|
|
36
|
-
end
|
data/History.txt
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
=== 1.1.9 / 28.06.2025
|
|
2
|
-
|
|
3
|
-
* bulk_restore throws OdbaError when stack size > 1000
|
|
4
|
-
|
|
5
|
-
=== 1.1.8 / 10.03.2021
|
|
6
|
-
|
|
7
|
-
* Removed fixed dependency to pg (is optional like mysql2)
|
|
8
|
-
|
|
9
|
-
=== 1.1.7 / 20.01.2021
|
|
10
|
-
|
|
11
|
-
* Reworked some tests
|
|
12
|
-
* Updated to use Ruby 3.0.0
|
|
13
|
-
* Added github actions
|
|
14
|
-
* Updated to use ydbi 0.5.7
|
|
15
|
-
|
|
16
|
-
=== 1.1.6 / 23.01.2016
|
|
17
|
-
|
|
18
|
-
* Updated to use ydbi 0.5.6
|
|
19
|
-
|
|
20
|
-
=== 1.1.5 / 23.01.2016
|
|
21
|
-
|
|
22
|
-
* Remove unused parameter dict for update_fulltext_index
|
|
23
|
-
|
|
24
|
-
=== 1.1.4 / 13.12.2017
|
|
25
|
-
|
|
26
|
-
* Drop text search dictionaries/configuration before recreating
|
|
27
|
-
* Remove dictionary argument in fulltext search and index_definition
|
|
28
|
-
|
|
29
|
-
=== 1.1.3 / 12.12.2016
|
|
30
|
-
|
|
31
|
-
* Avoid errors by always specifying "IF NOT EXISTS" when creating tables and indices
|
|
32
|
-
* Add utility method get_server_version
|
|
33
|
-
* Removed misleading check in generate_dictionary
|
|
34
|
-
|
|
35
|
-
=== 1.1.2 / 10.05.2016
|
|
36
|
-
|
|
37
|
-
* requires now 'ydbi' and 'ydbd-pg'
|
|
38
|
-
|
|
39
|
-
=== 1.1.1 / 10.05.2016
|
|
40
|
-
|
|
41
|
-
* Made tests pass under Ruby 1.9.3, 2.x
|
|
42
|
-
* Updated to use minitest
|
|
43
|
-
|
|
44
|
-
=== 1.1.0 / 15.03.2013
|
|
45
|
-
|
|
46
|
-
* Update dict source file name for multi languages
|
|
47
|
-
|
|
48
|
-
=== 1.0.9 / 15.03.2013
|
|
49
|
-
|
|
50
|
-
* Update dictionary to be suitable for new tsearch2
|
|
51
|
-
- generate_dictionary API is changed.
|
|
52
|
-
- generate_dictionary needs dict source files(dict, affix, stop)
|
|
53
|
-
into /usr/share/postgresql/tsearch_data.
|
|
54
|
-
|
|
55
|
-
=== 1.0.8 / 09.01.2012
|
|
56
|
-
|
|
57
|
-
* Added exclusive control to update @accessed_by Hash variable in CacheEntry class using mutex (Patinfo-Invoice Error)
|
|
58
|
-
|
|
59
|
-
=== 1.0.7 / 27.12.2011
|
|
60
|
-
|
|
61
|
-
* Debugged Hash iteration error during cleaning @fetched and @prefetched objects
|
|
62
|
-
|
|
63
|
-
=== 1.0.6 / 23.12.2011
|
|
64
|
-
|
|
65
|
-
* Fix all the elements of odba_potentials and odba_exclude_vars to be Symbols for Ruby 1.9.3
|
|
66
|
-
|
|
67
|
-
=== 1.0.5 / 20.12.2011
|
|
68
|
-
|
|
69
|
-
* Added attr_accessor :odba_persistent so we can update doctor addresses on ch.oddb.org
|
|
70
|
-
|
|
71
|
-
=== 1.0.4 / 12.12.2011
|
|
72
|
-
|
|
73
|
-
* Fixed file lock process by using @file_lock flag variable to control it in application side
|
|
74
|
-
|
|
75
|
-
=== 1.0.3 / 09.12.2011
|
|
76
|
-
|
|
77
|
-
* Debugged ODBA::Cache#next_id
|
|
78
|
-
|
|
79
|
-
=== 1.0.2 / 09.12.2011
|
|
80
|
-
|
|
81
|
-
* Updated cache.rb persitatble.rb 18_19_loading_compatibility.rb to be compatible for both Ruby 1.8 and 1.9
|
|
82
|
-
|
|
83
|
-
=== 1.0.1 / 08.12.2011
|
|
84
|
-
|
|
85
|
-
* Added file lock exclusive control to create a new odba_id between processes.
|
|
86
|
-
|
|
87
|
-
=== 1.0.0 / 20.12.2010
|
|
88
|
-
|
|
89
|
-
* Add ODBA.cache.index_matches(index_name, substring)
|
|
90
|
-
|
|
91
|
-
* this new method returns all search-terms of a given index (identified by index_name) that start with substring.
|
data/Manifest.txt
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Guide.txt
|
|
2
|
-
History.txt
|
|
3
|
-
LICENSE.txt
|
|
4
|
-
README.txt
|
|
5
|
-
Rakefile
|
|
6
|
-
install.rb
|
|
7
|
-
lib/odba.rb
|
|
8
|
-
lib/odba/18_19_loading_compatibility.rb
|
|
9
|
-
lib/odba/cache.rb
|
|
10
|
-
lib/odba/cache_entry.rb
|
|
11
|
-
lib/odba/connection_pool.rb
|
|
12
|
-
lib/odba/drbwrapper.rb
|
|
13
|
-
lib/odba/id_server.rb
|
|
14
|
-
lib/odba/index.rb
|
|
15
|
-
lib/odba/index_definition.rb
|
|
16
|
-
lib/odba/marshal.rb
|
|
17
|
-
lib/odba/odba.rb
|
|
18
|
-
lib/odba/odba_error.rb
|
|
19
|
-
lib/odba/persistable.rb
|
|
20
|
-
lib/odba/storage.rb
|
|
21
|
-
lib/odba/stub.rb
|
|
22
|
-
sql/collection.sql
|
|
23
|
-
sql/create_tables.sql
|
|
24
|
-
sql/object.sql
|
|
25
|
-
sql/object_connection.sql
|
|
26
|
-
test/suite.rb
|
|
27
|
-
test/test_array.rb
|
|
28
|
-
test/test_cache.rb
|
|
29
|
-
test/test_cache_entry.rb
|
|
30
|
-
test/test_connection_pool.rb
|
|
31
|
-
test/test_drbwrapper.rb
|
|
32
|
-
test/test_hash.rb
|
|
33
|
-
test/test_id_server.rb
|
|
34
|
-
test/test_index.rb
|
|
35
|
-
test/test_marshal.rb
|
|
36
|
-
test/test_persistable.rb
|
|
37
|
-
test/test_storage.rb
|
|
38
|
-
test/test_stub.rb
|