active_replicas 0.1.6 → 0.1.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2506a129ec27e169dc050b24d1cac38bfe838aac
|
4
|
+
data.tar.gz: c9712f7e29a4864e13afd74bb3e9701863cb9460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 770acee1a9083324c4f90365ebb84a354c22860283e5175c9ee7670085ec4b8e53a0cf879412f13973951b6ea5876279583e64132027faf4216a57a0409dfea9
|
7
|
+
data.tar.gz: 633069d3114dc2c90e63d1e0280308ddf31ce089353e96e75353045bb9bac109b78cec13fad0d45ddf865d66c5b61e65ae50fb216d6c21316e79d4c15d988ef0
|
@@ -5,14 +5,17 @@ module ActiveReplicas
|
|
5
5
|
cattr_accessor :replica_delegated_methods
|
6
6
|
cattr_accessor :primary_delegated_methods
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
# All the methods which are safe to be delegated to a replica.
|
9
|
+
@@replica_delegated_methods = (
|
10
|
+
[
|
11
|
+
:active?, :clear_query_cache, :column_name_for_operation, :columns,
|
12
|
+
:disable_query_cache!, :disconnect!, :enable_query_cache!,
|
13
|
+
:query_cache_enabled, :quote_column_name, :quote_table_name,
|
14
|
+
:raw_connection, :reconnect!, :sanitize_limit, :schema_cache, :select,
|
15
|
+
:select_all, :select_one, :select_rows, :select_value, :select_values,
|
16
|
+
:substitute_at, :to_sql, :verify!
|
17
|
+
]
|
18
|
+
).uniq
|
16
19
|
|
17
20
|
# Rails methods that translate to SQL DDL (data definition language).
|
18
21
|
DDL_METHODS = [
|
@@ -30,12 +33,25 @@ module ActiveReplicas
|
|
30
33
|
:delete, :insert, :truncate, :update
|
31
34
|
]
|
32
35
|
|
36
|
+
# Rails methods that query whether or not the adapter or database engine
|
37
|
+
# supports a given feature.
|
38
|
+
SUPPORTS_METHODS = [
|
39
|
+
:supports_ddl_transactions?, :supports_explain?, :supports_extensions?,
|
40
|
+
:supports_foreign_keys?, :supports_index_sort_order?,
|
41
|
+
:supports_materialized_views?, :supports_migrations?,
|
42
|
+
:supports_partial_index?, :supports_primary_key?, :supports_ranges?,
|
43
|
+
:supports_statement_cache?, :supports_transaction_isolation?,
|
44
|
+
:supports_views?
|
45
|
+
]
|
46
|
+
|
33
47
|
@@primary_delegated_methods = (
|
34
48
|
DDL_METHODS +
|
35
49
|
CRUD_METHODS +
|
50
|
+
SUPPORTS_METHODS +
|
36
51
|
[
|
37
|
-
:
|
38
|
-
:
|
52
|
+
:assume_migrated_upto_version, :foreign_keys, :native_database_types,
|
53
|
+
:next_sequence_value, :prefetch_primary_key?, :tables,
|
54
|
+
:table_exists?, :transaction, :transaction_state
|
39
55
|
]
|
40
56
|
).uniq
|
41
57
|
|