activerecord-multi-tenant 2.0.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/active-record-multi-tenant-tests.yml +83 -0
  3. data/.gitignore +6 -0
  4. data/.readthedocs.yaml +15 -0
  5. data/.rspec +0 -0
  6. data/.rubocop.yml +51 -0
  7. data/Appraisals +6 -22
  8. data/CHANGELOG.md +42 -0
  9. data/Gemfile +3 -1
  10. data/LICENSE +0 -0
  11. data/README.md +3 -2
  12. data/Rakefile +1 -1
  13. data/activerecord-multi-tenant.gemspec +28 -22
  14. data/docker-compose.yml +24 -18
  15. data/docs/.gitignore +3 -0
  16. data/docs/Makefile +28 -0
  17. data/docs/api-reference.sh +10 -0
  18. data/docs/requirements.in +4 -0
  19. data/docs/requirements.txt +62 -0
  20. data/docs/source/_static/api-reference/ActiveRecord/Associations/Association.html +285 -0
  21. data/docs/source/_static/api-reference/ActiveRecord/Associations/ClassMethods.html +255 -0
  22. data/docs/source/_static/api-reference/ActiveRecord/Associations.html +117 -0
  23. data/docs/source/_static/api-reference/ActiveRecord/ConnectionAdapters/SchemaStatements.html +232 -0
  24. data/docs/source/_static/api-reference/ActiveRecord/ConnectionAdapters.html +126 -0
  25. data/docs/source/_static/api-reference/ActiveRecord/QueryMethods.html +336 -0
  26. data/docs/source/_static/api-reference/ActiveRecord/SchemaDumper.html +121 -0
  27. data/docs/source/_static/api-reference/ActiveRecord.html +130 -0
  28. data/docs/source/_static/api-reference/MultiTenant/ArelTenantVisitor.html +755 -0
  29. data/docs/source/_static/api-reference/MultiTenant/ArelVisitorsDepthFirst.html +208 -0
  30. data/docs/source/_static/api-reference/MultiTenant/BaseTenantEnforcementClause.html +462 -0
  31. data/docs/source/_static/api-reference/MultiTenant/Context.html +659 -0
  32. data/docs/source/_static/api-reference/MultiTenant/ControllerExtensions.html +202 -0
  33. data/docs/source/_static/api-reference/MultiTenant/CopyFromClient.html +186 -0
  34. data/docs/source/_static/api-reference/MultiTenant/CopyFromClientHelper.html +362 -0
  35. data/docs/source/_static/api-reference/MultiTenant/Current.html +124 -0
  36. data/docs/source/_static/api-reference/MultiTenant/DatabaseStatements.html +366 -0
  37. data/docs/source/_static/api-reference/MultiTenant/FastTruncate.html +226 -0
  38. data/docs/source/_static/api-reference/MultiTenant/MigrationExtensions.html +554 -0
  39. data/docs/source/_static/api-reference/MultiTenant/MissingTenantError.html +124 -0
  40. data/docs/source/_static/api-reference/MultiTenant/ModelExtensionsClassMethods.html +492 -0
  41. data/docs/source/_static/api-reference/MultiTenant/QueryMonitor.html +257 -0
  42. data/docs/source/_static/api-reference/MultiTenant/Table.html +419 -0
  43. data/docs/source/_static/api-reference/MultiTenant/TenantEnforcementClause.html +148 -0
  44. data/docs/source/_static/api-reference/MultiTenant/TenantIsImmutable.html +135 -0
  45. data/docs/source/_static/api-reference/MultiTenant/TenantJoinEnforcementClause.html +310 -0
  46. data/docs/source/_static/api-reference/MultiTenant/TenantValueVisitor.html +239 -0
  47. data/docs/source/_static/api-reference/MultiTenant.html +1454 -0
  48. data/docs/source/_static/api-reference/MultiTenantFindBy.html +180 -0
  49. data/docs/source/_static/api-reference/Sidekiq/Client.html +302 -0
  50. data/docs/source/_static/api-reference/Sidekiq/Middleware/MultiTenant/Client.html +217 -0
  51. data/docs/source/_static/api-reference/Sidekiq/Middleware/MultiTenant/Server.html +219 -0
  52. data/docs/source/_static/api-reference/Sidekiq/Middleware/MultiTenant.html +126 -0
  53. data/docs/source/_static/api-reference/Sidekiq.html +126 -0
  54. data/docs/source/_static/api-reference/_index.html +399 -0
  55. data/docs/source/_static/api-reference/class_list.html +51 -0
  56. data/docs/source/_static/api-reference/css/common.css +1 -0
  57. data/docs/source/_static/api-reference/css/full_list.css +58 -0
  58. data/docs/source/_static/api-reference/css/style.css +497 -0
  59. data/docs/source/_static/api-reference/file.README.html +167 -0
  60. data/docs/source/_static/api-reference/file_list.html +56 -0
  61. data/docs/source/_static/api-reference/frames.html +17 -0
  62. data/docs/source/_static/api-reference/index.html +167 -0
  63. data/docs/source/_static/api-reference/js/app.js +314 -0
  64. data/docs/source/_static/api-reference/js/full_list.js +216 -0
  65. data/docs/source/_static/api-reference/js/jquery.js +4 -0
  66. data/docs/source/_static/api-reference/method_list.html +715 -0
  67. data/docs/source/_static/api-reference/top-level-namespace.html +126 -0
  68. data/docs/source/_templates/.gitignore +4 -0
  69. data/docs/source/api-reference.rst +8 -0
  70. data/docs/source/appendix.rst +26 -0
  71. data/docs/source/changelog.rst +8 -0
  72. data/docs/source/community-and-support.rst +26 -0
  73. data/docs/source/conf.py +30 -0
  74. data/docs/source/contributing.rst +70 -0
  75. data/docs/source/getting-started.rst +37 -0
  76. data/docs/source/guides-and-tutorials.rst +129 -0
  77. data/docs/source/index.rst +54 -0
  78. data/docs/source/introduction.rst +33 -0
  79. data/docs/source/license.rst +22 -0
  80. data/docs/source/troubleshooting.rst +41 -0
  81. data/docs/source/usage-guide.rst +59 -0
  82. data/lib/activerecord-multi-tenant/arel_visitors_depth_first.rb +183 -174
  83. data/lib/activerecord-multi-tenant/controller_extensions.rb +15 -4
  84. data/lib/activerecord-multi-tenant/copy_from_client.rb +4 -0
  85. data/lib/activerecord-multi-tenant/fast_truncate.rb +4 -2
  86. data/lib/activerecord-multi-tenant/habtm.rb +50 -0
  87. data/lib/activerecord-multi-tenant/migrations.rb +87 -10
  88. data/lib/activerecord-multi-tenant/model_extensions.rb +96 -38
  89. data/lib/activerecord-multi-tenant/multi_tenant.rb +83 -24
  90. data/lib/activerecord-multi-tenant/query_monitor.rb +21 -5
  91. data/lib/activerecord-multi-tenant/query_rewriter.rb +121 -87
  92. data/lib/activerecord-multi-tenant/sidekiq.rb +46 -19
  93. data/lib/activerecord-multi-tenant/table_node.rb +13 -0
  94. data/lib/activerecord-multi-tenant/version.rb +1 -1
  95. data/lib/activerecord-multi-tenant.rb +3 -13
  96. data/lib/activerecord_multi_tenant.rb +13 -0
  97. data/spec/activerecord-multi-tenant/associations_spec.rb +42 -0
  98. data/spec/activerecord-multi-tenant/controller_extensions_spec.rb +3 -2
  99. data/spec/activerecord-multi-tenant/fast_truncate_spec.rb +8 -6
  100. data/spec/activerecord-multi-tenant/model_extensions_spec.rb +300 -147
  101. data/spec/activerecord-multi-tenant/multi_tenant_spec.rb +69 -13
  102. data/spec/activerecord-multi-tenant/query_rewriter_spec.rb +60 -59
  103. data/spec/activerecord-multi-tenant/record_callback_spec.rb +0 -0
  104. data/spec/activerecord-multi-tenant/record_finding_spec.rb +11 -11
  105. data/spec/activerecord-multi-tenant/record_modifications_spec.rb +23 -4
  106. data/spec/activerecord-multi-tenant/sidekiq_spec.rb +10 -10
  107. data/spec/database.yml +0 -0
  108. data/spec/schema.rb +20 -3
  109. data/spec/spec_helper.rb +46 -17
  110. data/spec/support/format_sql.rb +20 -0
  111. metadata +134 -32
  112. data/.github/workflows/CI.yml +0 -73
  113. data/gemfiles/.bundle/config +0 -2
  114. data/gemfiles/active_record_5.2.3.gemfile +0 -16
  115. data/gemfiles/active_record_5.2.gemfile +0 -16
  116. data/gemfiles/active_record_6.0.gemfile +0 -8
  117. data/gemfiles/active_record_6.1.gemfile +0 -8
  118. data/gemfiles/active_record_7.0.gemfile +0 -8
  119. data/gemfiles/rails_5.2.3.gemfile +0 -16
  120. data/gemfiles/rails_5.2.gemfile +0 -16
  121. data/gemfiles/rails_6.0.gemfile +0 -8
  122. data/gemfiles/rails_6.1.gemfile +0 -8
  123. data/gemfiles/rails_7.0.gemfile +0 -8
  124. data/lib/activerecord-multi-tenant/persistence_extension.rb +0 -13
  125. data/lib/activerecord-multi-tenant/with_lock.rb +0 -15
  126. data/spec/activerecord-multi-tenant/schema_dumper_tester.rb +0 -0
@@ -0,0 +1,148 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: MultiTenant::TenantEnforcementClause
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "MultiTenant::TenantEnforcementClause";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MultiTenant.html" title="MultiTenant (module)">MultiTenant</a></span></span>
41
+ &raquo;
42
+ <span class="title">TenantEnforcementClause</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: MultiTenant::TenantEnforcementClause
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Arel::Nodes::Node</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></li>
80
+
81
+ <li class="next">MultiTenant::TenantEnforcementClause</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/activerecord-multi-tenant/query_rewriter.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>Instance Attribute Summary</h2>
113
+
114
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></h3>
115
+ <p class="inherited"><span class='object_link'><a href="BaseTenantEnforcementClause.html#tenant_attribute-instance_method" title="MultiTenant::BaseTenantEnforcementClause#tenant_attribute (method)">#tenant_attribute</a></span></p>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>Method Summary</h2>
126
+
127
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></h3>
128
+ <p class="inherited"><span class='object_link'><a href="BaseTenantEnforcementClause.html#initialize-instance_method" title="MultiTenant::BaseTenantEnforcementClause#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="BaseTenantEnforcementClause.html#to_s-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="BaseTenantEnforcementClause.html#to_sql-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_sql (method)">#to_sql</a></span>, <span class='object_link'><a href="BaseTenantEnforcementClause.html#to_str-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_str (method)">#to_str</a></span></p>
129
+
130
+ <div id="constructor_details" class="method_details_list">
131
+ <h2>Constructor Details</h2>
132
+
133
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseTenantEnforcementClause.html#initialize-instance_method" title="MultiTenant::BaseTenantEnforcementClause#initialize (method)">MultiTenant::BaseTenantEnforcementClause</a></span></p>
134
+
135
+ </div>
136
+
137
+
138
+ </div>
139
+
140
+ <div id="footer">
141
+ Generated on Sat May 27 10:16:24 2023 by
142
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
143
+ 0.9.34 (ruby-3.2.2).
144
+ </div>
145
+
146
+ </div>
147
+ </body>
148
+ </html>
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: MultiTenant::TenantIsImmutable
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "MultiTenant::TenantIsImmutable";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MultiTenant.html" title="MultiTenant (module)">MultiTenant</a></span></span>
41
+ &raquo;
42
+ <span class="title">TenantIsImmutable</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: MultiTenant::TenantIsImmutable
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">MultiTenant::TenantIsImmutable</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/activerecord-multi-tenant/multi_tenant.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>This exception is raised when a there is an attempt to change tenant</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ </div>
126
+
127
+ <div id="footer">
128
+ Generated on Sat May 27 10:16:24 2023 by
129
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
+ 0.9.34 (ruby-3.2.2).
131
+ </div>
132
+
133
+ </div>
134
+ </body>
135
+ </html>
@@ -0,0 +1,310 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: MultiTenant::TenantJoinEnforcementClause
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "MultiTenant::TenantJoinEnforcementClause";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MultiTenant.html" title="MultiTenant (module)">MultiTenant</a></span></span>
41
+ &raquo;
42
+ <span class="title">TenantJoinEnforcementClause</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: MultiTenant::TenantJoinEnforcementClause
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Arel::Nodes::Node</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></li>
80
+
81
+ <li class="next">MultiTenant::TenantJoinEnforcementClause</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/activerecord-multi-tenant/query_rewriter.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#table_left-instance_method" title="#table_left (instance method)">#<strong>table_left</strong> &#x21d2; Object </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+ <span class="note title readonly">readonly</span>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <span class="summary_desc"><div class='inline'>
136
+ <p>Returns the value of attribute table_left.</p>
137
+ </div></span>
138
+
139
+ </li>
140
+
141
+
142
+ </ul>
143
+
144
+
145
+
146
+
147
+
148
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></h3>
149
+ <p class="inherited"><span class='object_link'><a href="BaseTenantEnforcementClause.html#tenant_attribute-instance_method" title="MultiTenant::BaseTenantEnforcementClause#tenant_attribute (method)">#tenant_attribute</a></span></p>
150
+
151
+
152
+
153
+ <h2>
154
+ Instance Method Summary
155
+ <small><a href="#" class="summary_toggle">collapse</a></small>
156
+ </h2>
157
+
158
+ <ul class="summary">
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(tenant_attribute, table_left) &#x21d2; TenantJoinEnforcementClause </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+ <span class="note title constructor">constructor</span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'>
180
+ <p>A new instance of TenantJoinEnforcementClause.</p>
181
+ </div></span>
182
+
183
+ </li>
184
+
185
+
186
+ </ul>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseTenantEnforcementClause.html" title="MultiTenant::BaseTenantEnforcementClause (class)">BaseTenantEnforcementClause</a></span></h3>
199
+ <p class="inherited"><span class='object_link'><a href="BaseTenantEnforcementClause.html#to_s-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="BaseTenantEnforcementClause.html#to_sql-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_sql (method)">#to_sql</a></span>, <span class='object_link'><a href="BaseTenantEnforcementClause.html#to_str-instance_method" title="MultiTenant::BaseTenantEnforcementClause#to_str (method)">#to_str</a></span></p>
200
+
201
+ <div id="constructor_details" class="method_details_list">
202
+ <h2>Constructor Details</h2>
203
+
204
+ <div class="method_details first">
205
+ <h3 class="signature first" id="initialize-instance_method">
206
+
207
+ #<strong>initialize</strong>(tenant_attribute, table_left) &#x21d2; <tt><span class='object_link'><a href="" title="MultiTenant::TenantJoinEnforcementClause (class)">TenantJoinEnforcementClause</a></span></tt>
208
+
209
+
210
+
211
+
212
+
213
+ </h3><div class="docstring">
214
+ <div class="discussion">
215
+
216
+ <p>Returns a new instance of TenantJoinEnforcementClause.</p>
217
+
218
+
219
+ </div>
220
+ </div>
221
+ <div class="tags">
222
+
223
+
224
+ </div><table class="source_code">
225
+ <tr>
226
+ <td>
227
+ <pre class="lines">
228
+
229
+
230
+ 215
231
+ 216
232
+ 217
233
+ 218
234
+ 219</pre>
235
+ </td>
236
+ <td>
237
+ <pre class="code"><span class="info file"># File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 215</span>
238
+
239
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_tenant_attribute'>tenant_attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_table_left'>table_left</span><span class='rparen'>)</span>
240
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_tenant_attribute'>tenant_attribute</span><span class='rparen'>)</span>
241
+ <span class='ivar'>@table_left</span> <span class='op'>=</span> <span class='id identifier rubyid_table_left'>table_left</span>
242
+ <span class='ivar'>@model_left</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../MultiTenant.html" title="MultiTenant (module)">MultiTenant</a></span></span><span class='period'>.</span><span class='id identifier rubyid_multi_tenant_model_for_table'><span class='object_link'><a href="../MultiTenant.html#multi_tenant_model_for_table-class_method" title="MultiTenant.multi_tenant_model_for_table (method)">multi_tenant_model_for_table</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_table_left'>table_left</span><span class='period'>.</span><span class='id identifier rubyid_table_name'>table_name</span><span class='rparen'>)</span>
243
+ <span class='kw'>end</span></pre>
244
+ </td>
245
+ </tr>
246
+ </table>
247
+ </div>
248
+
249
+ </div>
250
+
251
+ <div id="instance_attr_details" class="attr_details">
252
+ <h2>Instance Attribute Details</h2>
253
+
254
+
255
+ <span id=""></span>
256
+ <div class="method_details first">
257
+ <h3 class="signature first" id="table_left-instance_method">
258
+
259
+ #<strong>table_left</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
260
+
261
+
262
+
263
+
264
+
265
+ </h3><div class="docstring">
266
+ <div class="discussion">
267
+
268
+ <p>Returns the value of attribute table_left.</p>
269
+
270
+
271
+ </div>
272
+ </div>
273
+ <div class="tags">
274
+
275
+
276
+ </div><table class="source_code">
277
+ <tr>
278
+ <td>
279
+ <pre class="lines">
280
+
281
+
282
+ 213
283
+ 214
284
+ 215</pre>
285
+ </td>
286
+ <td>
287
+ <pre class="code"><span class="info file"># File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 213</span>
288
+
289
+ <span class='kw'>def</span> <span class='id identifier rubyid_table_left'>table_left</span>
290
+ <span class='ivar'>@table_left</span>
291
+ <span class='kw'>end</span></pre>
292
+ </td>
293
+ </tr>
294
+ </table>
295
+ </div>
296
+
297
+ </div>
298
+
299
+
300
+ </div>
301
+
302
+ <div id="footer">
303
+ Generated on Sat May 27 10:16:24 2023 by
304
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
305
+ 0.9.34 (ruby-3.2.2).
306
+ </div>
307
+
308
+ </div>
309
+ </body>
310
+ </html>