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/SQLValList.html
ADDED
@@ -0,0 +1,322 @@
|
|
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: SQLValList</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-to_s">#to_s</a></li>
|
73
|
+
|
74
|
+
</ul>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div id="project-metadata">
|
82
|
+
|
83
|
+
|
84
|
+
<div id="fileindex-section" class="section project-section">
|
85
|
+
<h3 class="section-header">Files</h3>
|
86
|
+
<ul>
|
87
|
+
|
88
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
<div id="classindex-section" class="section project-section">
|
95
|
+
<h3 class="section-header">Class/Module Index
|
96
|
+
<span class="search-toggle"><img src="./images/find.png"
|
97
|
+
height="16" width="16" alt="[+]"
|
98
|
+
title="show/hide quicksearch" /></span></h3>
|
99
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
100
|
+
<fieldset>
|
101
|
+
<legend>Quicksearch</legend>
|
102
|
+
<input type="text" name="quicksearch" value=""
|
103
|
+
class="quicksearch-field" />
|
104
|
+
</fieldset>
|
105
|
+
</form>
|
106
|
+
|
107
|
+
<ul class="link-list">
|
108
|
+
|
109
|
+
<li><a href="./SQLConstructor.html">SQLConstructor</a></li>
|
110
|
+
|
111
|
+
<li><a href="./SQLConstructor/BasicDelete.html">SQLConstructor::BasicDelete</a></li>
|
112
|
+
|
113
|
+
<li><a href="./SQLConstructor/BasicDelete_mysql.html">SQLConstructor::BasicDelete_mysql</a></li>
|
114
|
+
|
115
|
+
<li><a href="./SQLConstructor/BasicInsert.html">SQLConstructor::BasicInsert</a></li>
|
116
|
+
|
117
|
+
<li><a href="./SQLConstructor/BasicInsert_mysql.html">SQLConstructor::BasicInsert_mysql</a></li>
|
118
|
+
|
119
|
+
<li><a href="./SQLConstructor/BasicJoin.html">SQLConstructor::BasicJoin</a></li>
|
120
|
+
|
121
|
+
<li><a href="./SQLConstructor/BasicJoin_mysql.html">SQLConstructor::BasicJoin_mysql</a></li>
|
122
|
+
|
123
|
+
<li><a href="./SQLConstructor/BasicSelect.html">SQLConstructor::BasicSelect</a></li>
|
124
|
+
|
125
|
+
<li><a href="./SQLConstructor/BasicSelect_example.html">SQLConstructor::BasicSelect_example</a></li>
|
126
|
+
|
127
|
+
<li><a href="./SQLConstructor/BasicSelect_mysql.html">SQLConstructor::BasicSelect_mysql</a></li>
|
128
|
+
|
129
|
+
<li><a href="./SQLConstructor/BasicUnion.html">SQLConstructor::BasicUnion</a></li>
|
130
|
+
|
131
|
+
<li><a href="./SQLConstructor/BasicUpdate.html">SQLConstructor::BasicUpdate</a></li>
|
132
|
+
|
133
|
+
<li><a href="./SQLConstructor/BasicUpdate_mysql.html">SQLConstructor::BasicUpdate_mysql</a></li>
|
134
|
+
|
135
|
+
<li><a href="./SQLConstructor/GenericQuery.html">SQLConstructor::GenericQuery</a></li>
|
136
|
+
|
137
|
+
<li><a href="./SQLConstructor/QAttr.html">SQLConstructor::QAttr</a></li>
|
138
|
+
|
139
|
+
<li><a href="./SQLExporter.html">SQLExporter</a></li>
|
140
|
+
|
141
|
+
<li><a href="./SQLExporter/Exporter_generic.html">SQLExporter::Exporter_generic</a></li>
|
142
|
+
|
143
|
+
<li><a href="./SQLExporter/Exporter_mysql.html">SQLExporter::Exporter_mysql</a></li>
|
144
|
+
|
145
|
+
<li><a href="./SQLConditional.html">SQLConditional</a></li>
|
146
|
+
|
147
|
+
<li><a href="./SQLConditional/BasicCond.html">SQLConditional::BasicCond</a></li>
|
148
|
+
|
149
|
+
<li><a href="./Object.html">Object</a></li>
|
150
|
+
|
151
|
+
<li><a href="./SQLAliasedList.html">SQLAliasedList</a></li>
|
152
|
+
|
153
|
+
<li><a href="./SQLColumn.html">SQLColumn</a></li>
|
154
|
+
|
155
|
+
<li><a href="./SQLCondList.html">SQLCondList</a></li>
|
156
|
+
|
157
|
+
<li><a href="./SQLConstructorTest.html">SQLConstructorTest</a></li>
|
158
|
+
|
159
|
+
<li><a href="./SQLObject.html">SQLObject</a></li>
|
160
|
+
|
161
|
+
<li><a href="./SQLValList.html">SQLValList</a></li>
|
162
|
+
|
163
|
+
<li><a href="./SQLValue.html">SQLValue</a></li>
|
164
|
+
|
165
|
+
</ul>
|
166
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
|
170
|
+
</div>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<div id="documentation">
|
174
|
+
<h1 class="class">SQLValList</h1>
|
175
|
+
|
176
|
+
<div id="description" class="description">
|
177
|
+
|
178
|
+
<p>Class container - a list of <a href="SQLValue.html">SQLValue</a> scalars</p>
|
179
|
+
|
180
|
+
</div><!-- description -->
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<!-- Methods -->
|
195
|
+
|
196
|
+
<div id="public-class-method-details" class="method-section section">
|
197
|
+
<h3 class="section-header">Public Class Methods</h3>
|
198
|
+
|
199
|
+
|
200
|
+
<div id="new-method" class="method-detail ">
|
201
|
+
<a name="method-c-new"></a>
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method-heading">
|
205
|
+
<span class="method-name">new</span><span
|
206
|
+
class="method-args">( *list )</span>
|
207
|
+
<span class="method-click-advice">click to toggle source</span>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
<div class="method-description">
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<div class="method-source-code" id="new-source">
|
218
|
+
<pre>
|
219
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 173</span>
|
220
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> ( *<span class="ruby-identifier">list</span> )
|
221
|
+
<span class="ruby-ivar">@list</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-constant">SQLObject</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">item</span> }
|
222
|
+
<span class="ruby-keyword">end</span></pre>
|
223
|
+
</div><!-- new-source -->
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
</div><!-- new-method -->
|
231
|
+
|
232
|
+
|
233
|
+
</div><!-- public-class-method-details -->
|
234
|
+
|
235
|
+
<div id="public-instance-method-details" class="method-section section">
|
236
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
237
|
+
|
238
|
+
|
239
|
+
<div id="3C-3C-method" class="method-detail ">
|
240
|
+
<a name="method-i-3C-3C"></a>
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method-heading">
|
244
|
+
<span class="method-name"><<</span><span
|
245
|
+
class="method-args">( list )</span>
|
246
|
+
<span class="method-click-advice">click to toggle source</span>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
|
250
|
+
<div class="method-description">
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<div class="method-source-code" id="3C-3C-source">
|
257
|
+
<pre>
|
258
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 177</span>
|
259
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator"><<</span> ( <span class="ruby-identifier">list</span> )
|
260
|
+
<span class="ruby-identifier">list</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-constant">SQLObject</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">item</span> }
|
261
|
+
<span class="ruby-ivar">@list</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">list</span>
|
262
|
+
<span class="ruby-keyword">end</span></pre>
|
263
|
+
</div><!-- 3C-3C-source -->
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</div><!-- 3C-3C-method -->
|
271
|
+
|
272
|
+
|
273
|
+
<div id="to_s-method" class="method-detail ">
|
274
|
+
<a name="method-i-to_s"></a>
|
275
|
+
|
276
|
+
|
277
|
+
<div class="method-heading">
|
278
|
+
<span class="method-name">to_s</span><span
|
279
|
+
class="method-args">()</span>
|
280
|
+
<span class="method-click-advice">click to toggle source</span>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
|
284
|
+
<div class="method-description">
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
<div class="method-source-code" id="to_s-source">
|
291
|
+
<pre>
|
292
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 182</span>
|
293
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
294
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@string</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@string</span>
|
295
|
+
<span class="ruby-ivar">@string</span> = <span class="ruby-string">"("</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">join</span>( <span class="ruby-string">","</span> ) <span class="ruby-operator">+</span> <span class="ruby-string">")"</span>
|
296
|
+
<span class="ruby-keyword">end</span></pre>
|
297
|
+
</div><!-- to_s-source -->
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
</div><!-- to_s-method -->
|
305
|
+
|
306
|
+
|
307
|
+
</div><!-- public-instance-method-details -->
|
308
|
+
|
309
|
+
</div><!-- 5Buntitled-5D -->
|
310
|
+
|
311
|
+
|
312
|
+
</div><!-- documentation -->
|
313
|
+
|
314
|
+
<div id="validator-badges">
|
315
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
316
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
317
|
+
Rdoc Generator</a> 2</small>.</p>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</body>
|
321
|
+
</html>
|
322
|
+
|
data/doc/SQLValue.html
ADDED
@@ -0,0 +1,375 @@
|
|
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: SQLValue</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-_escape">#_escape</a></li>
|
71
|
+
|
72
|
+
<li><a href="#method-i-_quoteString">#_quoteString</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-to_s">#to_s</a></li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div id="project-metadata">
|
84
|
+
|
85
|
+
|
86
|
+
<div id="fileindex-section" class="section project-section">
|
87
|
+
<h3 class="section-header">Files</h3>
|
88
|
+
<ul>
|
89
|
+
|
90
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
91
|
+
|
92
|
+
</ul>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="classindex-section" class="section project-section">
|
97
|
+
<h3 class="section-header">Class/Module Index
|
98
|
+
<span class="search-toggle"><img src="./images/find.png"
|
99
|
+
height="16" width="16" alt="[+]"
|
100
|
+
title="show/hide quicksearch" /></span></h3>
|
101
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
102
|
+
<fieldset>
|
103
|
+
<legend>Quicksearch</legend>
|
104
|
+
<input type="text" name="quicksearch" value=""
|
105
|
+
class="quicksearch-field" />
|
106
|
+
</fieldset>
|
107
|
+
</form>
|
108
|
+
|
109
|
+
<ul class="link-list">
|
110
|
+
|
111
|
+
<li><a href="./SQLConstructor.html">SQLConstructor</a></li>
|
112
|
+
|
113
|
+
<li><a href="./SQLConstructor/BasicDelete.html">SQLConstructor::BasicDelete</a></li>
|
114
|
+
|
115
|
+
<li><a href="./SQLConstructor/BasicDelete_mysql.html">SQLConstructor::BasicDelete_mysql</a></li>
|
116
|
+
|
117
|
+
<li><a href="./SQLConstructor/BasicInsert.html">SQLConstructor::BasicInsert</a></li>
|
118
|
+
|
119
|
+
<li><a href="./SQLConstructor/BasicInsert_mysql.html">SQLConstructor::BasicInsert_mysql</a></li>
|
120
|
+
|
121
|
+
<li><a href="./SQLConstructor/BasicJoin.html">SQLConstructor::BasicJoin</a></li>
|
122
|
+
|
123
|
+
<li><a href="./SQLConstructor/BasicJoin_mysql.html">SQLConstructor::BasicJoin_mysql</a></li>
|
124
|
+
|
125
|
+
<li><a href="./SQLConstructor/BasicSelect.html">SQLConstructor::BasicSelect</a></li>
|
126
|
+
|
127
|
+
<li><a href="./SQLConstructor/BasicSelect_example.html">SQLConstructor::BasicSelect_example</a></li>
|
128
|
+
|
129
|
+
<li><a href="./SQLConstructor/BasicSelect_mysql.html">SQLConstructor::BasicSelect_mysql</a></li>
|
130
|
+
|
131
|
+
<li><a href="./SQLConstructor/BasicUnion.html">SQLConstructor::BasicUnion</a></li>
|
132
|
+
|
133
|
+
<li><a href="./SQLConstructor/BasicUpdate.html">SQLConstructor::BasicUpdate</a></li>
|
134
|
+
|
135
|
+
<li><a href="./SQLConstructor/BasicUpdate_mysql.html">SQLConstructor::BasicUpdate_mysql</a></li>
|
136
|
+
|
137
|
+
<li><a href="./SQLConstructor/GenericQuery.html">SQLConstructor::GenericQuery</a></li>
|
138
|
+
|
139
|
+
<li><a href="./SQLConstructor/QAttr.html">SQLConstructor::QAttr</a></li>
|
140
|
+
|
141
|
+
<li><a href="./SQLExporter.html">SQLExporter</a></li>
|
142
|
+
|
143
|
+
<li><a href="./SQLExporter/Exporter_generic.html">SQLExporter::Exporter_generic</a></li>
|
144
|
+
|
145
|
+
<li><a href="./SQLExporter/Exporter_mysql.html">SQLExporter::Exporter_mysql</a></li>
|
146
|
+
|
147
|
+
<li><a href="./SQLConditional.html">SQLConditional</a></li>
|
148
|
+
|
149
|
+
<li><a href="./SQLConditional/BasicCond.html">SQLConditional::BasicCond</a></li>
|
150
|
+
|
151
|
+
<li><a href="./Object.html">Object</a></li>
|
152
|
+
|
153
|
+
<li><a href="./SQLAliasedList.html">SQLAliasedList</a></li>
|
154
|
+
|
155
|
+
<li><a href="./SQLColumn.html">SQLColumn</a></li>
|
156
|
+
|
157
|
+
<li><a href="./SQLCondList.html">SQLCondList</a></li>
|
158
|
+
|
159
|
+
<li><a href="./SQLConstructorTest.html">SQLConstructorTest</a></li>
|
160
|
+
|
161
|
+
<li><a href="./SQLObject.html">SQLObject</a></li>
|
162
|
+
|
163
|
+
<li><a href="./SQLValList.html">SQLValList</a></li>
|
164
|
+
|
165
|
+
<li><a href="./SQLValue.html">SQLValue</a></li>
|
166
|
+
|
167
|
+
</ul>
|
168
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div id="documentation">
|
176
|
+
<h1 class="class">SQLValue</h1>
|
177
|
+
|
178
|
+
<div id="description" class="description">
|
179
|
+
|
180
|
+
<p>Class representing SQL scalar values</p>
|
181
|
+
|
182
|
+
</div><!-- description -->
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<!-- Methods -->
|
197
|
+
|
198
|
+
<div id="public-class-method-details" class="method-section section">
|
199
|
+
<h3 class="section-header">Public Class Methods</h3>
|
200
|
+
|
201
|
+
|
202
|
+
<div id="new-method" class="method-detail ">
|
203
|
+
<a name="method-c-new"></a>
|
204
|
+
|
205
|
+
|
206
|
+
<div class="method-heading">
|
207
|
+
<span class="method-name">new</span><span
|
208
|
+
class="method-args">( val = nil )</span>
|
209
|
+
<span class="method-click-advice">click to toggle source</span>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
|
213
|
+
<div class="method-description">
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<div class="method-source-code" id="new-source">
|
220
|
+
<pre>
|
221
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 129</span>
|
222
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> ( <span class="ruby-identifier">val</span> = <span class="ruby-keyword">nil</span> )
|
223
|
+
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">SQLValue</span> ) <span class="ruby-operator">?</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">_escape</span>( <span class="ruby-identifier">val</span> )
|
224
|
+
<span class="ruby-keyword">end</span></pre>
|
225
|
+
</div><!-- new-source -->
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
</div><!-- new-method -->
|
233
|
+
|
234
|
+
|
235
|
+
</div><!-- public-class-method-details -->
|
236
|
+
|
237
|
+
<div id="public-instance-method-details" class="method-section section">
|
238
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
239
|
+
|
240
|
+
|
241
|
+
<div id="to_s-method" class="method-detail ">
|
242
|
+
<a name="method-i-to_s"></a>
|
243
|
+
|
244
|
+
|
245
|
+
<div class="method-heading">
|
246
|
+
<span class="method-name">to_s</span><span
|
247
|
+
class="method-args">()</span>
|
248
|
+
<span class="method-click-advice">click to toggle source</span>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
|
252
|
+
<div class="method-description">
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<div class="method-source-code" id="to_s-source">
|
259
|
+
<pre>
|
260
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 134</span>
|
261
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
262
|
+
<span class="ruby-ivar">@value</span>
|
263
|
+
<span class="ruby-keyword">end</span></pre>
|
264
|
+
</div><!-- to_s-source -->
|
265
|
+
|
266
|
+
</div>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
</div><!-- to_s-method -->
|
272
|
+
|
273
|
+
|
274
|
+
</div><!-- public-instance-method-details -->
|
275
|
+
|
276
|
+
<div id="private-instance-method-details" class="method-section section">
|
277
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
278
|
+
|
279
|
+
|
280
|
+
<div id="_escape-method" class="method-detail ">
|
281
|
+
<a name="method-i-_escape"></a>
|
282
|
+
|
283
|
+
|
284
|
+
<div class="method-heading">
|
285
|
+
<span class="method-name">_escape</span><span
|
286
|
+
class="method-args">( val )</span>
|
287
|
+
<span class="method-click-advice">click to toggle source</span>
|
288
|
+
</div>
|
289
|
+
|
290
|
+
|
291
|
+
<div class="method-description">
|
292
|
+
|
293
|
+
<p>DERIVED FROM <a
|
294
|
+
href="https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb">github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb</a></p>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
<div class="method-source-code" id="_escape-source">
|
299
|
+
<pre>
|
300
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 143</span>
|
301
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_escape</span> ( <span class="ruby-identifier">val</span> )
|
302
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">val</span>
|
303
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span> <span class="ruby-node">"'#{_quoteString(val.to_s)}'"</span>
|
304
|
+
<span class="ruby-keyword">when</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">then</span> <span class="ruby-string">'TRUE'</span>
|
305
|
+
<span class="ruby-keyword">when</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">then</span> <span class="ruby-string">'FALSE'</span>
|
306
|
+
<span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"NULL"</span>
|
307
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Numeric</span>, <span class="ruby-constant">Time</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">to_s</span>
|
308
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Symbol</span> <span class="ruby-keyword">then</span> <span class="ruby-node">"'#{_quoteString(val.to_s)}'"</span>
|
309
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Class</span> <span class="ruby-keyword">then</span> <span class="ruby-node">"'#{val.to_s}'"</span>
|
310
|
+
<span class="ruby-keyword">else</span>
|
311
|
+
<span class="ruby-node">"'#{quoteString( val.to_s )}'"</span>
|
312
|
+
<span class="ruby-keyword">end</span>
|
313
|
+
<span class="ruby-keyword">end</span></pre>
|
314
|
+
</div><!-- _escape-source -->
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
</div><!-- _escape-method -->
|
322
|
+
|
323
|
+
|
324
|
+
<div id="_quoteString-method" class="method-detail ">
|
325
|
+
<a name="method-i-_quoteString"></a>
|
326
|
+
|
327
|
+
|
328
|
+
<div class="method-heading">
|
329
|
+
<span class="method-name">_quoteString</span><span
|
330
|
+
class="method-args">( str )</span>
|
331
|
+
<span class="method-click-advice">click to toggle source</span>
|
332
|
+
</div>
|
333
|
+
|
334
|
+
|
335
|
+
<div class="method-description">
|
336
|
+
|
337
|
+
<p>FROM <a
|
338
|
+
href="https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb">github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb</a>
|
339
|
+
Quotes a string, escaping any ‘ (single quote) and \ (backslash)
|
340
|
+
characters.</p>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
<div class="method-source-code" id="_quoteString-source">
|
345
|
+
<pre>
|
346
|
+
<span class="ruby-comment"># File lib/sqlobject.rb, line 162</span>
|
347
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">_quoteString</span> ( <span class="ruby-identifier">str</span> )
|
348
|
+
<span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>( <span class="ruby-regexp">/\\/</span>, <span class="ruby-string">'\&\&'</span> ).<span class="ruby-identifier">gsub</span>( <span class="ruby-regexp">/'/</span>, <span class="ruby-string">"''"</span> ) <span class="ruby-comment"># ' (for ruby-mode)</span>
|
349
|
+
<span class="ruby-keyword">end</span></pre>
|
350
|
+
</div><!-- _quoteString-source -->
|
351
|
+
|
352
|
+
</div>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</div><!-- _quoteString-method -->
|
358
|
+
|
359
|
+
|
360
|
+
</div><!-- private-instance-method-details -->
|
361
|
+
|
362
|
+
</div><!-- 5Buntitled-5D -->
|
363
|
+
|
364
|
+
|
365
|
+
</div><!-- documentation -->
|
366
|
+
|
367
|
+
<div id="validator-badges">
|
368
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
369
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
370
|
+
Rdoc Generator</a> 2</small>.</p>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
</body>
|
374
|
+
</html>
|
375
|
+
|