datamapper-dm-core 0.9.11 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/.autotest +17 -14
  2. data/.gitignore +3 -1
  3. data/FAQ +6 -5
  4. data/History.txt +5 -39
  5. data/Manifest.txt +67 -76
  6. data/QUICKLINKS +1 -1
  7. data/README.txt +21 -15
  8. data/Rakefile +16 -15
  9. data/SPECS +2 -29
  10. data/TODO +1 -1
  11. data/dm-core.gemspec +11 -15
  12. data/lib/dm-core/adapters/abstract_adapter.rb +182 -185
  13. data/lib/dm-core/adapters/data_objects_adapter.rb +482 -534
  14. data/lib/dm-core/adapters/in_memory_adapter.rb +90 -69
  15. data/lib/dm-core/adapters/mysql_adapter.rb +22 -115
  16. data/lib/dm-core/adapters/oracle_adapter.rb +249 -0
  17. data/lib/dm-core/adapters/postgres_adapter.rb +7 -173
  18. data/lib/dm-core/adapters/sqlite3_adapter.rb +4 -97
  19. data/lib/dm-core/adapters/yaml_adapter.rb +116 -0
  20. data/lib/dm-core/adapters.rb +135 -16
  21. data/lib/dm-core/associations/many_to_many.rb +372 -90
  22. data/lib/dm-core/associations/many_to_one.rb +220 -73
  23. data/lib/dm-core/associations/one_to_many.rb +319 -255
  24. data/lib/dm-core/associations/one_to_one.rb +66 -53
  25. data/lib/dm-core/associations/relationship.rb +560 -158
  26. data/lib/dm-core/collection.rb +1104 -381
  27. data/lib/dm-core/core_ext/kernel.rb +12 -0
  28. data/lib/dm-core/core_ext/symbol.rb +10 -0
  29. data/lib/dm-core/identity_map.rb +4 -34
  30. data/lib/dm-core/migrations.rb +1283 -0
  31. data/lib/dm-core/model/descendant_set.rb +81 -0
  32. data/lib/dm-core/model/hook.rb +45 -0
  33. data/lib/dm-core/model/is.rb +32 -0
  34. data/lib/dm-core/model/property.rb +248 -0
  35. data/lib/dm-core/model/relationship.rb +335 -0
  36. data/lib/dm-core/model/scope.rb +90 -0
  37. data/lib/dm-core/model.rb +570 -369
  38. data/lib/dm-core/property.rb +753 -280
  39. data/lib/dm-core/property_set.rb +141 -98
  40. data/lib/dm-core/query/conditions/comparison.rb +814 -0
  41. data/lib/dm-core/query/conditions/operation.rb +247 -0
  42. data/lib/dm-core/query/direction.rb +43 -0
  43. data/lib/dm-core/query/operator.rb +42 -0
  44. data/lib/dm-core/query/path.rb +102 -0
  45. data/lib/dm-core/query/sort.rb +45 -0
  46. data/lib/dm-core/query.rb +974 -492
  47. data/lib/dm-core/repository.rb +147 -107
  48. data/lib/dm-core/resource.rb +644 -429
  49. data/lib/dm-core/spec/adapter_shared_spec.rb +294 -0
  50. data/lib/dm-core/spec/data_objects_adapter_shared_spec.rb +106 -0
  51. data/lib/dm-core/support/chainable.rb +20 -0
  52. data/lib/dm-core/support/deprecate.rb +12 -0
  53. data/lib/dm-core/support/equalizer.rb +23 -0
  54. data/lib/dm-core/support/logger.rb +13 -0
  55. data/lib/dm-core/{naming_conventions.rb → support/naming_conventions.rb} +6 -6
  56. data/lib/dm-core/transaction.rb +333 -92
  57. data/lib/dm-core/type.rb +98 -60
  58. data/lib/dm-core/types/boolean.rb +1 -1
  59. data/lib/dm-core/types/discriminator.rb +34 -20
  60. data/lib/dm-core/types/object.rb +7 -4
  61. data/lib/dm-core/types/paranoid_boolean.rb +11 -9
  62. data/lib/dm-core/types/paranoid_datetime.rb +11 -9
  63. data/lib/dm-core/types/serial.rb +3 -3
  64. data/lib/dm-core/types/text.rb +3 -4
  65. data/lib/dm-core/version.rb +1 -1
  66. data/lib/dm-core.rb +106 -110
  67. data/script/performance.rb +102 -109
  68. data/script/profile.rb +169 -38
  69. data/spec/lib/adapter_helpers.rb +105 -0
  70. data/spec/lib/collection_helpers.rb +18 -0
  71. data/spec/lib/counter_adapter.rb +34 -0
  72. data/spec/lib/pending_helpers.rb +27 -0
  73. data/spec/lib/rspec_immediate_feedback_formatter.rb +53 -0
  74. data/spec/public/associations/many_to_many_spec.rb +193 -0
  75. data/spec/public/associations/many_to_one_spec.rb +73 -0
  76. data/spec/public/associations/one_to_many_spec.rb +77 -0
  77. data/spec/public/associations/one_to_one_spec.rb +156 -0
  78. data/spec/public/collection_spec.rb +65 -0
  79. data/spec/public/model/relationship_spec.rb +924 -0
  80. data/spec/public/model_spec.rb +159 -0
  81. data/spec/public/property_spec.rb +829 -0
  82. data/spec/public/resource_spec.rb +71 -0
  83. data/spec/public/sel_spec.rb +44 -0
  84. data/spec/public/setup_spec.rb +145 -0
  85. data/spec/public/shared/association_collection_shared_spec.rb +317 -0
  86. data/spec/public/shared/collection_shared_spec.rb +1723 -0
  87. data/spec/public/shared/finder_shared_spec.rb +1619 -0
  88. data/spec/public/shared/resource_shared_spec.rb +924 -0
  89. data/spec/public/shared/sel_shared_spec.rb +112 -0
  90. data/spec/public/transaction_spec.rb +129 -0
  91. data/spec/public/types/discriminator_spec.rb +130 -0
  92. data/spec/semipublic/adapters/abstract_adapter_spec.rb +30 -0
  93. data/spec/semipublic/adapters/in_memory_adapter_spec.rb +12 -0
  94. data/spec/semipublic/adapters/mysql_adapter_spec.rb +17 -0
  95. data/spec/semipublic/adapters/oracle_adapter_spec.rb +194 -0
  96. data/spec/semipublic/adapters/postgres_adapter_spec.rb +17 -0
  97. data/spec/semipublic/adapters/sqlite3_adapter_spec.rb +17 -0
  98. data/spec/semipublic/adapters/yaml_adapter_spec.rb +12 -0
  99. data/spec/semipublic/associations/many_to_one_spec.rb +53 -0
  100. data/spec/semipublic/associations/relationship_spec.rb +194 -0
  101. data/spec/semipublic/associations_spec.rb +177 -0
  102. data/spec/semipublic/collection_spec.rb +142 -0
  103. data/spec/semipublic/property_spec.rb +61 -0
  104. data/spec/semipublic/query/conditions_spec.rb +528 -0
  105. data/spec/semipublic/query/path_spec.rb +443 -0
  106. data/spec/semipublic/query_spec.rb +2626 -0
  107. data/spec/semipublic/resource_spec.rb +47 -0
  108. data/spec/semipublic/shared/resource_shared_spec.rb +126 -0
  109. data/spec/spec.opts +3 -1
  110. data/spec/spec_helper.rb +80 -57
  111. data/tasks/ci.rb +19 -31
  112. data/tasks/dm.rb +43 -48
  113. data/tasks/doc.rb +8 -11
  114. data/tasks/gemspec.rb +5 -5
  115. data/tasks/hoe.rb +15 -16
  116. data/tasks/install.rb +8 -10
  117. metadata +72 -93
  118. data/lib/dm-core/associations/relationship_chain.rb +0 -81
  119. data/lib/dm-core/associations.rb +0 -207
  120. data/lib/dm-core/auto_migrations.rb +0 -105
  121. data/lib/dm-core/dependency_queue.rb +0 -32
  122. data/lib/dm-core/hook.rb +0 -11
  123. data/lib/dm-core/is.rb +0 -16
  124. data/lib/dm-core/logger.rb +0 -232
  125. data/lib/dm-core/migrations/destructive_migrations.rb +0 -17
  126. data/lib/dm-core/migrator.rb +0 -29
  127. data/lib/dm-core/scope.rb +0 -58
  128. data/lib/dm-core/support/array.rb +0 -13
  129. data/lib/dm-core/support/assertions.rb +0 -8
  130. data/lib/dm-core/support/errors.rb +0 -23
  131. data/lib/dm-core/support/kernel.rb +0 -11
  132. data/lib/dm-core/support/symbol.rb +0 -41
  133. data/lib/dm-core/support.rb +0 -7
  134. data/lib/dm-core/type_map.rb +0 -80
  135. data/lib/dm-core/types.rb +0 -19
  136. data/script/all +0 -4
  137. data/spec/integration/association_spec.rb +0 -1382
  138. data/spec/integration/association_through_spec.rb +0 -203
  139. data/spec/integration/associations/many_to_many_spec.rb +0 -449
  140. data/spec/integration/associations/many_to_one_spec.rb +0 -163
  141. data/spec/integration/associations/one_to_many_spec.rb +0 -188
  142. data/spec/integration/auto_migrations_spec.rb +0 -413
  143. data/spec/integration/collection_spec.rb +0 -1073
  144. data/spec/integration/data_objects_adapter_spec.rb +0 -32
  145. data/spec/integration/dependency_queue_spec.rb +0 -46
  146. data/spec/integration/model_spec.rb +0 -197
  147. data/spec/integration/mysql_adapter_spec.rb +0 -85
  148. data/spec/integration/postgres_adapter_spec.rb +0 -731
  149. data/spec/integration/property_spec.rb +0 -253
  150. data/spec/integration/query_spec.rb +0 -514
  151. data/spec/integration/repository_spec.rb +0 -61
  152. data/spec/integration/resource_spec.rb +0 -513
  153. data/spec/integration/sqlite3_adapter_spec.rb +0 -352
  154. data/spec/integration/sti_spec.rb +0 -273
  155. data/spec/integration/strategic_eager_loading_spec.rb +0 -156
  156. data/spec/integration/transaction_spec.rb +0 -75
  157. data/spec/integration/type_spec.rb +0 -275
  158. data/spec/lib/logging_helper.rb +0 -18
  159. data/spec/lib/mock_adapter.rb +0 -27
  160. data/spec/lib/model_loader.rb +0 -100
  161. data/spec/lib/publicize_methods.rb +0 -28
  162. data/spec/models/content.rb +0 -16
  163. data/spec/models/vehicles.rb +0 -34
  164. data/spec/models/zoo.rb +0 -48
  165. data/spec/unit/adapters/abstract_adapter_spec.rb +0 -133
  166. data/spec/unit/adapters/adapter_shared_spec.rb +0 -15
  167. data/spec/unit/adapters/data_objects_adapter_spec.rb +0 -632
  168. data/spec/unit/adapters/in_memory_adapter_spec.rb +0 -98
  169. data/spec/unit/adapters/postgres_adapter_spec.rb +0 -133
  170. data/spec/unit/associations/many_to_many_spec.rb +0 -32
  171. data/spec/unit/associations/many_to_one_spec.rb +0 -159
  172. data/spec/unit/associations/one_to_many_spec.rb +0 -393
  173. data/spec/unit/associations/one_to_one_spec.rb +0 -7
  174. data/spec/unit/associations/relationship_spec.rb +0 -71
  175. data/spec/unit/associations_spec.rb +0 -242
  176. data/spec/unit/auto_migrations_spec.rb +0 -111
  177. data/spec/unit/collection_spec.rb +0 -182
  178. data/spec/unit/data_mapper_spec.rb +0 -35
  179. data/spec/unit/identity_map_spec.rb +0 -126
  180. data/spec/unit/is_spec.rb +0 -80
  181. data/spec/unit/migrator_spec.rb +0 -33
  182. data/spec/unit/model_spec.rb +0 -321
  183. data/spec/unit/naming_conventions_spec.rb +0 -36
  184. data/spec/unit/property_set_spec.rb +0 -90
  185. data/spec/unit/property_spec.rb +0 -753
  186. data/spec/unit/query_spec.rb +0 -571
  187. data/spec/unit/repository_spec.rb +0 -93
  188. data/spec/unit/resource_spec.rb +0 -649
  189. data/spec/unit/scope_spec.rb +0 -142
  190. data/spec/unit/transaction_spec.rb +0 -493
  191. data/spec/unit/type_map_spec.rb +0 -114
  192. data/spec/unit/type_spec.rb +0 -119
@@ -1,209 +1,206 @@
1
1
  module DataMapper
2
2
  module Adapters
3
+ # Specific adapters extend this class and implement
4
+ # methods for creating, reading, updating and deleting records.
5
+ #
6
+ # Adapters may only implement method for reading or (less common case)
7
+ # writing. Read only adapter may be useful when one needs to work
8
+ # with legacy data that should not be changed or web services that
9
+ # only provide read access to data (from Wordnet and Medline to
10
+ # Atom and RSS syndication feeds)
11
+ #
12
+ # Note that in case of adapters to relational databases it makes
13
+ # sense to inherit from DataObjectsAdapter class.
3
14
  class AbstractAdapter
4
- include Assertions
5
-
6
- attr_reader :name, :uri
7
- attr_accessor :resource_naming_convention, :field_naming_convention
8
-
15
+ include Extlib::Assertions
16
+ extend Extlib::Assertions
17
+ extend Equalizer
18
+
19
+ equalize :name, :options, :resource_naming_convention, :field_naming_convention
20
+
21
+ # Adapter name
22
+ #
23
+ # @example
24
+ # adapter.name # => :default
25
+ #
26
+ # Note that when you use
27
+ #
28
+ # DataMapper.setup(:default, 'postgres://postgres@localhost/dm_core_test')
29
+ #
30
+ # then adapter name is currently be set to is :default
31
+ #
32
+ # @return [Symbol]
33
+ # the adapter name
34
+ #
35
+ # @api semipublic
36
+ attr_reader :name
37
+
38
+ # Options with which adapter was set up
39
+ #
40
+ # @example
41
+ # adapter.options # => { :adapter => 'yaml', :path => '/tmp' }
42
+ #
43
+ # @return [Hash]
44
+ # adapter configuration options
45
+ #
46
+ # @api semipublic
47
+ attr_reader :options
48
+
49
+ # A callable object returning a naming convention for model storage
50
+ #
51
+ # @example
52
+ # adapter.resource_naming_convention # => Proc for model storage name
53
+ #
54
+ # @return [#call]
55
+ # object to return the naming convention for each model
56
+ #
57
+ # @api semipublic
58
+ attr_accessor :resource_naming_convention
59
+
60
+ # A callable object returning a naming convention for property fields
61
+ #
62
+ # @example
63
+ # adapter.field_naming_convention # => Proc for field name
64
+ #
65
+ # @return [#call]
66
+ # object to return the naming convention for each field
67
+ #
68
+ # @api semipublic
69
+ attr_accessor :field_naming_convention
70
+
71
+ # Persists one or many new resources
72
+ #
73
+ # @example
74
+ # adapter.create(collection) # => 1
75
+ #
76
+ # Adapters provide specific implementation of this method
77
+ #
78
+ # @param [Enumerable<Resource>] resources
79
+ # The list of resources (model instances) to create
80
+ #
81
+ # @return [Integer]
82
+ # The number of records that were actually saved into the data-store
83
+ #
84
+ # @api semipublic
9
85
  def create(resources)
10
- raise NotImplementedError
11
- end
12
-
13
- def read_many(query)
14
- raise NotImplementedError
86
+ raise NotImplementedError, "#{self.class}#create not implemented"
15
87
  end
16
88
 
17
- def read_one(query)
18
- raise NotImplementedError
89
+ # Reads one or many resources from a datastore
90
+ #
91
+ # @example
92
+ # adapter.read(query) # => [ { 'name' => 'Dan Kubb' } ]
93
+ #
94
+ # Adapters provide specific implementation of this method
95
+ #
96
+ # @param [Query] query
97
+ # the query to match resources in the datastore
98
+ #
99
+ # @return [Enumerable<Hash>]
100
+ # an array of hashes to become resources
101
+ #
102
+ # @api semipublic
103
+ def read(query)
104
+ raise NotImplementedError, "#{self.class}#read not implemented"
19
105
  end
20
106
 
21
- def update(attributes, query)
22
- raise NotImplementedError
107
+ # Updates one or many existing resources
108
+ #
109
+ # @example
110
+ # adapter.update(attributes, collection) # => 1
111
+ #
112
+ # Adapters provide specific implementation of this method
113
+ #
114
+ # @param [Hash(Property => Object)] attributes
115
+ # hash of attribute values to set, keyed by Property
116
+ # @param [Collection] collection
117
+ # collection of records to be updated
118
+ #
119
+ # @return [Integer]
120
+ # the number of records updated
121
+ #
122
+ # @api semipublic
123
+ def update(attributes, collection)
124
+ raise NotImplementedError, "#{self.class}#update not implemented"
23
125
  end
24
126
 
25
- def delete(query)
26
- raise NotImplementedError
127
+ # Deletes one or many existing resources
128
+ #
129
+ # @example
130
+ # adapter.delete(collection) # => 1
131
+ #
132
+ # Adapters provide specific implementation of this method
133
+ #
134
+ # @param [Collection] collection
135
+ # collection of records to be deleted
136
+ #
137
+ # @return [Integer]
138
+ # the number of records deleted
139
+ #
140
+ # @api semipublic
141
+ def delete(collection)
142
+ raise NotImplementedError, "#{self.class}#delete not implemented"
27
143
  end
28
144
 
29
145
  protected
30
146
 
31
- def normalize_uri(uri_or_options)
32
- uri_or_options
147
+ # Set the serial value of the Resource
148
+ #
149
+ # @param [Resource] resource
150
+ # the resource to set the serial property in
151
+ # @param [Integer] id
152
+ # the identifier to set in the resource
153
+ #
154
+ # @return [undefined]
155
+ #
156
+ # @api semipublic
157
+ def initialize_serial(resource, next_id)
158
+ return unless serial = resource.model.serial(name)
159
+ return unless serial.get!(resource).nil?
160
+ serial.set!(resource, next_id)
161
+
162
+ # TODO: replace above with this, once
163
+ # specs can handle random, non-sequential ids
164
+ #serial.set!(resource, rand(2**32))
33
165
  end
34
166
 
35
- private
36
-
37
- # Instantiate an Adapter by passing it a DataMapper::Repository
38
- # connection string for configuration.
39
- def initialize(name, uri_or_options)
40
- assert_kind_of 'name', name, Symbol
41
- assert_kind_of 'uri_or_options', uri_or_options, Addressable::URI, DataObjects::URI, Hash, String
167
+ # Translate the attributes into a Hash with the field as the key
168
+ #
169
+ # @example
170
+ # attributes = { User.properties[:name] => 'Dan Kubb' }
171
+ # adapter.attributes_as_fields(attributes) # => { 'name' => 'Dan Kubb' }
172
+ #
173
+ # @param [Hash] attributes
174
+ # the attributes with the Property as the key
175
+ #
176
+ # @return [Hash]
177
+ # the attributes with the Property#field as the key
178
+ #
179
+ # @api semipublic
180
+ def attributes_as_fields(attributes)
181
+ attributes.map { |property, value| [ property.field, value ] }.to_hash
182
+ end
42
183
 
43
- @name = name
44
- @uri = normalize_uri(uri_or_options)
184
+ private
45
185
 
186
+ # Initialize an AbstractAdapter instance
187
+ #
188
+ # @param [Symbol] name
189
+ # the adapter repository name
190
+ # @param [Hash] options
191
+ # the adapter configuration options
192
+ #
193
+ # @return [undefined]
194
+ #
195
+ # @api semipublic
196
+ def initialize(name, options)
197
+ @name = name
198
+ @options = options.dup.freeze
46
199
  @resource_naming_convention = NamingConventions::Resource::UnderscoredAndPluralized
47
200
  @field_naming_convention = NamingConventions::Field::Underscored
48
-
49
- @transactions = {}
50
- end
51
-
52
- # TODO: move to dm-more/dm-migrations
53
- module Migration
54
- #
55
- # Returns whether the storage_name exists.
56
- #
57
- # @param storage_name<String> a String defining the name of a storage,
58
- # for example a table name.
59
- #
60
- # @return <Boolean> true if the storage exists
61
- #
62
- # TODO: move to dm-more/dm-migrations (if possible)
63
- def storage_exists?(storage_name)
64
- raise NotImplementedError
65
- end
66
-
67
- #
68
- # Returns whether the field exists.
69
- #
70
- # @param storage_name<String> a String defining the name of a storage, for example a table name.
71
- # @param field_name<String> a String defining the name of a field, for example a column name.
72
- #
73
- # @return <Boolean> true if the field exists.
74
- #
75
- # TODO: move to dm-more/dm-migrations (if possible)
76
- def field_exists?(storage_name, field_name)
77
- raise NotImplementedError
78
- end
79
-
80
- # TODO: move to dm-more/dm-migrations
81
- def upgrade_model_storage(repository, model)
82
- raise NotImplementedError
83
- end
84
-
85
- # TODO: move to dm-more/dm-migrations
86
- def create_model_storage(repository, model)
87
- raise NotImplementedError
88
- end
89
-
90
- # TODO: move to dm-more/dm-migrations
91
- def destroy_model_storage(repository, model)
92
- raise NotImplementedError
93
- end
94
-
95
- # TODO: move to dm-more/dm-migrations
96
- def alter_model_storage(repository, *args)
97
- raise NotImplementedError
98
- end
99
-
100
- # TODO: move to dm-more/dm-migrations
101
- def create_property_storage(repository, property)
102
- raise NotImplementedError
103
- end
104
-
105
- # TODO: move to dm-more/dm-migrations
106
- def destroy_property_storage(repository, property)
107
- raise NotImplementedError
108
- end
109
-
110
- # TODO: move to dm-more/dm-migrations
111
- def alter_property_storage(repository, *args)
112
- raise NotImplementedError
113
- end
114
-
115
- module ClassMethods
116
- # Default TypeMap for all adapters.
117
- #
118
- # @return <DataMapper::TypeMap> default TypeMap
119
- #
120
- # TODO: move to dm-more/dm-migrations
121
- def type_map
122
- @type_map ||= TypeMap.new
123
- end
124
- end
125
- end
126
-
127
- include Migration
128
- extend Migration::ClassMethods
129
-
130
- # TODO: move to dm-more/dm-transaction
131
- module Transaction
132
- #
133
- # Pushes the given Transaction onto the per thread Transaction stack so
134
- # that everything done by this Adapter is done within the context of said
135
- # Transaction.
136
- #
137
- # @param transaction<DataMapper::Transaction> a Transaction to be the
138
- # 'current' transaction until popped.
139
- #
140
- # TODO: move to dm-more/dm-transaction
141
- def push_transaction(transaction)
142
- transactions(Thread.current) << transaction
143
- end
144
-
145
- #
146
- # Pop the 'current' Transaction from the per thread Transaction stack so
147
- # that everything done by this Adapter is no longer necessarily within the
148
- # context of said Transaction.
149
- #
150
- # @return <DataMapper::Transaction> the former 'current' transaction.
151
- #
152
- # TODO: move to dm-more/dm-transaction
153
- def pop_transaction
154
- transactions(Thread.current).pop
155
- end
156
-
157
- #
158
- # Retrieve the current transaction for this Adapter.
159
- #
160
- # Everything done by this Adapter is done within the context of this
161
- # Transaction.
162
- #
163
- # @return <DataMapper::Transaction> the 'current' transaction for this Adapter.
164
- #
165
- # TODO: move to dm-more/dm-transaction
166
- def current_transaction
167
- transactions(Thread.current).last
168
- end
169
-
170
- #
171
- # Returns whether we are within a Transaction.
172
- #
173
- # @return <Boolean> whether we are within a Transaction.
174
- #
175
- # TODO: move to dm-more/dm-transaction
176
- def within_transaction?
177
- !current_transaction.nil?
178
- end
179
-
180
- #
181
- # Produces a fresh transaction primitive for this Adapter
182
- #
183
- # Used by DataMapper::Transaction to perform its various tasks.
184
- #
185
- # @return <Object> a new Object that responds to :close, :begin, :commit,
186
- # :rollback, :rollback_prepared and :prepare
187
- #
188
- # TODO: move to dm-more/dm-transaction (if possible)
189
- def transaction_primitive
190
- raise NotImplementedError
191
- end
192
-
193
- private
194
- def transactions(thread)
195
- unless @transactions[thread]
196
- @transactions.delete_if do |key, value|
197
- !key.respond_to?(:alive?) || !key.alive?
198
- end
199
- @transactions[thread] = []
200
- end
201
- @transactions[thread]
202
- end
203
-
204
201
  end
205
-
206
- include Transaction
207
202
  end # class AbstractAdapter
203
+
204
+ const_added(:AbstractAdapter)
208
205
  end # module Adapters
209
206
  end # module DataMapper