marjoree 0.0.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.
Files changed (88) hide show
  1. data/README +50 -0
  2. data/examples/contains_example.rb +23 -0
  3. data/examples/count_and_insert_example.rb +20 -0
  4. data/examples/select_example.rb +27 -0
  5. data/html/classes/ExpectedResultSet.html +220 -0
  6. data/html/classes/ExpectedResultSet.src/M000001.html +18 -0
  7. data/html/classes/ExpectedResultSet.src/M000002.html +18 -0
  8. data/html/classes/ExpectedResultSet.src/M000003.html +18 -0
  9. data/html/classes/ExpectedResultSet.src/M000004.html +18 -0
  10. data/html/classes/Marjoree.html +568 -0
  11. data/html/classes/Marjoree.src/M000022.html +19 -0
  12. data/html/classes/Marjoree.src/M000023.html +20 -0
  13. data/html/classes/Marjoree.src/M000024.html +22 -0
  14. data/html/classes/Marjoree.src/M000025.html +18 -0
  15. data/html/classes/Marjoree.src/M000026.html +20 -0
  16. data/html/classes/Marjoree.src/M000027.html +18 -0
  17. data/html/classes/Marjoree.src/M000028.html +18 -0
  18. data/html/classes/Marjoree.src/M000029.html +21 -0
  19. data/html/classes/Marjoree.src/M000030.html +20 -0
  20. data/html/classes/Marjoree.src/M000031.html +19 -0
  21. data/html/classes/Marjoree.src/M000032.html +18 -0
  22. data/html/classes/Marjoree.src/M000033.html +18 -0
  23. data/html/classes/Marjoree.src/M000034.html +19 -0
  24. data/html/classes/Marjoree.src/M000035.html +21 -0
  25. data/html/classes/Marjoree.src/M000036.html +26 -0
  26. data/html/classes/Marjoree.src/M000037.html +22 -0
  27. data/html/classes/Marjoree.src/M000038.html +23 -0
  28. data/html/classes/Marjoree.src/M000039.html +24 -0
  29. data/html/classes/Marjoree.src/M000040.html +18 -0
  30. data/html/classes/Marjoree.src/M000041.html +18 -0
  31. data/html/classes/Marjoree.src/M000042.html +25 -0
  32. data/html/classes/ODBC/Error.html +152 -0
  33. data/html/classes/ODBC/Error.src/M000020.html +21 -0
  34. data/html/classes/ODBC/Error.src/M000021.html +18 -0
  35. data/html/classes/ODBC/TimeStamp.html +182 -0
  36. data/html/classes/ODBC/TimeStamp.src/M000017.html +18 -0
  37. data/html/classes/ODBC/TimeStamp.src/M000018.html +22 -0
  38. data/html/classes/ODBC/TimeStamp.src/M000019.html +19 -0
  39. data/html/classes/ODBC.html +108 -0
  40. data/html/classes/ResultSetWrapper.html +345 -0
  41. data/html/classes/ResultSetWrapper.src/M000005.html +27 -0
  42. data/html/classes/ResultSetWrapper.src/M000006.html +24 -0
  43. data/html/classes/ResultSetWrapper.src/M000007.html +23 -0
  44. data/html/classes/ResultSetWrapper.src/M000008.html +18 -0
  45. data/html/classes/ResultSetWrapper.src/M000009.html +18 -0
  46. data/html/classes/ResultSetWrapper.src/M000010.html +18 -0
  47. data/html/classes/ResultSetWrapper.src/M000011.html +18 -0
  48. data/html/classes/ResultSetWrapper.src/M000012.html +20 -0
  49. data/html/classes/ResultSetWrapper.src/M000013.html +18 -0
  50. data/html/classes/ResultSetWrapper.src/M000014.html +22 -0
  51. data/html/classes/ResultSetWrapper.src/M000015.html +23 -0
  52. data/html/classes/ResultSetWrapper.src/M000016.html +27 -0
  53. data/html/created.rid +1 -0
  54. data/html/files/README.html +159 -0
  55. data/html/files/lib/expected_result_set_rb.html +116 -0
  56. data/html/files/lib/marjoree_rb.html +110 -0
  57. data/html/files/lib/odbc_overrides_rb.html +101 -0
  58. data/html/files/lib/result_set_wrapper_rb.html +101 -0
  59. data/html/fr_class_index.html +32 -0
  60. data/html/fr_file_index.html +31 -0
  61. data/html/fr_method_index.html +68 -0
  62. data/html/index.html +24 -0
  63. data/html/rdoc-style.css +208 -0
  64. data/lib/expected_result_set.rb +35 -0
  65. data/lib/marjoree.rb +344 -0
  66. data/lib/odbc_overrides.rb +33 -0
  67. data/lib/result_set_wrapper.rb +193 -0
  68. data/rakefile.rb +38 -0
  69. data/tests/all_tests.rb +15 -0
  70. data/tests/sprocs/test_error_sproc.sp +11 -0
  71. data/tests/sprocs/test_sproc.sp +5 -0
  72. data/tests/sprocs/test_sproc_with_mixed_params.sp +15 -0
  73. data/tests/sprocs/test_sproc_with_output_params.sp +10 -0
  74. data/tests/sprocs/test_sproc_with_params.sp +9 -0
  75. data/tests/sprocs/test_sproc_with_select_and_ops.sp +12 -0
  76. data/tests/test_contains.rb +27 -0
  77. data/tests/test_delete.rb +47 -0
  78. data/tests/test_expected_result_set.rb +40 -0
  79. data/tests/test_insert.rb +47 -0
  80. data/tests/test_marjoree.rb +91 -0
  81. data/tests/test_num_rows.rb +32 -0
  82. data/tests/test_result_set_wrapper.rb +162 -0
  83. data/tests/test_select.rb +30 -0
  84. data/tests/test_sproc.rb +99 -0
  85. data/tests/test_time_stamp.rb +52 -0
  86. data/tests/test_truncate.rb +31 -0
  87. data/tests/test_update.rb +56 -0
  88. metadata +137 -0
@@ -0,0 +1,568 @@
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: Marjoree</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">Marjoree</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/marjoree_rb.html">
59
+ lib/marjoree.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ This is the main <a href="Marjoree.html">Marjoree</a> mixin.
78
+ </p>
79
+ <pre>
80
+ Before you call anything you will need to call 'connect' or no messages will reach your DB :o)
81
+ You might like to stick something like this in your test code to ensure the connection is dropped when you are finished.
82
+ Kernel.at_exit { disconnect }
83
+ </pre>
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+ <div id="method-list">
91
+ <h3 class="section-bar">Methods</h3>
92
+
93
+ <div class="name-list">
94
+ <a href="#M000040">assert_contains</a>&nbsp;&nbsp;
95
+ <a href="#M000037">assert_db_error</a>&nbsp;&nbsp;
96
+ <a href="#M000041">assert_does_not_contain</a>&nbsp;&nbsp;
97
+ <a href="#M000033">assert_empty</a>&nbsp;&nbsp;
98
+ <a href="#M000036">assert_error_thrown</a>&nbsp;&nbsp;
99
+ <a href="#M000035">assert_not_equal_results</a>&nbsp;&nbsp;
100
+ <a href="#M000034">assert_results</a>&nbsp;&nbsp;
101
+ <a href="#M000022">connect</a>&nbsp;&nbsp;
102
+ <a href="#M000028">contains?</a>&nbsp;&nbsp;
103
+ <a href="#M000027">count</a>&nbsp;&nbsp;
104
+ <a href="#M000031">delete</a>&nbsp;&nbsp;
105
+ <a href="#M000023">disconnect</a>&nbsp;&nbsp;
106
+ <a href="#M000042">execute</a>&nbsp;&nbsp;
107
+ <a href="#M000038">has_column_headers?</a>&nbsp;&nbsp;
108
+ <a href="#M000039">has_correct_data?</a>&nbsp;&nbsp;
109
+ <a href="#M000029">insert</a>&nbsp;&nbsp;
110
+ <a href="#M000026">num_rows</a>&nbsp;&nbsp;
111
+ <a href="#M000024">run_sproc</a>&nbsp;&nbsp;
112
+ <a href="#M000025">select</a>&nbsp;&nbsp;
113
+ <a href="#M000032">truncate</a>&nbsp;&nbsp;
114
+ <a href="#M000030">update</a>&nbsp;&nbsp;
115
+ </div>
116
+ </div>
117
+
118
+ </div>
119
+
120
+
121
+ <!-- if includes -->
122
+
123
+ <div id="section">
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <!-- if method_list -->
133
+ <div id="methods">
134
+ <h3 class="section-bar">Public Instance methods</h3>
135
+
136
+ <div id="method-M000040" class="method-detail">
137
+ <a name="M000040"></a>
138
+
139
+ <div class="method-heading">
140
+ <a href="Marjoree.src/M000040.html" target="Code" class="method-signature"
141
+ onclick="popupCode('Marjoree.src/M000040.html');return false;">
142
+ <span class="method-name">assert_contains</span><span class="method-args">( table_name, value_map )</span>
143
+ </a>
144
+ </div>
145
+
146
+ <div class="method-description">
147
+ <p>
148
+ Helpful Assert that wraps the contains? method.
149
+ </p>
150
+ </div>
151
+ </div>
152
+
153
+ <div id="method-M000037" class="method-detail">
154
+ <a name="M000037"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="Marjoree.src/M000037.html" target="Code" class="method-signature"
158
+ onclick="popupCode('Marjoree.src/M000037.html');return false;">
159
+ <span class="method-name">assert_db_error</span><span class="method-args">() {|| ...}</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p>
165
+ Asserts when the DB throws an error.
166
+ </p>
167
+ <p>
168
+ ie: Inserting into a table that does not exist.
169
+ </p>
170
+ </div>
171
+ </div>
172
+
173
+ <div id="method-M000041" class="method-detail">
174
+ <a name="M000041"></a>
175
+
176
+ <div class="method-heading">
177
+ <a href="Marjoree.src/M000041.html" target="Code" class="method-signature"
178
+ onclick="popupCode('Marjoree.src/M000041.html');return false;">
179
+ <span class="method-name">assert_does_not_contain</span><span class="method-args">( table_name, value_map )</span>
180
+ </a>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+ <p>
185
+ Helpful Assert that wraps the contains? method.
186
+ </p>
187
+ </div>
188
+ </div>
189
+
190
+ <div id="method-M000033" class="method-detail">
191
+ <a name="M000033"></a>
192
+
193
+ <div class="method-heading">
194
+ <a href="Marjoree.src/M000033.html" target="Code" class="method-signature"
195
+ onclick="popupCode('Marjoree.src/M000033.html');return false;">
196
+ <span class="method-name">assert_empty</span><span class="method-args">( result_set )</span>
197
+ </a>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+ <p>
202
+ Asserts that the <a href="ResultSetWrapper.html">ResultSetWrapper</a> is
203
+ empty
204
+ </p>
205
+ </div>
206
+ </div>
207
+
208
+ <div id="method-M000036" class="method-detail">
209
+ <a name="M000036"></a>
210
+
211
+ <div class="method-heading">
212
+ <a href="Marjoree.src/M000036.html" target="Code" class="method-signature"
213
+ onclick="popupCode('Marjoree.src/M000036.html');return false;">
214
+ <span class="method-name">assert_error_thrown</span><span class="method-args">( expected_error_code, expected_error_message ) {|| ...}</span>
215
+ </a>
216
+ </div>
217
+
218
+ <div class="method-description">
219
+ <p>
220
+ Asserts that an expected_error_code and error_message are returned when
221
+ running the block.
222
+ </p>
223
+ </div>
224
+ </div>
225
+
226
+ <div id="method-M000035" class="method-detail">
227
+ <a name="M000035"></a>
228
+
229
+ <div class="method-heading">
230
+ <a href="Marjoree.src/M000035.html" target="Code" class="method-signature"
231
+ onclick="popupCode('Marjoree.src/M000035.html');return false;">
232
+ <span class="method-name">assert_not_equal_results</span><span class="method-args">( expected, result_set )</span>
233
+ </a>
234
+ </div>
235
+
236
+ <div class="method-description">
237
+ <p>
238
+ Asserts that the values in the <a
239
+ href="ExpectedResultSet.html">ExpectedResultSet</a> are NOT contained
240
+ within the actual <a href="ResultSetWrapper.html">ResultSetWrapper</a>.
241
+ </p>
242
+ </div>
243
+ </div>
244
+
245
+ <div id="method-M000034" class="method-detail">
246
+ <a name="M000034"></a>
247
+
248
+ <div class="method-heading">
249
+ <a href="Marjoree.src/M000034.html" target="Code" class="method-signature"
250
+ onclick="popupCode('Marjoree.src/M000034.html');return false;">
251
+ <span class="method-name">assert_results</span><span class="method-args">( expected, result_set )</span>
252
+ </a>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+ <p>
257
+ Asserts that the values in the <a
258
+ href="ExpectedResultSet.html">ExpectedResultSet</a> are contained within
259
+ the actual <a href="ResultSetWrapper.html">ResultSetWrapper</a>.
260
+ </p>
261
+ </div>
262
+ </div>
263
+
264
+ <div id="method-M000022" class="method-detail">
265
+ <a name="M000022"></a>
266
+
267
+ <div class="method-heading">
268
+ <a href="Marjoree.src/M000022.html" target="Code" class="method-signature"
269
+ onclick="popupCode('Marjoree.src/M000022.html');return false;">
270
+ <span class="method-name">connect</span><span class="method-args">( odbc_name, username, password )</span>
271
+ </a>
272
+ </div>
273
+
274
+ <div class="method-description">
275
+ <p>
276
+ Establish a connection to dataserver.
277
+ </p>
278
+ </div>
279
+ </div>
280
+
281
+ <div id="method-M000028" class="method-detail">
282
+ <a name="M000028"></a>
283
+
284
+ <div class="method-heading">
285
+ <a href="Marjoree.src/M000028.html" target="Code" class="method-signature"
286
+ onclick="popupCode('Marjoree.src/M000028.html');return false;">
287
+ <span class="method-name">contains?</span><span class="method-args">( table_name, where_map={} )</span>
288
+ </a>
289
+ </div>
290
+
291
+ <div class="method-description">
292
+ <p>
293
+ Returns true if table &#8216;table_name&#8217; contains the data specified
294
+ in the where_map.
295
+ </p>
296
+ <p>
297
+ &#8216;where_map&#8217; supplies column_name_as_sym =&gt; value
298
+ </p>
299
+ <p>
300
+ These are AND&#8216;ed together.
301
+ </p>
302
+ </div>
303
+ </div>
304
+
305
+ <div id="method-M000027" class="method-detail">
306
+ <a name="M000027"></a>
307
+
308
+ <div class="method-heading">
309
+ <a href="Marjoree.src/M000027.html" target="Code" class="method-signature"
310
+ onclick="popupCode('Marjoree.src/M000027.html');return false;">
311
+ <span class="method-name">count</span><span class="method-args">( table_name, where_map = nil )</span>
312
+ </a>
313
+ </div>
314
+
315
+ <div class="method-description">
316
+ <p>
317
+ Does the same as <a href="Marjoree.html#M000026">num_rows</a>
318
+ </p>
319
+ </div>
320
+ </div>
321
+
322
+ <div id="method-M000031" class="method-detail">
323
+ <a name="M000031"></a>
324
+
325
+ <div class="method-heading">
326
+ <a href="Marjoree.src/M000031.html" target="Code" class="method-signature"
327
+ onclick="popupCode('Marjoree.src/M000031.html');return false;">
328
+ <span class="method-name">delete</span><span class="method-args">( table_name, where_map={} )</span>
329
+ </a>
330
+ </div>
331
+
332
+ <div class="method-description">
333
+ <p>
334
+ Performs an DELETE FROM &#8216;table_name&#8216;
335
+ </p>
336
+ <p>
337
+ &#8216;where_map&#8217; supplies column_name_as_sym =&gt; value for the
338
+ WHERE section of the UPDATE statement.
339
+ </p>
340
+ <p>
341
+ These are AND&#8216;ed together.
342
+ </p>
343
+ </div>
344
+ </div>
345
+
346
+ <div id="method-M000023" class="method-detail">
347
+ <a name="M000023"></a>
348
+
349
+ <div class="method-heading">
350
+ <a href="Marjoree.src/M000023.html" target="Code" class="method-signature"
351
+ onclick="popupCode('Marjoree.src/M000023.html');return false;">
352
+ <span class="method-name">disconnect</span><span class="method-args">()</span>
353
+ </a>
354
+ </div>
355
+
356
+ <div class="method-description">
357
+ <p>
358
+ Remove connection to dataserver.
359
+ </p>
360
+ </div>
361
+ </div>
362
+
363
+ <div id="method-M000042" class="method-detail">
364
+ <a name="M000042"></a>
365
+
366
+ <div class="method-heading">
367
+ <a href="Marjoree.src/M000042.html" target="Code" class="method-signature"
368
+ onclick="popupCode('Marjoree.src/M000042.html');return false;">
369
+ <span class="method-name">execute</span><span class="method-args">( sql )</span>
370
+ </a>
371
+ </div>
372
+
373
+ <div class="method-description">
374
+ <p>
375
+ Executes raw sql against the db.
376
+ </p>
377
+ </div>
378
+ </div>
379
+
380
+ <div id="method-M000038" class="method-detail">
381
+ <a name="M000038"></a>
382
+
383
+ <div class="method-heading">
384
+ <a href="Marjoree.src/M000038.html" target="Code" class="method-signature"
385
+ onclick="popupCode('Marjoree.src/M000038.html');return false;">
386
+ <span class="method-name">has_column_headers?</span><span class="method-args">( expected, result_set )</span>
387
+ </a>
388
+ </div>
389
+
390
+ <div class="method-description">
391
+ </div>
392
+ </div>
393
+
394
+ <div id="method-M000039" class="method-detail">
395
+ <a name="M000039"></a>
396
+
397
+ <div class="method-heading">
398
+ <a href="Marjoree.src/M000039.html" target="Code" class="method-signature"
399
+ onclick="popupCode('Marjoree.src/M000039.html');return false;">
400
+ <span class="method-name">has_correct_data?</span><span class="method-args">( expected, result_set )</span>
401
+ </a>
402
+ </div>
403
+
404
+ <div class="method-description">
405
+ </div>
406
+ </div>
407
+
408
+ <div id="method-M000029" class="method-detail">
409
+ <a name="M000029"></a>
410
+
411
+ <div class="method-heading">
412
+ <a href="Marjoree.src/M000029.html" target="Code" class="method-signature"
413
+ onclick="popupCode('Marjoree.src/M000029.html');return false;">
414
+ <span class="method-name">insert</span><span class="method-args">( table_name, value_map={} )</span>
415
+ </a>
416
+ </div>
417
+
418
+ <div class="method-description">
419
+ <p>
420
+ Performs an INSERT INTO &#8216;table_name&#8217;. &#8216;value_map&#8217;
421
+ supplies column_name_as_sym =&gt; value
422
+ </p>
423
+ </div>
424
+ </div>
425
+
426
+ <div id="method-M000026" class="method-detail">
427
+ <a name="M000026"></a>
428
+
429
+ <div class="method-heading">
430
+ <a href="Marjoree.src/M000026.html" target="Code" class="method-signature"
431
+ onclick="popupCode('Marjoree.src/M000026.html');return false;">
432
+ <span class="method-name">num_rows</span><span class="method-args">( table_name, where_map = nil )</span>
433
+ </a>
434
+ </div>
435
+
436
+ <div class="method-description">
437
+ <p>
438
+ Provides the number of rows in table &#8216;table_name&#8217;.
439
+ </p>
440
+ <p>
441
+ The where_map entries are AND&#8216;ed together eg:
442
+ </p>
443
+ <pre>
444
+ { :table_column_name_one =&gt; 1,
445
+ :table_column_name_two =&gt; 2 }
446
+ </pre>
447
+ <p>
448
+ would produce
449
+ </p>
450
+ <pre>
451
+ SELECT
452
+ *
453
+ FROM
454
+ table_name
455
+ WHERE
456
+ table_column_name_one = 1
457
+ AND table_column_name_two = 2
458
+ </pre>
459
+ </div>
460
+ </div>
461
+
462
+ <div id="method-M000024" class="method-detail">
463
+ <a name="M000024"></a>
464
+
465
+ <div class="method-heading">
466
+ <a href="Marjoree.src/M000024.html" target="Code" class="method-signature"
467
+ onclick="popupCode('Marjoree.src/M000024.html');return false;">
468
+ <span class="method-name">run_sproc</span><span class="method-args">( proc_name, input_param_map={} )</span>
469
+ </a>
470
+ </div>
471
+
472
+ <div class="method-description">
473
+ <p>
474
+ Run Store Procedure &#8216;proc_name&#8216;
475
+ </p>
476
+ <p>
477
+ The input_param_map takes the form of
478
+ </p>
479
+ <pre>
480
+ { :procedure_input_param_name =&gt; procedure_input_param_value }
481
+ </pre>
482
+ <p>
483
+ eg: result_set = EXEC &#8216;proc_name&#8217; @procedure_input_param_name =
484
+ procedure_input_param_value
485
+ </p>
486
+ <p>
487
+ If a proc has output parameters these are automatically bound onto the <a
488
+ href="ResultSetWrapper.html">ResultSetWrapper</a> object. eg: assert_equal(
489
+ expected_output_parameter_value, result_set.output_parameter_name )
490
+ </p>
491
+ </div>
492
+ </div>
493
+
494
+ <div id="method-M000025" class="method-detail">
495
+ <a name="M000025"></a>
496
+
497
+ <div class="method-heading">
498
+ <a href="Marjoree.src/M000025.html" target="Code" class="method-signature"
499
+ onclick="popupCode('Marjoree.src/M000025.html');return false;">
500
+ <span class="method-name">select</span><span class="method-args">( table_name )</span>
501
+ </a>
502
+ </div>
503
+
504
+ <div class="method-description">
505
+ <p>
506
+ Performs a select * on table_name
507
+ </p>
508
+ </div>
509
+ </div>
510
+
511
+ <div id="method-M000032" class="method-detail">
512
+ <a name="M000032"></a>
513
+
514
+ <div class="method-heading">
515
+ <a href="Marjoree.src/M000032.html" target="Code" class="method-signature"
516
+ onclick="popupCode('Marjoree.src/M000032.html');return false;">
517
+ <span class="method-name">truncate</span><span class="method-args">( table_name )</span>
518
+ </a>
519
+ </div>
520
+
521
+ <div class="method-description">
522
+ <p>
523
+ Performs an TRUNCATE TABLE &#8216;table_name&#8216;
524
+ </p>
525
+ </div>
526
+ </div>
527
+
528
+ <div id="method-M000030" class="method-detail">
529
+ <a name="M000030"></a>
530
+
531
+ <div class="method-heading">
532
+ <a href="Marjoree.src/M000030.html" target="Code" class="method-signature"
533
+ onclick="popupCode('Marjoree.src/M000030.html');return false;">
534
+ <span class="method-name">update</span><span class="method-args">( table_name, where_map={}, set_map={} )</span>
535
+ </a>
536
+ </div>
537
+
538
+ <div class="method-description">
539
+ <p>
540
+ Performs an UPDATE &#8216;table_name&#8216;
541
+ </p>
542
+ <p>
543
+ &#8216;where_map&#8217; supplies column_name_as_sym =&gt; value for the
544
+ WHERE section of the UPDATE statement.
545
+ </p>
546
+ <p>
547
+ These are AND&#8216;ed together.
548
+ </p>
549
+ <p>
550
+ &#8216;set_map&#8217; supplies column_name_as_sym =&gt; value for the SET
551
+ section of the UPDATE statement.
552
+ </p>
553
+ </div>
554
+ </div>
555
+
556
+
557
+ </div>
558
+
559
+
560
+ </div>
561
+
562
+
563
+ <div id="validator-badges">
564
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
565
+ </div>
566
+
567
+ </body>
568
+ </html>
@@ -0,0 +1,19 @@
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>
7
+ <head>
8
+ <title>connect (Marjoree)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/marjoree.rb, line 11</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect</span>( <span class="ruby-identifier">odbc_name</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span> )
15
+ <span class="ruby-identifier">$db</span> = <span class="ruby-constant">ODBC</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">odbc_name</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span> )
16
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Connected&quot;</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,20 @@
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>
7
+ <head>
8
+ <title>disconnect (Marjoree)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/marjoree.rb, line 17</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect</span>
15
+ <span class="ruby-identifier">$db</span>.<span class="ruby-identifier">drop_all</span>
16
+ <span class="ruby-identifier">$db</span>.<span class="ruby-identifier">disconnect</span>
17
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Disconnected&quot;</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>run_sproc (Marjoree)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/marjoree.rb, line 33</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_sproc</span>( <span class="ruby-identifier">proc_name</span>, <span class="ruby-identifier">input_param_map</span>={} )
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_output_params?</span>( <span class="ruby-identifier">proc_name</span> )
16
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">run_complex_sproc</span>( <span class="ruby-identifier">proc_name</span>, <span class="ruby-identifier">input_param_map</span> )
17
+ <span class="ruby-keyword kw">else</span>
18
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">run_simple_sproc</span>( <span class="ruby-identifier">proc_name</span>, <span class="ruby-identifier">input_param_map</span> )
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>select (Marjoree)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/marjoree.rb, line 42</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select</span>( <span class="ruby-identifier">table_name</span> )
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ResultSetWrapper</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">execute</span>( <span class="ruby-node">&quot;SELECT * FROM #{table_name}&quot;</span> ) )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,20 @@
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>
7
+ <head>
8
+ <title>num_rows (Marjoree)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/marjoree.rb, line 59</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">num_rows</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</span> = <span class="ruby-keyword kw">nil</span> )
15
+ <span class="ruby-identifier">where_clause</span> = <span class="ruby-identifier">build_where_statement</span>( <span class="ruby-identifier">where_map</span> )
16
+ <span class="ruby-identifier">dbCall</span> = <span class="ruby-identifier">execute</span>( <span class="ruby-node">&quot;SELECT COUNT(*) FROM #{table_name} #{where_clause}&quot;</span> )
17
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">to_a</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>]
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>