marjoree 0.0.1 → 0.0.9
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.
- data/Marjoree.iml +14 -0
- data/README +9 -36
- data/bin/create_marj_structure.rb +75 -0
- data/bin/create_odbc_connections.rb +39 -0
- data/bin/odbc_connection_finder.rb +46 -0
- data/examples/contains_example.rb +1 -1
- data/examples/count_and_insert_example.rb +1 -1
- data/examples/select_example.rb +1 -1
- data/html/classes/ExpectedResultSet.html +60 -33
- data/html/classes/ExpectedResultSet.src/M000002.html +6 -5
- data/html/classes/ExpectedResultSet.src/M000003.html +5 -5
- data/html/classes/ExpectedResultSet.src/M000004.html +5 -5
- data/html/classes/ExpectedResultSet.src/M000005.html +18 -0
- data/html/classes/ExpectedResultSet.src/M000006.html +24 -0
- data/html/classes/ExpectedResultSet.src/M000007.html +23 -0
- data/html/classes/ExpectedResultSet.src/M000008.html +29 -0
- data/html/classes/Fixnum.html +287 -0
- data/html/classes/Fixnum.src/M000031.html +18 -0
- data/html/classes/Fixnum.src/M000034.html +18 -0
- data/html/classes/Fixnum.src/M000037.html +18 -0
- data/html/classes/Fixnum.src/M000039.html +18 -0
- data/html/classes/Fixnum.src/M000041.html +18 -0
- data/html/classes/Hash.html +156 -0
- data/html/classes/Hash.src/M000009.html +21 -0
- data/html/classes/Hash.src/M000010.html +20 -0
- data/html/classes/Marjoree.html +268 -151
- data/html/classes/Marjoree.src/M000057.html +19 -0
- data/html/classes/Marjoree.src/M000058.html +18 -0
- data/html/classes/{ExpectedResultSet.src/M000001.html → Marjoree.src/M000059.html} +4 -4
- data/html/classes/Marjoree.src/{M000024.html → M000060.html} +4 -4
- data/html/classes/Marjoree.src/{M000031.html → M000061.html} +4 -4
- data/html/classes/Marjoree.src/{M000026.html → M000062.html} +3 -3
- data/html/classes/Marjoree.src/{M000027.html → M000063.html} +3 -3
- data/html/classes/Marjoree.src/{M000028.html → M000064.html} +3 -3
- data/html/classes/Marjoree.src/{M000029.html → M000065.html} +5 -6
- data/html/classes/Marjoree.src/{M000030.html → M000066.html} +5 -5
- data/html/classes/Marjoree.src/M000067.html +19 -0
- data/html/classes/Marjoree.src/{M000032.html → M000068.html} +3 -3
- data/html/classes/{ResultSetWrapper.src/M000009.html → Marjoree.src/M000069.html} +4 -4
- data/html/classes/{ResultSetWrapper.src/M000010.html → Marjoree.src/M000070.html} +4 -4
- data/html/classes/{ResultSetWrapper.src/M000011.html → Marjoree.src/M000071.html} +4 -4
- data/html/classes/Marjoree.src/M000072.html +20 -0
- data/html/classes/Marjoree.src/M000073.html +20 -0
- data/html/classes/Marjoree.src/M000074.html +20 -0
- data/html/classes/Marjoree.src/{M000033.html → M000075.html} +3 -3
- data/html/classes/Marjoree.src/{M000034.html → M000076.html} +4 -4
- data/html/classes/Marjoree.src/{M000035.html → M000077.html} +2 -2
- data/html/classes/Marjoree.src/{M000036.html → M000078.html} +4 -3
- data/html/classes/Marjoree.src/{M000037.html → M000079.html} +1 -1
- data/html/classes/Marjoree.src/{M000038.html → M000080.html} +3 -3
- data/html/classes/Marjoree.src/{M000039.html → M000081.html} +3 -4
- data/html/classes/Marjoree.src/{M000040.html → M000082.html} +3 -3
- data/html/classes/Marjoree.src/{M000041.html → M000083.html} +3 -3
- data/html/classes/{ResultSetWrapper.src/M000008.html → Marjoree.src/M000084.html} +4 -4
- data/html/classes/ODBC.html +4 -0
- data/html/classes/ODBC/Error.html +12 -12
- data/html/classes/ODBC/Error.src/M000047.html +21 -0
- data/html/classes/ODBC/Error.src/{M000021.html → M000048.html} +2 -2
- data/html/classes/ODBC/TimeStamp.html +48 -18
- data/html/classes/ODBC/TimeStamp.src/{M000017.html → M000042.html} +2 -2
- data/html/classes/ODBC/TimeStamp.src/M000043.html +22 -0
- data/html/classes/ODBC/TimeStamp.src/{M000019.html → M000044.html} +2 -3
- data/html/classes/ODBC/TimeStamp.src/M000045.html +18 -0
- data/html/classes/ODBC/TimeStamp.src/M000046.html +18 -0
- data/html/classes/OdbcConnectionWrapper.html +244 -0
- data/html/classes/OdbcConnectionWrapper.src/M000023.html +18 -0
- data/html/classes/OdbcConnectionWrapper.src/M000024.html +18 -0
- data/html/classes/OdbcConnectionWrapper.src/M000025.html +22 -0
- data/html/classes/OdbcConnectionWrapper.src/M000026.html +25 -0
- data/html/classes/OdbcConnectionWrapper.src/M000027.html +20 -0
- data/html/classes/OdbcConnectionWrapper.src/M000028.html +28 -0
- data/html/classes/OdbcConnectionWrapper.src/M000029.html +24 -0
- data/html/classes/OdbcConnectionWrapper.src/M000030.html +30 -0
- data/html/classes/{ResultSetWrapper.html → ResultSet.html} +71 -94
- data/html/classes/ResultSet.src/M000011.html +27 -0
- data/html/classes/ResultSet.src/M000012.html +21 -0
- data/html/classes/ResultSet.src/M000013.html +23 -0
- data/html/classes/ResultSet.src/M000014.html +18 -0
- data/html/classes/ResultSet.src/M000015.html +18 -0
- data/html/classes/ResultSet.src/M000016.html +18 -0
- data/html/classes/ResultSet.src/M000017.html +18 -0
- data/html/classes/ResultSet.src/M000018.html +20 -0
- data/html/classes/ResultSet.src/M000019.html +18 -0
- data/html/classes/ResultSet.src/M000020.html +22 -0
- data/html/classes/ResultSet.src/M000021.html +23 -0
- data/html/classes/ResultSet.src/M000022.html +22 -0
- data/html/classes/Test.html +107 -0
- data/html/classes/Test/Unit.html +107 -0
- data/html/classes/Test/Unit/TestCase.html +257 -0
- data/html/classes/Test/Unit/TestCase.src/M000049.html +18 -0
- data/html/classes/Test/Unit/TestCase.src/M000050.html +18 -0
- data/html/classes/Test/Unit/TestCase.src/M000051.html +17 -0
- data/html/classes/Test/Unit/TestCase.src/M000052.html +17 -0
- data/html/classes/Test/Unit/TestCase.src/M000053.html +25 -0
- data/html/classes/Test/Unit/TestCase.src/M000054.html +18 -0
- data/html/classes/Test/Unit/TestCase.src/M000055.html +18 -0
- data/html/classes/Test/Unit/TestCase.src/M000056.html +35 -0
- data/html/created.rid +1 -1
- data/html/files/README.html +2 -51
- data/html/files/lib/expected_result_set_rb.html +1 -16
- data/html/files/lib/marjoree/core_rb.html +111 -0
- data/html/files/lib/marjoree/fixtures_rb.html +111 -0
- data/html/files/lib/marjoree/odbc_connection_wrapper_rb.html +109 -0
- data/html/files/lib/marjoree/odbc_rb.html +108 -0
- data/html/files/lib/{odbc_overrides_rb.html → marjoree/result_set_rb.html} +5 -5
- data/html/files/lib/{result_set_wrapper_rb.html → marjoree/time_rb.html} +5 -5
- data/html/files/lib/marjoree_rb.html +3 -4
- data/html/files/lib/run_marjoree_rb.html +145 -0
- data/html/files/lib/run_marjoree_rb.src/M000001.html +34 -0
- data/html/fr_class_index.html +7 -1
- data/html/fr_file_index.html +7 -2
- data/html/fr_method_index.html +84 -42
- data/lib/Marjoree.iml +12 -0
- data/lib/expected_result_set.rb +51 -24
- data/lib/marjoree.rb +2 -344
- data/lib/marjoree/core.rb +388 -0
- data/lib/marjoree/fixtures.rb +156 -0
- data/lib/marjoree/odbc.rb +45 -0
- data/lib/marjoree/odbc_connection_wrapper.rb +79 -0
- data/lib/marjoree/result_set.rb +165 -0
- data/lib/marjoree/sybase_definitions.rb +223 -0
- data/lib/marjoree/time.rb +31 -0
- data/lib/proc_param_info.txt +20 -0
- data/lib/run_marjoree.rb +31 -0
- data/pkg/marjoree-0.0.9.gem +0 -0
- data/rakefile.rb +3 -3
- data/tests/all_cruby_tests.rb +24 -0
- data/tests/all_jruby_tests.rb +22 -0
- data/tests/all_tests.rb +9 -6
- data/tests/fixtures/A.yml +3 -0
- data/tests/fixtures/B.yml +5 -0
- data/tests/fixtures/first_db/FIRST.yml +8 -0
- data/tests/fixtures/second_db/SECOND.yml +9 -0
- data/tests/marjoree/test_assert_results.rb +82 -0
- data/tests/marjoree/test_connection_details.rb +44 -0
- data/tests/{test_contains.rb → marjoree/test_contains.rb} +0 -0
- data/tests/{test_delete.rb → marjoree/test_delete.rb} +0 -0
- data/tests/marjoree/test_drop_user_objects.rb +52 -0
- data/tests/marjoree/test_expected_result_set.rb +111 -0
- data/tests/marjoree/test_fixtures.rb +112 -0
- data/tests/{test_insert.rb → marjoree/test_insert.rb} +0 -0
- data/tests/{test_marjoree.rb → marjoree/test_marjoree.rb} +14 -2
- data/tests/marjoree/test_multiple_db_fixtures.rb +35 -0
- data/tests/{test_num_rows.rb → marjoree/test_num_rows.rb} +0 -0
- data/tests/marjoree/test_odbc_connection_wrapper.rb +47 -0
- data/tests/{test_result_set_wrapper.rb → marjoree/test_result_set_wrapper.rb} +8 -8
- data/tests/marjoree/test_select.rb +55 -0
- data/tests/marjoree/test_single_odbc_connection_wrapper.rb +39 -0
- data/tests/{test_sproc.rb → marjoree/test_sproc.rb} +3 -4
- data/tests/marjoree/test_time.rb +25 -0
- data/tests/{test_time_stamp.rb → marjoree/test_time_stamp.rb} +10 -1
- data/tests/{test_truncate.rb → marjoree/test_truncate.rb} +0 -0
- data/tests/{test_update.rb → marjoree/test_update.rb} +14 -14
- data/tests/multiple_odbc_config/connections.yml +13 -0
- data/tests/single_odbc_config/connections.yml +3 -0
- metadata +214 -112
- data/html/classes/Marjoree.src/M000022.html +0 -19
- data/html/classes/Marjoree.src/M000023.html +0 -20
- data/html/classes/Marjoree.src/M000025.html +0 -18
- data/html/classes/Marjoree.src/M000042.html +0 -25
- data/html/classes/ODBC/Error.src/M000020.html +0 -21
- data/html/classes/ODBC/TimeStamp.src/M000018.html +0 -22
- data/html/classes/ResultSetWrapper.src/M000005.html +0 -27
- data/html/classes/ResultSetWrapper.src/M000006.html +0 -24
- data/html/classes/ResultSetWrapper.src/M000007.html +0 -23
- data/html/classes/ResultSetWrapper.src/M000012.html +0 -20
- data/html/classes/ResultSetWrapper.src/M000013.html +0 -18
- data/html/classes/ResultSetWrapper.src/M000014.html +0 -22
- data/html/classes/ResultSetWrapper.src/M000015.html +0 -23
- data/html/classes/ResultSetWrapper.src/M000016.html +0 -27
- data/lib/odbc_overrides.rb +0 -33
- data/lib/result_set_wrapper.rb +0 -193
- data/tests/test_expected_result_set.rb +0 -40
- data/tests/test_select.rb +0 -30
|
@@ -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>odbc_config_path= (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 7</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">odbc_config_path=</span>(<span class="ruby-identifier">path</span>)
|
|
15
|
+
<span class="ruby-ivar">@@odbc_config_path</span> = <span class="ruby-identifier">path</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>odbc_config_path (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 11</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">odbc_config_path</span>
|
|
15
|
+
<span class="ruby-ivar">@@odbc_config_path</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</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>new (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 15</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
|
15
|
+
<span class="ruby-identifier">yaml</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">"#{OdbcConnectionWrapper.odbc_config_path}"</span>)
|
|
16
|
+
<span class="ruby-ivar">@odbc_config</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load</span>(<span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">yaml</span>).<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>))
|
|
17
|
+
<span class="ruby-ivar">@odbc_connections</span> = {}
|
|
18
|
+
<span class="ruby-ivar">@default_odbc_name</span> = <span class="ruby-ivar">@odbc_config</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@odbc_config</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@odbc_config</span>[<span class="ruby-value str">'default'</span>][<span class="ruby-value str">'odbc_connection'</span>]
|
|
19
|
+
<span class="ruby-identifier">connect_me_to</span>( <span class="ruby-value str">'default'</span> )
|
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</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>connect_me_to (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 23</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect_me_to</span>( <span class="ruby-identifier">odbc_name</span> )
|
|
15
|
+
<span class="ruby-identifier">odbc_name</span> = <span class="ruby-ivar">@default_odbc_name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">odbc_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'default'</span>
|
|
16
|
+
<span class="ruby-ivar">@connection</span> = <span class="ruby-ivar">@odbc_connections</span>[<span class="ruby-identifier">odbc_name</span>]
|
|
17
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@connection</span>
|
|
18
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@odbc_config</span>[<span class="ruby-identifier">odbc_name</span>]
|
|
19
|
+
<span class="ruby-ivar">@connection</span> = <span class="ruby-constant">ODBC</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">odbc_name</span>, <span class="ruby-identifier">value</span>[<span class="ruby-value str">'username'</span>], <span class="ruby-identifier">value</span>[<span class="ruby-value str">'password'</span>] )
|
|
20
|
+
<span class="ruby-ivar">@odbc_connections</span>[<span class="ruby-identifier">odbc_name</span>]=<span class="ruby-ivar">@connection</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
|
22
|
+
<span class="ruby-identifier">$db</span> = <span class="ruby-ivar">@connection</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
24
|
+
</body>
|
|
25
|
+
</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_me (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 34</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect_me</span>
|
|
15
|
+
<span class="ruby-ivar">@odbc_connections</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">odbc_name</span>, <span class="ruby-identifier">connection</span><span class="ruby-operator">|</span>
|
|
16
|
+
<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">drop_all</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
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 (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 40</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">output_params</span> = [])
|
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
|
16
|
+
<span class="ruby-identifier">dbCall</span> = <span class="ruby-ivar">@connection</span>.<span class="ruby-identifier">prepare</span>(<span class="ruby-identifier">sql</span>)
|
|
17
|
+
<span class="ruby-keyword kw">begin</span>
|
|
18
|
+
<span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">execute</span>
|
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">ResultSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dbCall</span>, <span class="ruby-identifier">output_params</span>)
|
|
20
|
+
<span class="ruby-keyword kw">rescue</span>
|
|
21
|
+
<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">"Failed executing: #{sql}\nDue to: #{$!}"</span>)
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
23
|
+
<span class="ruby-keyword kw">ensure</span>
|
|
24
|
+
<span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">drop</span>
|
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
27
|
+
</body>
|
|
28
|
+
</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_output_params? (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 54</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_output_params?</span>(<span class="ruby-identifier">proc_name</span>)
|
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
|
16
|
+
<span class="ruby-identifier">dbCall</span> = <span class="ruby-ivar">@connection</span>.<span class="ruby-identifier">procedure_columns</span> <span class="ruby-identifier">proc_name</span>
|
|
17
|
+
<span class="ruby-identifier">result_set</span> = <span class="ruby-constant">ResultSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dbCall</span>)
|
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result_set</span>.<span class="ruby-identifier">contains?</span>({ <span class="ruby-identifier">:COLUMN_TYPE</span> =<span class="ruby-operator">></span> <span class="ruby-value">4</span> })
|
|
19
|
+
<span class="ruby-keyword kw">ensure</span>
|
|
20
|
+
<span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">drop</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,30 @@
|
|
|
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>get_output_params (OdbcConnectionWrapper)</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/odbc_connection_wrapper.rb, line 64</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_output_params</span>(<span class="ruby-identifier">proc_name</span>)
|
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
|
16
|
+
<span class="ruby-identifier">dbCall</span> = <span class="ruby-ivar">@connection</span>.<span class="ruby-identifier">procedure_columns</span> <span class="ruby-identifier">proc_name</span>
|
|
17
|
+
<span class="ruby-identifier">result_set</span> = <span class="ruby-constant">ResultSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dbCall</span>)
|
|
18
|
+
<span class="ruby-identifier">result</span> = []
|
|
19
|
+
<span class="ruby-identifier">result_set</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
|
20
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:COLUMN_TYPE</span>] <span class="ruby-operator">==</span> <span class="ruby-value">4</span> <span class="ruby-comment cmt">#varchar</span>
|
|
21
|
+
<span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hash</span>
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
|
24
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
|
25
|
+
<span class="ruby-keyword kw">ensure</span>
|
|
26
|
+
<span class="ruby-identifier">dbCall</span>.<span class="ruby-identifier">drop</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
7
|
<head>
|
|
8
|
-
<title>Class:
|
|
8
|
+
<title>Class: ResultSet</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
11
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
<table class="header-table">
|
|
51
51
|
<tr class="top-aligned-row">
|
|
52
52
|
<td><strong>Class</strong></td>
|
|
53
|
-
<td class="class-name-in-header">
|
|
53
|
+
<td class="class-name-in-header">ResultSet</td>
|
|
54
54
|
</tr>
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../files/lib/
|
|
59
|
-
lib/
|
|
58
|
+
<a href="../files/lib/marjoree/result_set_rb.html">
|
|
59
|
+
lib/marjoree/result_set.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -86,18 +86,18 @@
|
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
|
87
87
|
|
|
88
88
|
<div class="name-list">
|
|
89
|
-
<a href="#
|
|
90
|
-
<a href="#
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
89
|
+
<a href="#M000012">apply_output_params</a>
|
|
90
|
+
<a href="#M000018">collect</a>
|
|
91
|
+
<a href="#M000020">contains?</a>
|
|
92
|
+
<a href="#M000021">contains_row?</a>
|
|
93
|
+
<a href="#M000015">count</a>
|
|
94
|
+
<a href="#M000017">empty?</a>
|
|
95
|
+
<a href="#M000019">has?</a>
|
|
96
|
+
<a href="#M000014">is_output_param?</a>
|
|
97
|
+
<a href="#M000013">method_missing</a>
|
|
98
|
+
<a href="#M000011">new</a>
|
|
99
|
+
<a href="#M000016">size</a>
|
|
100
|
+
<a href="#M000022">to_s</a>
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
103
|
|
|
@@ -137,13 +137,13 @@
|
|
|
137
137
|
<div id="methods">
|
|
138
138
|
<h3 class="section-bar">Public Class methods</h3>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000011" class="method-detail">
|
|
141
|
+
<a name="M000011"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="
|
|
145
|
-
onclick="popupCode('
|
|
146
|
-
<span class="method-name">new</span><span class="method-args">(
|
|
144
|
+
<a href="ResultSet.src/M000011.html" target="Code" class="method-signature"
|
|
145
|
+
onclick="popupCode('ResultSet.src/M000011.html');return false;">
|
|
146
|
+
<span class="method-name">new</span><span class="method-args">(statement, output_param_names = [])</span>
|
|
147
147
|
</a>
|
|
148
148
|
</div>
|
|
149
149
|
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
|
|
154
154
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
155
155
|
|
|
156
|
-
<div id="method-
|
|
157
|
-
<a name="
|
|
156
|
+
<div id="method-M000012" class="method-detail">
|
|
157
|
+
<a name="M000012"></a>
|
|
158
158
|
|
|
159
159
|
<div class="method-heading">
|
|
160
|
-
<a href="
|
|
161
|
-
onclick="popupCode('
|
|
162
|
-
<span class="method-name">apply_output_params</span><span class="method-args">(
|
|
160
|
+
<a href="ResultSet.src/M000012.html" target="Code" class="method-signature"
|
|
161
|
+
onclick="popupCode('ResultSet.src/M000012.html');return false;">
|
|
162
|
+
<span class="method-name">apply_output_params</span><span class="method-args">(output_param_names, statement)</span>
|
|
163
163
|
</a>
|
|
164
164
|
</div>
|
|
165
165
|
|
|
@@ -167,48 +167,41 @@
|
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
|
-
<div id="method-
|
|
171
|
-
<a name="
|
|
170
|
+
<div id="method-M000018" class="method-detail">
|
|
171
|
+
<a name="M000018"></a>
|
|
172
172
|
|
|
173
173
|
<div class="method-heading">
|
|
174
|
-
<a href="
|
|
175
|
-
onclick="popupCode('
|
|
174
|
+
<a href="ResultSet.src/M000018.html" target="Code" class="method-signature"
|
|
175
|
+
onclick="popupCode('ResultSet.src/M000018.html');return false;">
|
|
176
176
|
<span class="method-name">collect</span><span class="method-args">() {|hash| ...}</span>
|
|
177
177
|
</a>
|
|
178
178
|
</div>
|
|
179
179
|
|
|
180
180
|
<div class="method-description">
|
|
181
|
-
<p>
|
|
182
|
-
Iterates round each row applying a block.
|
|
183
|
-
</p>
|
|
184
181
|
</div>
|
|
185
182
|
</div>
|
|
186
183
|
|
|
187
|
-
<div id="method-
|
|
188
|
-
<a name="
|
|
184
|
+
<div id="method-M000020" class="method-detail">
|
|
185
|
+
<a name="M000020"></a>
|
|
189
186
|
|
|
190
187
|
<div class="method-heading">
|
|
191
|
-
<a href="
|
|
192
|
-
onclick="popupCode('
|
|
193
|
-
<span class="method-name">contains?</span><span class="method-args">(
|
|
188
|
+
<a href="ResultSet.src/M000020.html" target="Code" class="method-signature"
|
|
189
|
+
onclick="popupCode('ResultSet.src/M000020.html');return false;">
|
|
190
|
+
<span class="method-name">contains?</span><span class="method-args">(*expected_rows)</span>
|
|
194
191
|
</a>
|
|
195
192
|
</div>
|
|
196
193
|
|
|
197
194
|
<div class="method-description">
|
|
198
|
-
<p>
|
|
199
|
-
Returns true if the contents of the ‘expected_rows’ map is held
|
|
200
|
-
within self.
|
|
201
|
-
</p>
|
|
202
195
|
</div>
|
|
203
196
|
</div>
|
|
204
197
|
|
|
205
|
-
<div id="method-
|
|
206
|
-
<a name="
|
|
198
|
+
<div id="method-M000021" class="method-detail">
|
|
199
|
+
<a name="M000021"></a>
|
|
207
200
|
|
|
208
201
|
<div class="method-heading">
|
|
209
|
-
<a href="
|
|
210
|
-
onclick="popupCode('
|
|
211
|
-
<span class="method-name">contains_row?</span><span class="method-args">(
|
|
202
|
+
<a href="ResultSet.src/M000021.html" target="Code" class="method-signature"
|
|
203
|
+
onclick="popupCode('ResultSet.src/M000021.html');return false;">
|
|
204
|
+
<span class="method-name">contains_row?</span><span class="method-args">(expected)</span>
|
|
212
205
|
</a>
|
|
213
206
|
</div>
|
|
214
207
|
|
|
@@ -216,65 +209,55 @@ within self.
|
|
|
216
209
|
</div>
|
|
217
210
|
</div>
|
|
218
211
|
|
|
219
|
-
<div id="method-
|
|
220
|
-
<a name="
|
|
212
|
+
<div id="method-M000015" class="method-detail">
|
|
213
|
+
<a name="M000015"></a>
|
|
221
214
|
|
|
222
215
|
<div class="method-heading">
|
|
223
|
-
<a href="
|
|
224
|
-
onclick="popupCode('
|
|
216
|
+
<a href="ResultSet.src/M000015.html" target="Code" class="method-signature"
|
|
217
|
+
onclick="popupCode('ResultSet.src/M000015.html');return false;">
|
|
225
218
|
<span class="method-name">count</span><span class="method-args">()</span>
|
|
226
219
|
</a>
|
|
227
220
|
</div>
|
|
228
221
|
|
|
229
222
|
<div class="method-description">
|
|
230
|
-
<p>
|
|
231
|
-
Returns the number of rows in self.
|
|
232
|
-
</p>
|
|
233
223
|
</div>
|
|
234
224
|
</div>
|
|
235
225
|
|
|
236
|
-
<div id="method-
|
|
237
|
-
<a name="
|
|
226
|
+
<div id="method-M000017" class="method-detail">
|
|
227
|
+
<a name="M000017"></a>
|
|
238
228
|
|
|
239
229
|
<div class="method-heading">
|
|
240
|
-
<a href="
|
|
241
|
-
onclick="popupCode('
|
|
230
|
+
<a href="ResultSet.src/M000017.html" target="Code" class="method-signature"
|
|
231
|
+
onclick="popupCode('ResultSet.src/M000017.html');return false;">
|
|
242
232
|
<span class="method-name">empty?</span><span class="method-args">()</span>
|
|
243
233
|
</a>
|
|
244
234
|
</div>
|
|
245
235
|
|
|
246
236
|
<div class="method-description">
|
|
247
|
-
<p>
|
|
248
|
-
Returns true if self is contains zero rows.
|
|
249
|
-
</p>
|
|
250
237
|
</div>
|
|
251
238
|
</div>
|
|
252
239
|
|
|
253
|
-
<div id="method-
|
|
254
|
-
<a name="
|
|
240
|
+
<div id="method-M000019" class="method-detail">
|
|
241
|
+
<a name="M000019"></a>
|
|
255
242
|
|
|
256
243
|
<div class="method-heading">
|
|
257
|
-
<a href="
|
|
258
|
-
onclick="popupCode('
|
|
259
|
-
<span class="method-name">has?</span><span class="method-args">(
|
|
244
|
+
<a href="ResultSet.src/M000019.html" target="Code" class="method-signature"
|
|
245
|
+
onclick="popupCode('ResultSet.src/M000019.html');return false;">
|
|
246
|
+
<span class="method-name">has?</span><span class="method-args">(expected_result_set)</span>
|
|
260
247
|
</a>
|
|
261
248
|
</div>
|
|
262
249
|
|
|
263
250
|
<div class="method-description">
|
|
264
|
-
<p>
|
|
265
|
-
Returns true if the contents of the ‘expected_result_set’ is
|
|
266
|
-
held within self.
|
|
267
|
-
</p>
|
|
268
251
|
</div>
|
|
269
252
|
</div>
|
|
270
253
|
|
|
271
|
-
<div id="method-
|
|
272
|
-
<a name="
|
|
254
|
+
<div id="method-M000014" class="method-detail">
|
|
255
|
+
<a name="M000014"></a>
|
|
273
256
|
|
|
274
257
|
<div class="method-heading">
|
|
275
|
-
<a href="
|
|
276
|
-
onclick="popupCode('
|
|
277
|
-
<span class="method-name">is_output_param?</span><span class="method-args">(
|
|
258
|
+
<a href="ResultSet.src/M000014.html" target="Code" class="method-signature"
|
|
259
|
+
onclick="popupCode('ResultSet.src/M000014.html');return false;">
|
|
260
|
+
<span class="method-name">is_output_param?</span><span class="method-args">(name)</span>
|
|
278
261
|
</a>
|
|
279
262
|
</div>
|
|
280
263
|
|
|
@@ -282,13 +265,13 @@ held within self.
|
|
|
282
265
|
</div>
|
|
283
266
|
</div>
|
|
284
267
|
|
|
285
|
-
<div id="method-
|
|
286
|
-
<a name="
|
|
268
|
+
<div id="method-M000013" class="method-detail">
|
|
269
|
+
<a name="M000013"></a>
|
|
287
270
|
|
|
288
271
|
<div class="method-heading">
|
|
289
|
-
<a href="
|
|
290
|
-
onclick="popupCode('
|
|
291
|
-
<span class="method-name">method_missing</span><span class="method-args">(
|
|
272
|
+
<a href="ResultSet.src/M000013.html" target="Code" class="method-signature"
|
|
273
|
+
onclick="popupCode('ResultSet.src/M000013.html');return false;">
|
|
274
|
+
<span class="method-name">method_missing</span><span class="method-args">(name)</span>
|
|
292
275
|
</a>
|
|
293
276
|
</div>
|
|
294
277
|
|
|
@@ -296,37 +279,31 @@ held within self.
|
|
|
296
279
|
</div>
|
|
297
280
|
</div>
|
|
298
281
|
|
|
299
|
-
<div id="method-
|
|
300
|
-
<a name="
|
|
282
|
+
<div id="method-M000016" class="method-detail">
|
|
283
|
+
<a name="M000016"></a>
|
|
301
284
|
|
|
302
285
|
<div class="method-heading">
|
|
303
|
-
<a href="
|
|
304
|
-
onclick="popupCode('
|
|
286
|
+
<a href="ResultSet.src/M000016.html" target="Code" class="method-signature"
|
|
287
|
+
onclick="popupCode('ResultSet.src/M000016.html');return false;">
|
|
305
288
|
<span class="method-name">size</span><span class="method-args">()</span>
|
|
306
289
|
</a>
|
|
307
290
|
</div>
|
|
308
291
|
|
|
309
292
|
<div class="method-description">
|
|
310
|
-
<p>
|
|
311
|
-
Returns the number of rows in self.
|
|
312
|
-
</p>
|
|
313
293
|
</div>
|
|
314
294
|
</div>
|
|
315
295
|
|
|
316
|
-
<div id="method-
|
|
317
|
-
<a name="
|
|
296
|
+
<div id="method-M000022" class="method-detail">
|
|
297
|
+
<a name="M000022"></a>
|
|
318
298
|
|
|
319
299
|
<div class="method-heading">
|
|
320
|
-
<a href="
|
|
321
|
-
onclick="popupCode('
|
|
300
|
+
<a href="ResultSet.src/M000022.html" target="Code" class="method-signature"
|
|
301
|
+
onclick="popupCode('ResultSet.src/M000022.html');return false;">
|
|
322
302
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
323
303
|
</a>
|
|
324
304
|
</div>
|
|
325
305
|
|
|
326
306
|
<div class="method-description">
|
|
327
|
-
<p>
|
|
328
|
-
Provides the contents of self in the form of a table.
|
|
329
|
-
</p>
|
|
330
307
|
</div>
|
|
331
308
|
</div>
|
|
332
309
|
|