sqlconstructor 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.
- checksums.yaml +15 -0
- data/LICENSE.md +16 -0
- data/README.md +161 -0
- data/Rakefile +11 -0
- data/doc/Object.html +267 -0
- data/doc/Rakefile.html +150 -0
- data/doc/SQLAliasedList.html +717 -0
- data/doc/SQLColumn.html +326 -0
- data/doc/SQLCondList.html +318 -0
- data/doc/SQLConditional.html +1082 -0
- data/doc/SQLConditional/BasicCond.html +325 -0
- data/doc/SQLConstructor.html +763 -0
- data/doc/SQLConstructor/BasicDelete.html +383 -0
- data/doc/SQLConstructor/BasicDelete_mysql.html +368 -0
- data/doc/SQLConstructor/BasicInsert.html +339 -0
- data/doc/SQLConstructor/BasicInsert_mysql.html +325 -0
- data/doc/SQLConstructor/BasicJoin.html +408 -0
- data/doc/SQLConstructor/BasicJoin_mysql.html +439 -0
- data/doc/SQLConstructor/BasicSelect.html +554 -0
- data/doc/SQLConstructor/BasicSelect_example.html +288 -0
- data/doc/SQLConstructor/BasicSelect_mysql.html +466 -0
- data/doc/SQLConstructor/BasicUnion.html +396 -0
- data/doc/SQLConstructor/BasicUpdate.html +409 -0
- data/doc/SQLConstructor/BasicUpdate_mysql.html +310 -0
- data/doc/SQLConstructor/GenericQuery.html +797 -0
- data/doc/SQLConstructor/QAttr.html +398 -0
- data/doc/SQLConstructorTest.html +603 -0
- data/doc/SQLExporter.html +382 -0
- data/doc/SQLExporter/Exporter_generic.html +413 -0
- data/doc/SQLExporter/Exporter_mysql.html +395 -0
- data/doc/SQLObject.html +525 -0
- data/doc/SQLValList.html +322 -0
- data/doc/SQLValue.html +375 -0
- data/doc/created.rid +12 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +356 -0
- data/doc/js/darkfish.js +118 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/dialects/example-constructor_rb.html +52 -0
- data/doc/lib/dialects/mysql-constructor_rb.html +52 -0
- data/doc/lib/dialects/mysql-exporter_rb.html +54 -0
- data/doc/lib/sqlconditional_rb.html +64 -0
- data/doc/lib/sqlconstructor_rb.html +52 -0
- data/doc/lib/sqlerrors_rb.html +54 -0
- data/doc/lib/sqlexporter_rb.html +55 -0
- data/doc/lib/sqlobject_rb.html +54 -0
- data/doc/rdoc.css +763 -0
- data/doc/test/queries_rb.html +56 -0
- data/doc/test_rb.html +52 -0
- data/lib/dialects/example-constructor.rb +45 -0
- data/lib/dialects/mysql-constructor.rb +247 -0
- data/lib/dialects/mysql-exporter.rb +108 -0
- data/lib/sqlconditional.rb +196 -0
- data/lib/sqlconstructor.rb +708 -0
- data/lib/sqlerrors.rb +15 -0
- data/lib/sqlexporter.rb +125 -0
- data/lib/sqlobject.rb +284 -0
- data/test/queries.rb +92 -0
- metadata +121 -0
data/doc/Rakefile.html
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
+
<head>
|
7
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
|
+
|
9
|
+
<title>File: Rakefile [RDoc Documentation]</title>
|
10
|
+
|
11
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
|
12
|
+
|
13
|
+
<script src="./js/jquery.js" type="text/javascript"
|
14
|
+
charset="utf-8"></script>
|
15
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
16
|
+
charset="utf-8"></script>
|
17
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
18
|
+
charset="utf-8"></script>
|
19
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
20
|
+
charset="utf-8"></script>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="project-metadata">
|
36
|
+
|
37
|
+
|
38
|
+
<div id="fileindex-section" class="section project-section">
|
39
|
+
<h3 class="section-header">Files</h3>
|
40
|
+
<ul>
|
41
|
+
|
42
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
|
48
|
+
<div id="classindex-section" class="section project-section">
|
49
|
+
<h3 class="section-header">Class Index
|
50
|
+
<span class="search-toggle"><img src="./images/find.png"
|
51
|
+
height="16" width="16" alt="[+]"
|
52
|
+
title="show/hide quicksearch" /></span></h3>
|
53
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
54
|
+
<fieldset>
|
55
|
+
<legend>Quicksearch</legend>
|
56
|
+
<input type="text" name="quicksearch" value=""
|
57
|
+
class="quicksearch-field" />
|
58
|
+
</fieldset>
|
59
|
+
</form>
|
60
|
+
|
61
|
+
<ul class="link-list">
|
62
|
+
|
63
|
+
<li><a href="./SQLConstructor.html">SQLConstructor</a></li>
|
64
|
+
|
65
|
+
<li><a href="./SQLConstructor/BasicDelete.html">SQLConstructor::BasicDelete</a></li>
|
66
|
+
|
67
|
+
<li><a href="./SQLConstructor/BasicDelete_mysql.html">SQLConstructor::BasicDelete_mysql</a></li>
|
68
|
+
|
69
|
+
<li><a href="./SQLConstructor/BasicInsert.html">SQLConstructor::BasicInsert</a></li>
|
70
|
+
|
71
|
+
<li><a href="./SQLConstructor/BasicInsert_mysql.html">SQLConstructor::BasicInsert_mysql</a></li>
|
72
|
+
|
73
|
+
<li><a href="./SQLConstructor/BasicJoin.html">SQLConstructor::BasicJoin</a></li>
|
74
|
+
|
75
|
+
<li><a href="./SQLConstructor/BasicJoin_mysql.html">SQLConstructor::BasicJoin_mysql</a></li>
|
76
|
+
|
77
|
+
<li><a href="./SQLConstructor/BasicSelect.html">SQLConstructor::BasicSelect</a></li>
|
78
|
+
|
79
|
+
<li><a href="./SQLConstructor/BasicSelect_example.html">SQLConstructor::BasicSelect_example</a></li>
|
80
|
+
|
81
|
+
<li><a href="./SQLConstructor/BasicSelect_mysql.html">SQLConstructor::BasicSelect_mysql</a></li>
|
82
|
+
|
83
|
+
<li><a href="./SQLConstructor/BasicUnion.html">SQLConstructor::BasicUnion</a></li>
|
84
|
+
|
85
|
+
<li><a href="./SQLConstructor/BasicUpdate.html">SQLConstructor::BasicUpdate</a></li>
|
86
|
+
|
87
|
+
<li><a href="./SQLConstructor/BasicUpdate_mysql.html">SQLConstructor::BasicUpdate_mysql</a></li>
|
88
|
+
|
89
|
+
<li><a href="./SQLConstructor/GenericQuery.html">SQLConstructor::GenericQuery</a></li>
|
90
|
+
|
91
|
+
<li><a href="./SQLConstructor/QAttr.html">SQLConstructor::QAttr</a></li>
|
92
|
+
|
93
|
+
<li><a href="./SQLExporter.html">SQLExporter</a></li>
|
94
|
+
|
95
|
+
<li><a href="./SQLExporter/Exporter_generic.html">SQLExporter::Exporter_generic</a></li>
|
96
|
+
|
97
|
+
<li><a href="./SQLExporter/Exporter_mysql.html">SQLExporter::Exporter_mysql</a></li>
|
98
|
+
|
99
|
+
<li><a href="./SQLConditional.html">SQLConditional</a></li>
|
100
|
+
|
101
|
+
<li><a href="./SQLConditional/BasicCond.html">SQLConditional::BasicCond</a></li>
|
102
|
+
|
103
|
+
<li><a href="./Object.html">Object</a></li>
|
104
|
+
|
105
|
+
<li><a href="./SQLAliasedList.html">SQLAliasedList</a></li>
|
106
|
+
|
107
|
+
<li><a href="./SQLColumn.html">SQLColumn</a></li>
|
108
|
+
|
109
|
+
<li><a href="./SQLCondList.html">SQLCondList</a></li>
|
110
|
+
|
111
|
+
<li><a href="./SQLConstructorTest.html">SQLConstructorTest</a></li>
|
112
|
+
|
113
|
+
<li><a href="./SQLObject.html">SQLObject</a></li>
|
114
|
+
|
115
|
+
<li><a href="./SQLValList.html">SQLValList</a></li>
|
116
|
+
|
117
|
+
<li><a href="./SQLValue.html">SQLValue</a></li>
|
118
|
+
|
119
|
+
</ul>
|
120
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div id="documentation">
|
128
|
+
|
129
|
+
<p>require ‘rake/testtask’</p>
|
130
|
+
|
131
|
+
<p>Rake::TestTask.new do |t|</p>
|
132
|
+
|
133
|
+
<pre>t.libs << 'test'
|
134
|
+
t.test_files = FileList['test/queries.rb']
|
135
|
+
t.verbose = true</pre>
|
136
|
+
|
137
|
+
<p>end</p>
|
138
|
+
|
139
|
+
<p>desc ‘Run tests’ task :default => :test</p>
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div id="validator-badges">
|
144
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
145
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
146
|
+
Rdoc Generator</a> 2</small>.</p>
|
147
|
+
</div>
|
148
|
+
</body>
|
149
|
+
</html>
|
150
|
+
|
@@ -0,0 +1,717 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: SQLAliasedList</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="class">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="./index.html">Home</a>
|
25
|
+
<a href="./index.html#classes">Classes</a>
|
26
|
+
<a href="./index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="./lib/sqlobject_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/sqlobject.rb">lib/sqlobject.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
<!-- Parent Class -->
|
50
|
+
<div id="parent-class-section" class="section">
|
51
|
+
<h3 class="section-header">Parent</h3>
|
52
|
+
|
53
|
+
<p class="link"><a href="SQLObject.html">SQLObject</a></p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Method Quickref -->
|
64
|
+
<div id="method-list-section" class="section">
|
65
|
+
<h3 class="section-header">Methods</h3>
|
66
|
+
<ul class="link-list">
|
67
|
+
|
68
|
+
<li><a href="#method-c-new">::new</a></li>
|
69
|
+
|
70
|
+
<li><a href="#method-i-3C-3C">#<<</a></li>
|
71
|
+
|
72
|
+
<li><a href="#method-i-5B-5D">#[]</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-_getList">#_getList</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-_hash2array">#_hash2array</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-delete_if">#delete_if</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-each">#each</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-each_with_index">#each_with_index</a></li>
|
83
|
+
|
84
|
+
<li><a href="#method-i-find">#find</a></li>
|
85
|
+
|
86
|
+
<li><a href="#method-i-length">#length</a></li>
|
87
|
+
|
88
|
+
<li><a href="#method-i-push">#push</a></li>
|
89
|
+
|
90
|
+
<li><a href="#method-i-select">#select</a></li>
|
91
|
+
|
92
|
+
<li><a href="#method-i-to_s">#to_s</a></li>
|
93
|
+
|
94
|
+
</ul>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div id="project-metadata">
|
102
|
+
|
103
|
+
|
104
|
+
<div id="fileindex-section" class="section project-section">
|
105
|
+
<h3 class="section-header">Files</h3>
|
106
|
+
<ul>
|
107
|
+
|
108
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
109
|
+
|
110
|
+
</ul>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<div id="classindex-section" class="section project-section">
|
115
|
+
<h3 class="section-header">Class/Module Index
|
116
|
+
<span class="search-toggle"><img src="./images/find.png"
|
117
|
+
height="16" width="16" alt="[+]"
|
118
|
+
title="show/hide quicksearch" /></span></h3>
|
119
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
120
|
+
<fieldset>
|
121
|
+
<legend>Quicksearch</legend>
|
122
|
+
<input type="text" name="quicksearch" value=""
|
123
|
+
class="quicksearch-field" />
|
124
|
+
</fieldset>
|
125
|
+
</form>
|
126
|
+
|
127
|
+
<ul class="link-list">
|
128
|
+
|
129
|
+
<li><a href="./SQLConstructor.html">SQLConstructor</a></li>
|
130
|
+
|
131
|
+
<li><a href="./SQLConstructor/BasicDelete.html">SQLConstructor::BasicDelete</a></li>
|
132
|
+
|
133
|
+
<li><a href="./SQLConstructor/BasicDelete_mysql.html">SQLConstructor::BasicDelete_mysql</a></li>
|
134
|
+
|
135
|
+
<li><a href="./SQLConstructor/BasicInsert.html">SQLConstructor::BasicInsert</a></li>
|
136
|
+
|
137
|
+
<li><a href="./SQLConstructor/BasicInsert_mysql.html">SQLConstructor::BasicInsert_mysql</a></li>
|
138
|
+
|
139
|
+
<li><a href="./SQLConstructor/BasicJoin.html">SQLConstructor::BasicJoin</a></li>
|
140
|
+
|
141
|
+
<li><a href="./SQLConstructor/BasicJoin_mysql.html">SQLConstructor::BasicJoin_mysql</a></li>
|
142
|
+
|
143
|
+
<li><a href="./SQLConstructor/BasicSelect.html">SQLConstructor::BasicSelect</a></li>
|
144
|
+
|
145
|
+
<li><a href="./SQLConstructor/BasicSelect_example.html">SQLConstructor::BasicSelect_example</a></li>
|
146
|
+
|
147
|
+
<li><a href="./SQLConstructor/BasicSelect_mysql.html">SQLConstructor::BasicSelect_mysql</a></li>
|
148
|
+
|
149
|
+
<li><a href="./SQLConstructor/BasicUnion.html">SQLConstructor::BasicUnion</a></li>
|
150
|
+
|
151
|
+
<li><a href="./SQLConstructor/BasicUpdate.html">SQLConstructor::BasicUpdate</a></li>
|
152
|
+
|
153
|
+
<li><a href="./SQLConstructor/BasicUpdate_mysql.html">SQLConstructor::BasicUpdate_mysql</a></li>
|
154
|
+
|
155
|
+
<li><a href="./SQLConstructor/GenericQuery.html">SQLConstructor::GenericQuery</a></li>
|
156
|
+
|
157
|
+
<li><a href="./SQLConstructor/QAttr.html">SQLConstructor::QAttr</a></li>
|
158
|
+
|
159
|
+
<li><a href="./SQLExporter.html">SQLExporter</a></li>
|
160
|
+
|
161
|
+
<li><a href="./SQLExporter/Exporter_generic.html">SQLExporter::Exporter_generic</a></li>
|
162
|
+
|
163
|
+
<li><a href="./SQLExporter/Exporter_mysql.html">SQLExporter::Exporter_mysql</a></li>
|
164
|
+
|
165
|
+
<li><a href="./SQLConditional.html">SQLConditional</a></li>
|
166
|
+
|
167
|
+
<li><a href="./SQLConditional/BasicCond.html">SQLConditional::BasicCond</a></li>
|
168
|
+
|
169
|
+
<li><a href="./Object.html">Object</a></li>
|
170
|
+
|
171
|
+
<li><a href="./SQLAliasedList.html">SQLAliasedList</a></li>
|
172
|
+
|
173
|
+
<li><a href="./SQLColumn.html">SQLColumn</a></li>
|
174
|
+
|
175
|
+
<li><a href="./SQLCondList.html">SQLCondList</a></li>
|
176
|
+
|
177
|
+
<li><a href="./SQLConstructorTest.html">SQLConstructorTest</a></li>
|
178
|
+
|
179
|
+
<li><a href="./SQLObject.html">SQLObject</a></li>
|
180
|
+
|
181
|
+
<li><a href="./SQLValList.html">SQLValList</a></li>
|
182
|
+
|
183
|
+
<li><a href="./SQLValue.html">SQLValue</a></li>
|
184
|
+
|
185
|
+
</ul>
|
186
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<div id="documentation">
|
194
|
+
<h1 class="class">SQLAliasedList</h1>
|
195
|
+
|
196
|
+
<div id="description" class="description">
|
197
|
+
|
198
|
+
<p>Class container - a list of SQLObjects with aliases</p>
|
199
|
+
|
200
|
+
</div><!-- description -->
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<!-- Attributes -->
|
214
|
+
<div id="attribute-method-details" class="method-section section">
|
215
|
+
<h3 class="section-header">Attributes</h3>
|
216
|
+
|
217
|
+
|
218
|
+
<div id="no_commas-attribute-method" class="method-detail">
|
219
|
+
<a name="no_commas"></a>
|
220
|
+
|
221
|
+
<a name="no_commas="></a>
|
222
|
+
|
223
|
+
<div class="method-heading attribute-method-heading">
|
224
|
+
<span class="method-name">no_commas</span><span
|
225
|
+
class="attribute-access-type">[W]</span>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div class="method-description">
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
</div><!-- attribute-method-details -->
|
236
|
+
|
237
|
+
|
238
|
+
<!-- Methods -->
|
239
|
+
|
240
|
+
<div id="public-class-method-details" class="method-section section">
|
241
|
+
<h3 class="section-header">Public Class Methods</h3>
|
242
|
+
|
243
|
+
|
244
|
+
<div id="new-method" class="method-detail ">
|
245
|
+
<a name="method-c-new"></a>
|
246
|
+
|
247
|
+
|
248
|
+
<div class="method-heading">
|
249
|
+
<span class="method-name">new</span><span
|
250
|
+
class="method-args">( *list )</span>
|
251
|
+
<span class="method-click-advice">click to toggle source</span>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
|
255
|
+
<div class="method-description">
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<div class="method-source-code" id="new-source">
|
262
|
+
<pre>
|
263
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 195</span>
|
264
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> ( *<span class="ruby-identifier">list</span> )
|
265
|
+
<span class="ruby-ivar">@list</span> = <span class="ruby-identifier">_getList</span> *<span class="ruby-identifier">list</span>
|
266
|
+
<span class="ruby-keyword">end</span></pre>
|
267
|
+
</div><!-- new-source -->
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</div><!-- new-method -->
|
275
|
+
|
276
|
+
|
277
|
+
</div><!-- public-class-method-details -->
|
278
|
+
|
279
|
+
<div id="public-instance-method-details" class="method-section section">
|
280
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
281
|
+
|
282
|
+
|
283
|
+
<div id="3C-3C-method" class="method-detail ">
|
284
|
+
<a name="method-i-3C-3C"></a>
|
285
|
+
|
286
|
+
|
287
|
+
<div class="method-heading">
|
288
|
+
<span class="method-name"><<</span><span
|
289
|
+
class="method-args">( *list )</span>
|
290
|
+
<span class="method-click-advice">click to toggle source</span>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
|
294
|
+
<div class="method-description">
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
<div class="method-source-code" id="3C-3C-source">
|
301
|
+
<pre>
|
302
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 199</span>
|
303
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator"><<</span> ( *<span class="ruby-identifier">list</span> )
|
304
|
+
<span class="ruby-ivar">@list</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_getList</span> *<span class="ruby-identifier">list</span>
|
305
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span>
|
306
|
+
<span class="ruby-keyword">end</span></pre>
|
307
|
+
</div><!-- 3C-3C-source -->
|
308
|
+
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
</div><!-- 3C-3C-method -->
|
315
|
+
|
316
|
+
|
317
|
+
<div id="5B-5D-method" class="method-detail ">
|
318
|
+
<a name="method-i-5B-5D"></a>
|
319
|
+
|
320
|
+
|
321
|
+
<div class="method-heading">
|
322
|
+
<span class="method-name">[]</span><span
|
323
|
+
class="method-args">(i)</span>
|
324
|
+
<span class="method-click-advice">click to toggle source</span>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div class="method-description">
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
<div class="method-source-code" id="5B-5D-source">
|
335
|
+
<pre>
|
336
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 220</span>
|
337
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span> (<span class="ruby-identifier">i</span>)
|
338
|
+
<span class="ruby-ivar">@list</span>[<span class="ruby-identifier">i</span>]
|
339
|
+
<span class="ruby-keyword">end</span></pre>
|
340
|
+
</div><!-- 5B-5D-source -->
|
341
|
+
|
342
|
+
</div>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
</div><!-- 5B-5D-method -->
|
348
|
+
|
349
|
+
|
350
|
+
<div id="delete_if-method" class="method-detail ">
|
351
|
+
<a name="method-i-delete_if"></a>
|
352
|
+
|
353
|
+
|
354
|
+
<div class="method-heading">
|
355
|
+
<span class="method-name">delete_if</span><span
|
356
|
+
class="method-args">( &block )</span>
|
357
|
+
<span class="method-click-advice">click to toggle source</span>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
|
361
|
+
<div class="method-description">
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
<div class="method-source-code" id="delete_if-source">
|
368
|
+
<pre>
|
369
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 216</span>
|
370
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_if</span> ( &<span class="ruby-identifier">block</span> )
|
371
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">delete_if</span> &<span class="ruby-identifier">block</span>
|
372
|
+
<span class="ruby-keyword">end</span></pre>
|
373
|
+
</div><!-- delete_if-source -->
|
374
|
+
|
375
|
+
</div>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
</div><!-- delete_if-method -->
|
381
|
+
|
382
|
+
|
383
|
+
<div id="each-method" class="method-detail ">
|
384
|
+
<a name="method-i-each"></a>
|
385
|
+
|
386
|
+
|
387
|
+
<div class="method-heading">
|
388
|
+
<span class="method-name">each</span><span
|
389
|
+
class="method-args">( &block )</span>
|
390
|
+
<span class="method-click-advice">click to toggle source</span>
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
<div class="method-description">
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
<div class="method-source-code" id="each-source">
|
401
|
+
<pre>
|
402
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 212</span>
|
403
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span> ( &<span class="ruby-identifier">block</span> )
|
404
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">each</span> &<span class="ruby-identifier">block</span>
|
405
|
+
<span class="ruby-keyword">end</span></pre>
|
406
|
+
</div><!-- each-source -->
|
407
|
+
|
408
|
+
</div>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</div><!-- each-method -->
|
414
|
+
|
415
|
+
|
416
|
+
<div id="each_with_index-method" class="method-detail ">
|
417
|
+
<a name="method-i-each_with_index"></a>
|
418
|
+
|
419
|
+
|
420
|
+
<div class="method-heading">
|
421
|
+
<span class="method-name">each_with_index</span><span
|
422
|
+
class="method-args">( &block )</span>
|
423
|
+
<span class="method-click-advice">click to toggle source</span>
|
424
|
+
</div>
|
425
|
+
|
426
|
+
|
427
|
+
<div class="method-description">
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
<div class="method-source-code" id="each_with_index-source">
|
434
|
+
<pre>
|
435
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 232</span>
|
436
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each_with_index</span> ( &<span class="ruby-identifier">block</span> )
|
437
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">each_with_index</span> &<span class="ruby-identifier">block</span>
|
438
|
+
<span class="ruby-keyword">end</span></pre>
|
439
|
+
</div><!-- each_with_index-source -->
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
</div><!-- each_with_index-method -->
|
447
|
+
|
448
|
+
|
449
|
+
<div id="find-method" class="method-detail ">
|
450
|
+
<a name="method-i-find"></a>
|
451
|
+
|
452
|
+
|
453
|
+
<div class="method-heading">
|
454
|
+
<span class="method-name">find</span><span
|
455
|
+
class="method-args">( &block )</span>
|
456
|
+
<span class="method-click-advice">click to toggle source</span>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div class="method-description">
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
<div class="method-source-code" id="find-source">
|
467
|
+
<pre>
|
468
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 224</span>
|
469
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">find</span> ( &<span class="ruby-identifier">block</span> )
|
470
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">find</span> &<span class="ruby-identifier">block</span>
|
471
|
+
<span class="ruby-keyword">end</span></pre>
|
472
|
+
</div><!-- find-source -->
|
473
|
+
|
474
|
+
</div>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
</div><!-- find-method -->
|
480
|
+
|
481
|
+
|
482
|
+
<div id="length-method" class="method-detail ">
|
483
|
+
<a name="method-i-length"></a>
|
484
|
+
|
485
|
+
|
486
|
+
<div class="method-heading">
|
487
|
+
<span class="method-name">length</span><span
|
488
|
+
class="method-args">()</span>
|
489
|
+
<span class="method-click-advice">click to toggle source</span>
|
490
|
+
</div>
|
491
|
+
|
492
|
+
|
493
|
+
<div class="method-description">
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
<div class="method-source-code" id="length-source">
|
500
|
+
<pre>
|
501
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 208</span>
|
502
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">length</span>
|
503
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">length</span>
|
504
|
+
<span class="ruby-keyword">end</span></pre>
|
505
|
+
</div><!-- length-source -->
|
506
|
+
|
507
|
+
</div>
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
</div><!-- length-method -->
|
513
|
+
|
514
|
+
|
515
|
+
<div id="push-method" class="method-detail ">
|
516
|
+
<a name="method-i-push"></a>
|
517
|
+
|
518
|
+
|
519
|
+
<div class="method-heading">
|
520
|
+
<span class="method-name">push</span><span
|
521
|
+
class="method-args">( *list )</span>
|
522
|
+
<span class="method-click-advice">click to toggle source</span>
|
523
|
+
</div>
|
524
|
+
|
525
|
+
|
526
|
+
<div class="method-description">
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
<div class="method-source-code" id="push-source">
|
533
|
+
<pre>
|
534
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 204</span>
|
535
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">push</span> ( *<span class="ruby-identifier">list</span> )
|
536
|
+
<span class="ruby-ivar">@list</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_getList</span>( *<span class="ruby-identifier">list</span> )
|
537
|
+
<span class="ruby-keyword">end</span></pre>
|
538
|
+
</div><!-- push-source -->
|
539
|
+
|
540
|
+
</div>
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
</div><!-- push-method -->
|
546
|
+
|
547
|
+
|
548
|
+
<div id="select-method" class="method-detail ">
|
549
|
+
<a name="method-i-select"></a>
|
550
|
+
|
551
|
+
|
552
|
+
<div class="method-heading">
|
553
|
+
<span class="method-name">select</span><span
|
554
|
+
class="method-args">( &block )</span>
|
555
|
+
<span class="method-click-advice">click to toggle source</span>
|
556
|
+
</div>
|
557
|
+
|
558
|
+
|
559
|
+
<div class="method-description">
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
<div class="method-source-code" id="select-source">
|
566
|
+
<pre>
|
567
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 228</span>
|
568
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">select</span> ( &<span class="ruby-identifier">block</span> )
|
569
|
+
<span class="ruby-ivar">@list</span>.<span class="ruby-identifier">each</span> &<span class="ruby-identifier">block</span>
|
570
|
+
<span class="ruby-keyword">end</span></pre>
|
571
|
+
</div><!-- select-source -->
|
572
|
+
|
573
|
+
</div>
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
</div><!-- select-method -->
|
579
|
+
|
580
|
+
|
581
|
+
<div id="to_s-method" class="method-detail ">
|
582
|
+
<a name="method-i-to_s"></a>
|
583
|
+
|
584
|
+
|
585
|
+
<div class="method-heading">
|
586
|
+
<span class="method-name">to_s</span><span
|
587
|
+
class="method-args">()</span>
|
588
|
+
<span class="method-click-advice">click to toggle source</span>
|
589
|
+
</div>
|
590
|
+
|
591
|
+
|
592
|
+
<div class="method-description">
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
<div class="method-source-code" id="to_s-source">
|
599
|
+
<pre>
|
600
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 236</span>
|
601
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
602
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@string</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@string</span>
|
603
|
+
<span class="ruby-identifier">arr</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> ( <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">alias</span> <span class="ruby-operator">?</span> <span class="ruby-string">" "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">alias</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-string">""</span> ) }
|
604
|
+
<span class="ruby-identifier">list_separator</span> = <span class="ruby-ivar">@no_commas</span> <span class="ruby-operator">?</span> <span class="ruby-string">""</span> <span class="ruby-operator">:</span> <span class="ruby-string">","</span>
|
605
|
+
<span class="ruby-ivar">@string</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">join</span> <span class="ruby-identifier">list_separator</span>
|
606
|
+
<span class="ruby-keyword">end</span></pre>
|
607
|
+
</div><!-- to_s-source -->
|
608
|
+
|
609
|
+
</div>
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
</div><!-- to_s-method -->
|
615
|
+
|
616
|
+
|
617
|
+
</div><!-- public-instance-method-details -->
|
618
|
+
|
619
|
+
<div id="private-instance-method-details" class="method-section section">
|
620
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
621
|
+
|
622
|
+
|
623
|
+
<div id="_getList-method" class="method-detail ">
|
624
|
+
<a name="method-i-_getList"></a>
|
625
|
+
|
626
|
+
|
627
|
+
<div class="method-heading">
|
628
|
+
<span class="method-name">_getList</span><span
|
629
|
+
class="method-args">( *list )</span>
|
630
|
+
<span class="method-click-advice">click to toggle source</span>
|
631
|
+
</div>
|
632
|
+
|
633
|
+
|
634
|
+
<div class="method-description">
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
<div class="method-source-code" id="_getList-source">
|
641
|
+
<pre>
|
642
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 245</span>
|
643
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_getList</span> ( *<span class="ruby-identifier">list</span> )
|
644
|
+
<span class="ruby-identifier">new_list</span> = [ ]
|
645
|
+
<span class="ruby-comment"># If list is a hash of objects with aliases:</span>
|
646
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">list</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Hash</span> )
|
647
|
+
<span class="ruby-identifier">new_list</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_hash2array</span> <span class="ruby-identifier">list</span>[<span class="ruby-value">0</span>]
|
648
|
+
<span class="ruby-comment"># If list is an array of objects:</span>
|
649
|
+
<span class="ruby-keyword">else</span>
|
650
|
+
<span class="ruby-identifier">new_list</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span> <span class="ruby-constant">SQLObject</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">src</span> }
|
651
|
+
<span class="ruby-keyword">end</span>
|
652
|
+
<span class="ruby-keyword">end</span></pre>
|
653
|
+
</div><!-- _getList-source -->
|
654
|
+
|
655
|
+
</div>
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
</div><!-- _getList-method -->
|
661
|
+
|
662
|
+
|
663
|
+
<div id="_hash2array-method" class="method-detail ">
|
664
|
+
<a name="method-i-_hash2array"></a>
|
665
|
+
|
666
|
+
|
667
|
+
<div class="method-heading">
|
668
|
+
<span class="method-name">_hash2array</span><span
|
669
|
+
class="method-args">( hash )</span>
|
670
|
+
<span class="method-click-advice">click to toggle source</span>
|
671
|
+
</div>
|
672
|
+
|
673
|
+
|
674
|
+
<div class="method-description">
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
<div class="method-source-code" id="_hash2array-source">
|
681
|
+
<pre>
|
682
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 256</span>
|
683
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_hash2array</span> ( <span class="ruby-identifier">hash</span> )
|
684
|
+
<span class="ruby-identifier">list</span> = [ ]
|
685
|
+
<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">_alias</span><span class="ruby-operator">|</span>
|
686
|
+
<span class="ruby-identifier">obj</span> = <span class="ruby-constant">SQLObject</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">item</span>
|
687
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">alias</span> = <span class="ruby-identifier">_alias</span>
|
688
|
+
<span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj</span>
|
689
|
+
<span class="ruby-keyword">end</span>
|
690
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">list</span>
|
691
|
+
<span class="ruby-keyword">end</span></pre>
|
692
|
+
</div><!-- _hash2array-source -->
|
693
|
+
|
694
|
+
</div>
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
</div><!-- _hash2array-method -->
|
700
|
+
|
701
|
+
|
702
|
+
</div><!-- private-instance-method-details -->
|
703
|
+
|
704
|
+
</div><!-- 5Buntitled-5D -->
|
705
|
+
|
706
|
+
|
707
|
+
</div><!-- documentation -->
|
708
|
+
|
709
|
+
<div id="validator-badges">
|
710
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
711
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
712
|
+
Rdoc Generator</a> 2</small>.</p>
|
713
|
+
</div>
|
714
|
+
|
715
|
+
</body>
|
716
|
+
</html>
|
717
|
+
|