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,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>count (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 66</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</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-keyword kw">return</span> <span class="ruby-identifier">num_rows</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</span> )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>contains? (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 75</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contains?</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</span>={} )
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">count</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</span> ) <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>insert (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 81</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">value_map</span>={} )
15
+ <span class="ruby-identifier">columns</span> = <span class="ruby-identifier">build_column_headers</span>(<span class="ruby-identifier">value_map</span> )
16
+ <span class="ruby-identifier">values</span> = <span class="ruby-identifier">build_column_values</span>( <span class="ruby-identifier">value_map</span>)
17
+
18
+ <span class="ruby-identifier">execute</span>( <span class="ruby-node">&quot;INSERT INTO #{table_name} (#{columns}) VALUES (#{values})&quot;</span> )
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </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>update (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 95</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</span>={}, <span class="ruby-identifier">set_map</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">assignments</span> = <span class="ruby-identifier">build_set_statement</span>( <span class="ruby-identifier">set_map</span> )
17
+ <span class="ruby-identifier">execute</span>( <span class="ruby-node">&quot;UPDATE #{table_name} SET #{assignments} #{where_clause}&quot;</span> )
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </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>delete (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 106</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">where_map</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">execute</span>( <span class="ruby-node">&quot;DELETE FROM #{table_name} #{where_clause}&quot;</span> )
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </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>truncate (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 112</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">truncate</span>( <span class="ruby-identifier">table_name</span> )
15
+ <span class="ruby-identifier">execute</span>( <span class="ruby-node">&quot;TRUNCATE TABLE #{table_name}&quot;</span> )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>assert_empty (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 117</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_empty</span>( <span class="ruby-identifier">result_set</span> )
15
+ <span class="ruby-identifier">assert_equal</span>( <span class="ruby-value">0</span>, <span class="ruby-identifier">result_set</span>.<span class="ruby-identifier">hashes</span>.<span class="ruby-identifier">size</span> )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>assert_results (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 122</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_results</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
15
+ <span class="ruby-identifier">assert_column_headers</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
16
+ <span class="ruby-identifier">assert_row_data</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,21 @@
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>assert_not_equal_results (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 128</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_not_equal_results</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
15
+ <span class="ruby-identifier">flag1</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">has_column_headers?</span>(<span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span>)
16
+ <span class="ruby-identifier">flag2</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">has_correct_data?</span>(<span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span>)
17
+
18
+ <span class="ruby-identifier">assert</span>( <span class="ruby-operator">!</span><span class="ruby-identifier">flag1</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">has_correct_data?</span>(<span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span>) )
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,26 @@
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>assert_error_thrown (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 136</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_error_thrown</span>( <span class="ruby-identifier">expected_error_code</span>, <span class="ruby-identifier">expected_error_message</span> )
15
+ <span class="ruby-keyword kw">begin</span>
16
+ <span class="ruby-keyword kw">yield</span>
17
+ <span class="ruby-identifier">fail</span>
18
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ODBC</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
19
+ <span class="ruby-identifier">exception</span> = <span class="ruby-identifier">$!</span>
20
+
21
+ <span class="ruby-identifier">assert_equal</span>( <span class="ruby-identifier">expected_error_code</span>, <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">error_code</span> )
22
+ <span class="ruby-identifier">assert_equal</span>( <span class="ruby-identifier">expected_error_message</span>, <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">error_message</span> )
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span></pre>
25
+ </body>
26
+ </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>assert_db_error (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 151</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_db_error</span>
15
+ <span class="ruby-keyword kw">begin</span>
16
+ <span class="ruby-keyword kw">yield</span>
17
+ <span class="ruby-identifier">fail</span>
18
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ODBC</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</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,23 @@
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>has_column_headers? (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 159</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_column_headers?</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
15
+ <span class="ruby-keyword kw">begin</span>
16
+ <span class="ruby-identifier">assert_column_headers</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
17
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
18
+ <span class="ruby-keyword kw">rescue</span>
19
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,24 @@
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>has_correct_data? (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 168</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_correct_data?</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
15
+
16
+ <span class="ruby-keyword kw">begin</span>
17
+ <span class="ruby-identifier">assert_row_data</span>( <span class="ruby-identifier">expected</span>, <span class="ruby-identifier">result_set</span> )
18
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
19
+ <span class="ruby-keyword kw">rescue</span>
20
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>assert_contains (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 179</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_contains</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">value_map</span> )
15
+ <span class="ruby-identifier">assert</span>( <span class="ruby-identifier">contains?</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">value_map</span> ) )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>assert_does_not_contain (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 184</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_does_not_contain</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">value_map</span> )
15
+ <span class="ruby-identifier">assert</span>( <span class="ruby-operator">!</span><span class="ruby-identifier">contains?</span>( <span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">value_map</span> ) )
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,25 @@
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>execute (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 189</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute</span>( <span class="ruby-identifier">sql</span> )
15
+ <span class="ruby-identifier">dbCall</span> = <span class="ruby-identifier">$db</span>.<span class="ruby-identifier">prepare</span>( <span class="ruby-identifier">sql</span> )
16
+ <span class="ruby-keyword kw">begin</span>
17
+ <span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">execute</span>
18
+ <span class="ruby-keyword kw">rescue</span>
19
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ODBC</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Failed executing: #{sql}\nDue to: #{$!}&quot;</span>)
20
+ <span class="ruby-keyword kw">end</span>
21
+
22
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">dbCall</span>
23
+ <span class="ruby-keyword kw">end</span></pre>
24
+ </body>
25
+ </html>
@@ -0,0 +1,152 @@
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>Class: ODBC::Error</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>Class</strong></td>
53
+ <td class="class-name-in-header">ODBC::Error</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/odbc_overrides_rb.html">
59
+ lib/odbc_overrides.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000020">error_code</a>&nbsp;&nbsp;
90
+ <a href="#M000021">error_message</a>&nbsp;&nbsp;
91
+ </div>
92
+ </div>
93
+
94
+ </div>
95
+
96
+
97
+ <!-- if includes -->
98
+
99
+ <div id="section">
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <!-- if method_list -->
109
+ <div id="methods">
110
+ <h3 class="section-bar">Public Instance methods</h3>
111
+
112
+ <div id="method-M000020" class="method-detail">
113
+ <a name="M000020"></a>
114
+
115
+ <div class="method-heading">
116
+ <a href="Error.src/M000020.html" target="Code" class="method-signature"
117
+ onclick="popupCode('Error.src/M000020.html');return false;">
118
+ <span class="method-name">error_code</span><span class="method-args">()</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ </div>
124
+ </div>
125
+
126
+ <div id="method-M000021" class="method-detail">
127
+ <a name="M000021"></a>
128
+
129
+ <div class="method-heading">
130
+ <a href="Error.src/M000021.html" target="Code" class="method-signature"
131
+ onclick="popupCode('Error.src/M000021.html');return false;">
132
+ <span class="method-name">error_message</span><span class="method-args">()</span>
133
+ </a>
134
+ </div>
135
+
136
+ <div class="method-description">
137
+ </div>
138
+ </div>
139
+
140
+
141
+ </div>
142
+
143
+
144
+ </div>
145
+
146
+
147
+ <div id="validator-badges">
148
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
149
+ </div>
150
+
151
+ </body>
152
+ </html>
@@ -0,0 +1,21 @@
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>error_code (ODBC::Error)</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/odbc_overrides.rb, line 23</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_code</span>
15
+ <span class="ruby-identifier">start_index</span> = <span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(\()/</span>
16
+ <span class="ruby-identifier">end_index</span> = <span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(\))/</span>
17
+ <span class="ruby-identifier">end_index</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
18
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">slice</span>( (<span class="ruby-identifier">start_index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> ), (<span class="ruby-identifier">end_index</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start_index</span> ) ).<span class="ruby-identifier">to_i</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </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>error_message (ODBC::Error)</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/odbc_overrides.rb, line 30</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_message</span>
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>( <span class="ruby-regexp re">/\]/</span> ).<span class="ruby-identifier">last</span>.<span class="ruby-identifier">rstrip!</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>