mack-orm 0.7.0.1 → 0.7.1

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.
@@ -0,0 +1,127 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mack-orm/database_rb.html">
59
+ lib/mack-orm/database.rb
60
+ </a>
61
+ <br />
62
+ <a href="../files/lib/mack-orm/database_migrations_rb.html">
63
+ lib/mack-orm/database_migrations.rb
64
+ </a>
65
+ <br />
66
+ <a href="../files/lib/mack-orm/generators_rb.html">
67
+ lib/mack-orm/generators.rb
68
+ </a>
69
+ <br />
70
+ <a href="../files/lib/mack-orm/genosaurus_helpers_rb.html">
71
+ lib/mack-orm/genosaurus_helpers.rb
72
+ </a>
73
+ <br />
74
+ <a href="../files/lib/mack-orm/model_column_rb.html">
75
+ lib/mack-orm/model_column.rb
76
+ </a>
77
+ <br />
78
+ </td>
79
+ </tr>
80
+
81
+ </table>
82
+ </div>
83
+ <!-- banner header -->
84
+
85
+ <div id="bodyContent">
86
+
87
+
88
+
89
+ <div id="contextContent">
90
+
91
+
92
+
93
+ </div>
94
+
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+ <div id="class-list">
104
+ <h3 class="section-bar">Classes and Modules</h3>
105
+
106
+ Module <a href="Mack/Database.html" class="link">Mack::Database</a><br />
107
+
108
+ </div>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+
118
+
119
+ </div>
120
+
121
+
122
+ <div id="validator-badges">
123
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
124
+ </div>
125
+
126
+ </body>
127
+ </html>
@@ -0,0 +1,323 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::Database</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Database</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mack-orm/database_rb.html">
59
+ lib/mack-orm/database.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/mack-orm/database_migrations_rb.html">
63
+ lib/mack-orm/database_migrations.rb
64
+ </a>
65
+ <br />
66
+ <a href="../../files/lib/mack-orm/generators_rb.html">
67
+ lib/mack-orm/generators.rb
68
+ </a>
69
+ <br />
70
+ </td>
71
+ </tr>
72
+
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000003">clear_connection</a>&nbsp;&nbsp;
92
+ <a href="#M000004">create</a>&nbsp;&nbsp;
93
+ <a href="#M000005">drop</a>&nbsp;&nbsp;
94
+ <a href="#M000008">dump_structure</a>&nbsp;&nbsp;
95
+ <a href="#M000002">establish_connection</a>&nbsp;&nbsp;
96
+ <a href="#M000007">load_structure</a>&nbsp;&nbsp;
97
+ <a href="#M000006">recreate</a>&nbsp;&nbsp;
98
+ </div>
99
+ </div>
100
+
101
+ </div>
102
+
103
+
104
+ <!-- if includes -->
105
+
106
+ <div id="section">
107
+
108
+ <div id="class-list">
109
+ <h3 class="section-bar">Classes and Modules</h3>
110
+
111
+ Module <a href="Database/Generators.html" class="link">Mack::Database::Generators</a><br />
112
+ Module <a href="Database/Migrations.html" class="link">Mack::Database::Migrations</a><br />
113
+
114
+ </div>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <!-- if method_list -->
123
+ <div id="methods">
124
+ <h3 class="section-bar">Public Class methods</h3>
125
+
126
+ <div id="method-M000003" class="method-detail">
127
+ <a name="M000003"></a>
128
+
129
+ <div class="method-heading">
130
+ <a href="#M000003" class="method-signature">
131
+ <span class="method-name">clear_connection</span><span class="method-args">(env = Mack.env)</span>
132
+ </a>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+ <p>
137
+ Clears connections to the database
138
+ </p>
139
+ <p><a class="source-toggle" href="#"
140
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000003-source">
142
+ <pre>
143
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 11</span>
144
+ 11: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clear_connection</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>)
145
+ 12: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:clear_connection</span>)
146
+ 13: <span class="ruby-keyword kw">end</span>
147
+ </pre>
148
+ </div>
149
+ </div>
150
+ </div>
151
+
152
+ <div id="method-M000004" class="method-detail">
153
+ <a name="M000004"></a>
154
+
155
+ <div class="method-heading">
156
+ <a href="#M000004" class="method-signature">
157
+ <span class="method-name">create</span><span class="method-args">(env = Mack.env, repis = :default)</span>
158
+ </a>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+ <p>
163
+ Creates a database, if it doesn&#8216;t already exist for the specified
164
+ environment
165
+ </p>
166
+ <p><a class="source-toggle" href="#"
167
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
168
+ <div class="method-source-code" id="M000004-source">
169
+ <pre>
170
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 16</span>
171
+ 16: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
172
+ 17: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:create</span>)
173
+ 18: <span class="ruby-keyword kw">end</span>
174
+ </pre>
175
+ </div>
176
+ </div>
177
+ </div>
178
+
179
+ <div id="method-M000005" class="method-detail">
180
+ <a name="M000005"></a>
181
+
182
+ <div class="method-heading">
183
+ <a href="#M000005" class="method-signature">
184
+ <span class="method-name">drop</span><span class="method-args">(env = Mack.env, repis = :default)</span>
185
+ </a>
186
+ </div>
187
+
188
+ <div class="method-description">
189
+ <p>
190
+ Drops a database, if it exists for the specified environment
191
+ </p>
192
+ <p><a class="source-toggle" href="#"
193
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
194
+ <div class="method-source-code" id="M000005-source">
195
+ <pre>
196
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 21</span>
197
+ 21: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drop</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
198
+ 22: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:drop</span>)
199
+ 23: <span class="ruby-keyword kw">end</span>
200
+ </pre>
201
+ </div>
202
+ </div>
203
+ </div>
204
+
205
+ <div id="method-M000008" class="method-detail">
206
+ <a name="M000008"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="#M000008" class="method-signature">
210
+ <span class="method-name">dump_structure</span><span class="method-args">(env = Mack.env, repis = :default)</span>
211
+ </a>
212
+ </div>
213
+
214
+ <div class="method-description">
215
+ <p>
216
+ Dumps the structure of the database to a file.
217
+ </p>
218
+ <p><a class="source-toggle" href="#"
219
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
220
+ <div class="method-source-code" id="M000008-source">
221
+ <pre>
222
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 37</span>
223
+ 37: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dump_structure</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
224
+ 38: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:dump_structure</span>)
225
+ 39: <span class="ruby-keyword kw">end</span>
226
+ </pre>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+ <div id="method-M000002" class="method-detail">
232
+ <a name="M000002"></a>
233
+
234
+ <div class="method-heading">
235
+ <a href="#M000002" class="method-signature">
236
+ <span class="method-name">establish_connection</span><span class="method-args">(env = Mack.env)</span>
237
+ </a>
238
+ </div>
239
+
240
+ <div class="method-description">
241
+ <p>
242
+ Sets up and establishes connections to the database based on the specified
243
+ environment and the settings in the database.yml file.
244
+ </p>
245
+ <p><a class="source-toggle" href="#"
246
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
247
+ <div class="method-source-code" id="M000002-source">
248
+ <pre>
249
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 6</span>
250
+ 6: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>)
251
+ 7: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:establish_connection</span>)
252
+ 8: <span class="ruby-keyword kw">end</span>
253
+ </pre>
254
+ </div>
255
+ </div>
256
+ </div>
257
+
258
+ <div id="method-M000007" class="method-detail">
259
+ <a name="M000007"></a>
260
+
261
+ <div class="method-heading">
262
+ <a href="#M000007" class="method-signature">
263
+ <span class="method-name">load_structure</span><span class="method-args">(file, env = Mack.env, repis = :default)</span>
264
+ </a>
265
+ </div>
266
+
267
+ <div class="method-description">
268
+ <p>
269
+ Loads the structure of the given file into the database
270
+ </p>
271
+ <p><a class="source-toggle" href="#"
272
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
273
+ <div class="method-source-code" id="M000007-source">
274
+ <pre>
275
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 32</span>
276
+ 32: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_structure</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
277
+ 33: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:load_structure</span>)
278
+ 34: <span class="ruby-keyword kw">end</span>
279
+ </pre>
280
+ </div>
281
+ </div>
282
+ </div>
283
+
284
+ <div id="method-M000006" class="method-detail">
285
+ <a name="M000006"></a>
286
+
287
+ <div class="method-heading">
288
+ <a href="#M000006" class="method-signature">
289
+ <span class="method-name">recreate</span><span class="method-args">(env = Mack.env, repis = :default)</span>
290
+ </a>
291
+ </div>
292
+
293
+ <div class="method-description">
294
+ <p>
295
+ Drops and then creates the database.
296
+ </p>
297
+ <p><a class="source-toggle" href="#"
298
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
299
+ <div class="method-source-code" id="M000006-source">
300
+ <pre>
301
+ <span class="ruby-comment cmt"># File lib/mack-orm/database.rb, line 26</span>
302
+ 26: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">recreate</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
303
+ 27: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">drop</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span>)
304
+ 28: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span>)
305
+ 29: <span class="ruby-keyword kw">end</span>
306
+ </pre>
307
+ </div>
308
+ </div>
309
+ </div>
310
+
311
+
312
+ </div>
313
+
314
+
315
+ </div>
316
+
317
+
318
+ <div id="validator-badges">
319
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
320
+ </div>
321
+
322
+ </body>
323
+ </html>