data_objects 0.10.9 → 0.10.10

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.
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.10.10 2012-10-11
2
+
3
+ * JRuby performance improvements
4
+ * Reconnect added on JRuby
5
+ * do\_sqlite3 C driver supports busy\_timeout
6
+
1
7
  ## 0.10.9 2012-08-13
2
8
 
3
9
  * Don't try to escape queries when no binding parameters are given
@@ -119,7 +119,7 @@ module DataObjects
119
119
 
120
120
  # Create a Command object of the right subclass using the given text
121
121
  def create_command(text)
122
- concrete_command.new(self, text)
122
+ self.class.concrete_command.new(self, text)
123
123
  end
124
124
 
125
125
  def extension
@@ -132,19 +132,10 @@ module DataObjects
132
132
  DataObjects::const_get(self.class.name.split('::')[-2])
133
133
  end
134
134
 
135
- def concrete_command
136
- @concrete_command || begin
137
-
138
- class << self
139
- private
140
- def concrete_command
141
- @concrete_command
142
- end
143
- end
144
-
145
- @concrete_command = DataObjects::const_get(self.class.name.split('::')[-2]).const_get('Command')
146
- end
135
+ def self.concrete_command
136
+ @concrete_command ||= DataObjects::const_get(self.name.split('::')[-2]).const_get('Command')
147
137
  end
148
138
 
149
139
  end
140
+
150
141
  end
@@ -98,33 +98,37 @@ module DataObjects
98
98
  end
99
99
 
100
100
  def self.included(target)
101
- target.class_eval do
102
- class << self
103
- alias __new new
104
- end
101
+ lock.synchronize do
102
+ unless target.respond_to? :__pools
103
+ target.class_eval do
104
+ class << self
105
+ alias __new new
106
+ end
105
107
 
106
- @__pools = {}
107
- @__pool_lock = Mutex.new
108
- @__pool_wait = ConditionVariable.new
108
+ @__pools = {}
109
+ @__pool_lock = Mutex.new
110
+ @__pool_wait = ConditionVariable.new
109
111
 
110
- def self.__pool_lock
111
- @__pool_lock
112
- end
112
+ def self.__pool_lock
113
+ @__pool_lock
114
+ end
113
115
 
114
- def self.__pool_wait
115
- @__pool_wait
116
- end
116
+ def self.__pool_wait
117
+ @__pool_wait
118
+ end
117
119
 
118
- def self.new(*args)
119
- (@__pools[args] ||= __pool_lock.synchronize { Pool.new(self.pool_size, self, args) }).new
120
- end
120
+ def self.new(*args)
121
+ (@__pools[args] ||= __pool_lock.synchronize { Pool.new(self.pool_size, self, args) }).new
122
+ end
121
123
 
122
- def self.__pools
123
- @__pools
124
- end
124
+ def self.__pools
125
+ @__pools
126
+ end
125
127
 
126
- def self.pool_size
127
- 8
128
+ def self.pool_size
129
+ 8
130
+ end
131
+ end
128
132
  end
129
133
  end
130
134
  end
@@ -1,3 +1,3 @@
1
1
  module DataObjects
2
- VERSION = '0.10.9'
2
+ VERSION = '0.10.10'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 10
8
- - 9
9
- version: 0.10.9
8
+ - 10
9
+ version: 0.10.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dirkjan Bussink