master_slave_adapter_soundcloud 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/master_slave_adapter.rb +15 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/master_slave_adapter.rb
CHANGED
@@ -142,7 +142,7 @@ module ActiveRecord
|
|
142
142
|
# try random slave, else fall back to master
|
143
143
|
slave = slave_connection!
|
144
144
|
conn =
|
145
|
-
if !open_transaction? && slave_clock(slave)
|
145
|
+
if !open_transaction? && slave_clock(slave).try(:>=, clock)
|
146
146
|
[ slave, :slave ]
|
147
147
|
else
|
148
148
|
[ master_connection, :master ]
|
@@ -249,6 +249,20 @@ module ActiveRecord
|
|
249
249
|
:release_savepoint,
|
250
250
|
:current_savepoint_name,
|
251
251
|
:begin_db_transaction,
|
252
|
+
:outside_transaction?,
|
253
|
+
:add_limit!,
|
254
|
+
:add_limit_offset!,
|
255
|
+
:add_lock!,
|
256
|
+
:default_sequence_name,
|
257
|
+
:reset_sequence!,
|
258
|
+
:insert_fixture,
|
259
|
+
:empty_insert_statement,
|
260
|
+
:case_sensitive_equality_operator,
|
261
|
+
:limited_update_conditions,
|
262
|
+
:insert_sql,
|
263
|
+
:update_sql,
|
264
|
+
:delete_sql,
|
265
|
+
:sanitize_limit,
|
252
266
|
:to => :master_connection
|
253
267
|
delegate *ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods,
|
254
268
|
:to => :master_connection
|