nano-store 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +3 -1
- data/Rakefile +1 -1
- data/lib/nano_store.rb +1 -1
- data/lib/nano_store/model.rb +11 -7
- data/lib/nano_store/version.rb +1 -1
- data/spec/model_spec.rb +2 -5
- data/vendor/Podfile.lock +4 -4
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoSearch.h +4 -2
- data/vendor/Pods/Documentation/NanoStore/docset-installed.txt +4 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Info.plist +33 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoBag.html +2266 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoEngine.html +4708 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoExpression.html +818 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoObject.html +1781 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoPredicate.html +800 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoResult.html +1054 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoSearch.html +2544 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoSortDescriptor.html +713 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoStore.html +3723 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFOrderedDictionary.html +312 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Protocols/NSFNanoObjectProtocol.html +651 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/css/styles.css +584 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/css/stylesPrint.css +22 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/hierarchy.html +106 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/button_bar_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/disclosure.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/disclosure_open.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/library_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/title_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/index.html +654 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Nodes.xml +92 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens1.xml +596 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens10.xml +48 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens11.xml +118 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens2.xml +1209 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens3.xml +158 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens4.xml +455 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens5.xml +166 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens6.xml +246 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens7.xml +821 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens8.xml +125 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens9.xml +1082 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.dsidx +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.mom +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.skidx +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.toc +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoBag.html +2266 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoEngine.html +4708 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoExpression.html +818 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoObject.html +1781 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoPredicate.html +800 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoResult.html +1054 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoSearch.html +2544 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoSortDescriptor.html +713 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoStore.html +3723 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFOrderedDictionary.html +312 -0
- data/vendor/Pods/Documentation/NanoStore/html/Protocols/NSFNanoObjectProtocol.html +651 -0
- data/vendor/Pods/Documentation/NanoStore/html/css/styles.css +584 -0
- data/vendor/Pods/Documentation/NanoStore/html/css/stylesPrint.css +22 -0
- data/vendor/Pods/Documentation/NanoStore/html/hierarchy.html +106 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/button_bar_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/disclosure.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/disclosure_open.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/library_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/title_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/index.html +654 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/Headers/NanoStore/NSFNanoSearch.h +4 -2
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.m +1 -0
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m +15 -14
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.h +4 -2
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m +95 -20
- data/vendor/Pods/Pods.bridgesupport +708 -700
- data/vendor/Pods/Pods.xcconfig +3 -3
- metadata +62 -4
@@ -0,0 +1,2544 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
5
|
+
<title>NSFNanoSearch Class Reference</title>
|
6
|
+
<meta id="xcode-display" name="xcode-display" content="render"/>
|
7
|
+
<meta name="viewport" content="width=550" />
|
8
|
+
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
|
9
|
+
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
|
10
|
+
<meta name="generator" content="appledoc 2.0.5 (build 789)" />
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<header id="top_header">
|
14
|
+
<div id="library" class="hideInXcode">
|
15
|
+
<h1><a id="libraryTitle" href="../index.html">NanoStore 2.5.7 </a></h1>
|
16
|
+
<a id="developerHome" href="../index.html">Tito Ciuro</a>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div id="title" role="banner">
|
20
|
+
<h1 class="hideInXcode">NSFNanoSearch Class Reference</h1>
|
21
|
+
</div>
|
22
|
+
<ul id="headerButtons" role="toolbar">
|
23
|
+
<li id="toc_button">
|
24
|
+
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
|
25
|
+
</li>
|
26
|
+
<li id="jumpto_button" role="navigation">
|
27
|
+
<select id="jumpTo">
|
28
|
+
<option value="top">Jump To…</option>
|
29
|
+
|
30
|
+
<option value="overview">Overview</option>
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
<option value="tasks">Tasks</option>
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
<option value="properties">Properties</option>
|
42
|
+
|
43
|
+
<option value="//api/name/attribute"> attribute</option>
|
44
|
+
|
45
|
+
<option value="//api/name/attributesToBeReturned"> attributesToBeReturned</option>
|
46
|
+
|
47
|
+
<option value="//api/name/bag"> bag</option>
|
48
|
+
|
49
|
+
<option value="//api/name/expressions"> expressions</option>
|
50
|
+
|
51
|
+
<option value="//api/name/filterClass"> filterClass</option>
|
52
|
+
|
53
|
+
<option value="//api/name/groupValues"> groupValues</option>
|
54
|
+
|
55
|
+
<option value="//api/name/key"> key</option>
|
56
|
+
|
57
|
+
<option value="//api/name/limit"> limit</option>
|
58
|
+
|
59
|
+
<option value="//api/name/match"> match</option>
|
60
|
+
|
61
|
+
<option value="//api/name/nanoStore"> nanoStore</option>
|
62
|
+
|
63
|
+
<option value="//api/name/offset"> offset</option>
|
64
|
+
|
65
|
+
<option value="//api/name/sort"> sort</option>
|
66
|
+
|
67
|
+
<option value="//api/name/sql"> sql</option>
|
68
|
+
|
69
|
+
<option value="//api/name/value"> value</option>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<option value="class_methods">Class Methods</option>
|
75
|
+
|
76
|
+
<option value="//api/name/_prepareSQLQueryStringWithKeys:"> + _prepareSQLQueryStringWithKeys:</option>
|
77
|
+
|
78
|
+
<option value="//api/name/_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:"> + _querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:</option>
|
79
|
+
|
80
|
+
<option value="//api/name/_querySegmentForColumn:value:matching:"> + _querySegmentForColumn:value:matching:</option>
|
81
|
+
|
82
|
+
<option value="//api/name/_quoteStrings:joiningWithDelimiter:"> + _quoteStrings:joiningWithDelimiter:</option>
|
83
|
+
|
84
|
+
<option value="//api/name/searchWithStore:"> + searchWithStore:</option>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<option value="instance_methods">Instance Methods</option>
|
90
|
+
|
91
|
+
<option value="//api/name/JSONDescription"> - JSONDescription</option>
|
92
|
+
|
93
|
+
<option value="//api/name/_dataWithKey:attribute:value:matching:"> - _dataWithKey:attribute:value:matching:</option>
|
94
|
+
|
95
|
+
<option value="//api/name/_dataWithKey:attribute:value:matching:returning:"> - _dataWithKey:attribute:value:matching:returning:</option>
|
96
|
+
|
97
|
+
<option value="//api/name/_dictionaryForKeyPath:value:"> - _dictionaryForKeyPath:value:</option>
|
98
|
+
|
99
|
+
<option value="//api/name/_prepareSQLQueryStringWithExpressions:"> - _prepareSQLQueryStringWithExpressions:</option>
|
100
|
+
|
101
|
+
<option value="//api/name/_prepareSQLQueryStringWithKey:attribute:value:matching:"> - _prepareSQLQueryStringWithKey:attribute:value:matching:</option>
|
102
|
+
|
103
|
+
<option value="//api/name/_preparedSQL"> - _preparedSQL</option>
|
104
|
+
|
105
|
+
<option value="//api/name/_resultsFromSQLQuery:"> - _resultsFromSQLQuery:</option>
|
106
|
+
|
107
|
+
<option value="//api/name/_retrieveDataAdded:calendarDate:error:"> - _retrieveDataAdded:calendarDate:error:</option>
|
108
|
+
|
109
|
+
<option value="//api/name/_retrieveDataWithError:"> - _retrieveDataWithError:</option>
|
110
|
+
|
111
|
+
<option value="//api/name/_sortResultsIfApplicable:returnType:"> - _sortResultsIfApplicable:returnType:</option>
|
112
|
+
|
113
|
+
<option value="//api/name/aggregateOperation:onAttribute:"> - aggregateOperation:onAttribute:</option>
|
114
|
+
|
115
|
+
<option value="//api/name/description"> - description</option>
|
116
|
+
|
117
|
+
<option value="//api/name/executeSQL:"> - executeSQL:</option>
|
118
|
+
|
119
|
+
<option value="//api/name/executeSQL:returnType:error:"> - executeSQL:returnType:error:</option>
|
120
|
+
|
121
|
+
<option value="//api/name/explainSQL:"> - explainSQL:</option>
|
122
|
+
|
123
|
+
<option value="//api/name/initWithStore:"> - initWithStore:</option>
|
124
|
+
|
125
|
+
<option value="//api/name/reset"> - reset</option>
|
126
|
+
|
127
|
+
<option value="//api/name/searchObjectsAdded:date:returnType:error:"> - searchObjectsAdded:date:returnType:error:</option>
|
128
|
+
|
129
|
+
<option value="//api/name/searchObjectsWithReturnType:error:"> - searchObjectsWithReturnType:error:</option>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
</select>
|
134
|
+
</li>
|
135
|
+
</ul>
|
136
|
+
</header>
|
137
|
+
<nav id="tocContainer" class="isShowingTOC">
|
138
|
+
<ul id="toc" role="tree">
|
139
|
+
|
140
|
+
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
|
146
|
+
|
147
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Creating and Initializing a Search">Creating and Initializing a Search</a></span></li>
|
148
|
+
|
149
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Searching">Searching</a></span></li>
|
150
|
+
|
151
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Resetting Values">Resetting Values</a></span></li>
|
152
|
+
|
153
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Private Methods">Private Methods</a></span></li>
|
154
|
+
|
155
|
+
</ul></li>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
|
162
|
+
|
163
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/attribute">attribute</a></span></li>
|
164
|
+
|
165
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/attributesToBeReturned">attributesToBeReturned</a></span></li>
|
166
|
+
|
167
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/bag">bag</a></span></li>
|
168
|
+
|
169
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/expressions">expressions</a></span></li>
|
170
|
+
|
171
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/filterClass">filterClass</a></span></li>
|
172
|
+
|
173
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/groupValues">groupValues</a></span></li>
|
174
|
+
|
175
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/key">key</a></span></li>
|
176
|
+
|
177
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/limit">limit</a></span></li>
|
178
|
+
|
179
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/match">match</a></span></li>
|
180
|
+
|
181
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/nanoStore">nanoStore</a></span></li>
|
182
|
+
|
183
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offset">offset</a></span></li>
|
184
|
+
|
185
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sort">sort</a></span></li>
|
186
|
+
|
187
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sql">sql</a></span></li>
|
188
|
+
|
189
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/value">value</a></span></li>
|
190
|
+
|
191
|
+
</ul></li>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
|
196
|
+
|
197
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_prepareSQLQueryStringWithKeys:">_prepareSQLQueryStringWithKeys:</a></span></li>
|
198
|
+
|
199
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:">_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:</a></span></li>
|
200
|
+
|
201
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_querySegmentForColumn:value:matching:">_querySegmentForColumn:value:matching:</a></span></li>
|
202
|
+
|
203
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_quoteStrings:joiningWithDelimiter:">_quoteStrings:joiningWithDelimiter:</a></span></li>
|
204
|
+
|
205
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/searchWithStore:">searchWithStore:</a></span></li>
|
206
|
+
|
207
|
+
</ul></li>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
|
212
|
+
|
213
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/JSONDescription">JSONDescription</a></span></li>
|
214
|
+
|
215
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_dataWithKey:attribute:value:matching:">_dataWithKey:attribute:value:matching:</a></span></li>
|
216
|
+
|
217
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_dataWithKey:attribute:value:matching:returning:">_dataWithKey:attribute:value:matching:returning:</a></span></li>
|
218
|
+
|
219
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_dictionaryForKeyPath:value:">_dictionaryForKeyPath:value:</a></span></li>
|
220
|
+
|
221
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_prepareSQLQueryStringWithExpressions:">_prepareSQLQueryStringWithExpressions:</a></span></li>
|
222
|
+
|
223
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_prepareSQLQueryStringWithKey:attribute:value:matching:">_prepareSQLQueryStringWithKey:attribute:value:matching:</a></span></li>
|
224
|
+
|
225
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_preparedSQL">_preparedSQL</a></span></li>
|
226
|
+
|
227
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_resultsFromSQLQuery:">_resultsFromSQLQuery:</a></span></li>
|
228
|
+
|
229
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_retrieveDataAdded:calendarDate:error:">_retrieveDataAdded:calendarDate:error:</a></span></li>
|
230
|
+
|
231
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_retrieveDataWithError:">_retrieveDataWithError:</a></span></li>
|
232
|
+
|
233
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_sortResultsIfApplicable:returnType:">_sortResultsIfApplicable:returnType:</a></span></li>
|
234
|
+
|
235
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/aggregateOperation:onAttribute:">aggregateOperation:onAttribute:</a></span></li>
|
236
|
+
|
237
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/description">description</a></span></li>
|
238
|
+
|
239
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/executeSQL:">executeSQL:</a></span></li>
|
240
|
+
|
241
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/executeSQL:returnType:error:">executeSQL:returnType:error:</a></span></li>
|
242
|
+
|
243
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/explainSQL:">explainSQL:</a></span></li>
|
244
|
+
|
245
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithStore:">initWithStore:</a></span></li>
|
246
|
+
|
247
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/reset">reset</a></span></li>
|
248
|
+
|
249
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/searchObjectsAdded:date:returnType:error:">searchObjectsAdded:date:returnType:error:</a></span></li>
|
250
|
+
|
251
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/searchObjectsWithReturnType:error:">searchObjectsWithReturnType:error:</a></span></li>
|
252
|
+
|
253
|
+
</ul></li>
|
254
|
+
|
255
|
+
|
256
|
+
</ul>
|
257
|
+
</nav>
|
258
|
+
<article>
|
259
|
+
<div id="contents" class="isShowingTOC" role="main">
|
260
|
+
<a title="NSFNanoSearch Class Reference" name="top"></a>
|
261
|
+
<div class="main-navigation navigation-top">
|
262
|
+
<ul>
|
263
|
+
<li><a href="../index.html">Index</a></li>
|
264
|
+
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
265
|
+
</ul>
|
266
|
+
</div>
|
267
|
+
<div id="header">
|
268
|
+
<div class="section-header">
|
269
|
+
<h1 class="title title-header">NSFNanoSearch Class Reference</h1>
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
<div id="container">
|
273
|
+
|
274
|
+
<div class="section section-specification"><table cellspacing="0"><tbody>
|
275
|
+
<tr>
|
276
|
+
<td class="specification-title">Inherits from</td>
|
277
|
+
<td class="specification-value">NSObject</td>
|
278
|
+
</tr><tr>
|
279
|
+
<td class="specification-title">Declared in</td>
|
280
|
+
<td class="specification-value">NSFNanoSearch.h</td>
|
281
|
+
</tr>
|
282
|
+
</tbody></table></div>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<div class="section section-overview">
|
288
|
+
<a title="Overview" name="overview"></a>
|
289
|
+
<h2 class="subtitle subtitle-overview">Overview</h2>
|
290
|
+
<p>@class NSFNanoSearch
|
291
|
+
* A unit that provides an API to retrieve data from the document store.
|
292
|
+
*
|
293
|
+
* The search can be conducted in two ways: programatically via setters or by providing a SQL statement. In both cases,
|
294
|
+
* it’s necessary to indicate which object type should be returned. The type \link Globals::NSFReturnType NSFReturnType \endlink provides two options: \link Globals::NSFReturnObjects NSFReturnObjects \endlink and \link Globals::NSFReturnKeys NSFReturnKeys \endlink.
|
295
|
+
*
|
296
|
+
* – \link Globals::NSFReturnObjects NSFReturnObjects \endlink will return a dictionary with the <a href="#//api/name/key">key</a> of the NanoObject (<a href="#//api/name/key">key</a>) and the NanoObject itself (<a href="#//api/name/value">value</a>).
|
297
|
+
* – \link Globals::NSFReturnKeys NSFReturnKeys \endlink will return an array of NanoObjects.
|
298
|
+
*
|
299
|
+
* @par <b>Some observations about retrieving data</b><br>
|
300
|
+
*
|
301
|
+
* Given the following data set:
|
302
|
+
*
|
303
|
+
* – Number of dictionaries: 3.956
|
304
|
+
* – Number of attributes: 593.862
|
305
|
+
*
|
306
|
+
* The table describing different timings to perform a simple <a href="#//api/name/value">value</a> search (i.e. ‘Barcelona’) is included below, ordered from fastest to slowest:
|
307
|
+
*
|
308
|
+
<em><table border="1" cellpadding="5">
|
309
|
+
</em><tr>
|
310
|
+
<em><th>Match type</th>
|
311
|
+
</em><th>Seconds</th>
|
312
|
+
<em></tr>
|
313
|
+
</em><tr><td>Equal to</td><td>0.295</td></tr>
|
314
|
+
<em><tr><td>Begins with</td><td>0.295</td></tr>
|
315
|
+
</em><tr><td>Contains</td><td>1.295</td></tr>
|
316
|
+
<em><tr><td>Contains (insensitive)</td><td>1.339</td></tr>
|
317
|
+
</em><tr><td>Ends with (insensitive)</td><td>1.341</td></tr>
|
318
|
+
<em><tr><td>Ends with</td><td>1.351</td></tr>
|
319
|
+
</em><tr><td>Equal to (insensitive)</td><td>1.890</td></tr>
|
320
|
+
<em><tr><td>Begins with (insensitive)</td><td>2.412</td></tr>
|
321
|
+
</em><tr><td>Greater than</td><td>18.246</td></tr>
|
322
|
+
<em><tr><td>Less than</td><td>27.677</td></tr>
|
323
|
+
</em></table></p>
|
324
|
+
|
325
|
+
<p>@section wherearetheobjects_sec Where are my objects?</p>
|
326
|
+
|
327
|
+
<p>While <a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> provides some convenience methods to obtain standard objects (such as objects of type <a href="../Classes/NSFNanoBag.html">NSFNanoBag</a>), the bulk of the search mechanism is handled by NSFNanoSearch.
|
328
|
+
The steps involved to perform a search are quite simple:</p>
|
329
|
+
|
330
|
+
<ul>
|
331
|
+
<li>1) Instantiate a search object</li>
|
332
|
+
<li>2) Configure the search via its accessors</li>
|
333
|
+
<li>3) Obtain the results specifying whether objects or keys should be returned (*)</li>
|
334
|
+
</ul>
|
335
|
+
|
336
|
+
|
337
|
+
<p>(<em>) Request objects if you’re interested in the data. Otherwise, you should request keys if you need to feed the result to another method, such as <a href="../Classes/NSFNanoStore.html">NSFNanoStore</a>
|
338
|
+
\link <a href="../Classes/NSFNanoStore.html">NSFNanoStore</a>::removeObjectsWithKeysInArray:error: –(BOOL)removeObjectsWithKeysInArray:(NSArray </em>)theKeys error:(out NSError **)outError \endlink method.</p>
|
339
|
+
|
340
|
+
<p>@details <b>Example: finding all objects with the <a href="#//api/name/attribute">attribute</a> ‘LastName’ and <a href="#//api/name/value">value</a> ‘Doe’.</b>
|
341
|
+
@code
|
342
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
343
|
+
|
344
|
+
<p>search.<a href="#//api/name/attribute">attribute</a> = @“LastName”;
|
345
|
+
search.<a href="#//api/name/match">match</a> = NSFEqualTo;
|
346
|
+
search.<a href="#//api/name/value">value</a> = @“Doe”;</p>
|
347
|
+
|
348
|
+
<p>// Returns a dictionary with the UUID of the object (<a href="#//api/name/key">key</a>) and the NanoObject (<a href="#//api/name/value">value</a>).
|
349
|
+
NSDictionary *searchResults = [search searchObjectsWithReturnType:NSFReturnObjects error:nil];
|
350
|
+
@endcode</p>
|
351
|
+
|
352
|
+
<p>@details <b>Example: removing all objects with the <a href="#//api/name/attribute">attribute</a> ‘LastName’ and <a href="#//api/name/value">value</a> ‘Doe’.</b>
|
353
|
+
@code
|
354
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
355
|
+
|
356
|
+
<p>search.<a href="#//api/name/attribute">attribute</a> = @“LastName”;
|
357
|
+
search.<a href="#//api/name/match">match</a> = NSFEqualTo;
|
358
|
+
search.<a href="#//api/name/value">value</a> = @“Doe”;</p>
|
359
|
+
|
360
|
+
<p>// Returns an array of matching UUIDs
|
361
|
+
NSArray *matchingKeys = [search searchObjectsWithReturnType:NSFReturnKeys error:nil];</p>
|
362
|
+
|
363
|
+
<p>// Remove the NanoObjects matching the selected UUIDs
|
364
|
+
NSError *outError = nil;
|
365
|
+
if (YES == [nanoStore removeObjectsWithKeysInArray:matchingKeys error:&outError]) {
|
366
|
+
NSLog(@“The matching objects have been removed.”);
|
367
|
+
} else {
|
368
|
+
NSLog(@“An error has occurred while removing the matching objects. Reason: %@”, [outError localizedDescription]);
|
369
|
+
}
|
370
|
+
@endcode</p>
|
371
|
+
|
372
|
+
<p>Another cool feature is the possibility to invoke aggregated functions (count, avg, min, max and total) on the search results. Using the search snippet above,
|
373
|
+
calculating the average salary of all people with last name equal to ‘Doe’ is very easy.</p>
|
374
|
+
|
375
|
+
<p>@details <b>Example: calculating the average salary of all objects with the <a href="#//api/name/attribute">attribute</a> ‘LastName’ and <a href="#//api/name/value">value</a> ‘Doe’.</b>
|
376
|
+
@code
|
377
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
378
|
+
|
379
|
+
<p>search.<a href="#//api/name/attribute">attribute</a> = @“LastName”;
|
380
|
+
search.<a href="#//api/name/match">match</a> = NSFEqualTo;
|
381
|
+
search.<a href="#//api/name/value">value</a> = @“Doe”;</p>
|
382
|
+
|
383
|
+
<p>float averageSalary = [[search aggregateOperation:NSFAverage onAttribute:@“Salary”]floatValue];
|
384
|
+
@endcode</p>
|
385
|
+
|
386
|
+
<ul>
|
387
|
+
<li>@details <b>Example:</b>
|
388
|
+
@code
|
389
|
+
// Instantiate a NanoStore and open it
|
390
|
+
<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];</li>
|
391
|
+
</ul>
|
392
|
+
|
393
|
+
|
394
|
+
<p>// Generate a NanoObject with a dictionary and a <a href="#//api/name/key">key</a>
|
395
|
+
NSString <em><a href="#//api/name/key">key</a> = @“ABC-123”;
|
396
|
+
NSDictionary </em>info = …;
|
397
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> *nanoObject = [NSFNanoObject nanoObjectWithDictionary:info];</p>
|
398
|
+
|
399
|
+
<p>// Add it to the document store
|
400
|
+
[<a href="#//api/name/nanoStore">nanoStore</a> addObject:nanoObject error:nil];</p>
|
401
|
+
|
402
|
+
<p>// Instantiate a search and specify the <a href="#//api/name/attribute">attribute</a>(s) we want to search for
|
403
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];
|
404
|
+
search.<a href="#//api/name/key">key</a> = <a href="#//api/name/key">key</a>;</p>
|
405
|
+
|
406
|
+
<p>// Perform the search and obtain the results
|
407
|
+
NSDictionary *searchResults = [search searchObjectsWithReturnType:NSFReturnObjects error:nil];</p>
|
408
|
+
|
409
|
+
<p>// Close the document store
|
410
|
+
[nanoStore closeWithError:nil];
|
411
|
+
@endcode</p>
|
412
|
+
|
413
|
+
<p>\cond</p>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
<div class="section section-tasks">
|
421
|
+
<a title="Tasks" name="tasks"></a>
|
422
|
+
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
<h3 class="subsubtitle task-title">Other Methods</h3>
|
427
|
+
|
428
|
+
<ul class="task-list">
|
429
|
+
<li>
|
430
|
+
<span class="tooltip">
|
431
|
+
<code><a href="#//api/name/nanoStore"> nanoStore</a></code>
|
432
|
+
<span class="tooltip"><ul>
|
433
|
+
<li>The document store used for searching.</li>
|
434
|
+
</ul>
|
435
|
+
</span>
|
436
|
+
</span>
|
437
|
+
<span class="task-item-suffix">property</span>
|
438
|
+
|
439
|
+
</li><li>
|
440
|
+
<span class="tooltip">
|
441
|
+
<code><a href="#//api/name/attributesToBeReturned"> attributesToBeReturned</a></code>
|
442
|
+
<span class="tooltip"><ul>
|
443
|
+
<li>The set of attributes to be returned on matching objects.</li>
|
444
|
+
</ul>
|
445
|
+
</span>
|
446
|
+
</span>
|
447
|
+
<span class="task-item-suffix">property</span>
|
448
|
+
|
449
|
+
</li><li>
|
450
|
+
<span class="tooltip">
|
451
|
+
<code><a href="#//api/name/key"> key</a></code>
|
452
|
+
<span class="tooltip"><ul>
|
453
|
+
<li>The key used for searching.</li>
|
454
|
+
</ul>
|
455
|
+
</span>
|
456
|
+
</span>
|
457
|
+
<span class="task-item-suffix">property</span>
|
458
|
+
|
459
|
+
</li><li>
|
460
|
+
<span class="tooltip">
|
461
|
+
<code><a href="#//api/name/attribute"> attribute</a></code>
|
462
|
+
<span class="tooltip"><ul>
|
463
|
+
<li>The attribute used for searching.</li>
|
464
|
+
</ul>
|
465
|
+
</span>
|
466
|
+
</span>
|
467
|
+
<span class="task-item-suffix">property</span>
|
468
|
+
|
469
|
+
</li><li>
|
470
|
+
<span class="tooltip">
|
471
|
+
<code><a href="#//api/name/value"> value</a></code>
|
472
|
+
<span class="tooltip"><ul>
|
473
|
+
<li>The value used for searching.</li>
|
474
|
+
</ul>
|
475
|
+
</span>
|
476
|
+
</span>
|
477
|
+
<span class="task-item-suffix">property</span>
|
478
|
+
|
479
|
+
</li><li>
|
480
|
+
<span class="tooltip">
|
481
|
+
<code><a href="#//api/name/match"> match</a></code>
|
482
|
+
<span class="tooltip"><ul>
|
483
|
+
<li>The comparison operator used for searching.</li>
|
484
|
+
</ul>
|
485
|
+
</span>
|
486
|
+
</span>
|
487
|
+
<span class="task-item-suffix">property</span>
|
488
|
+
|
489
|
+
</li><li>
|
490
|
+
<span class="tooltip">
|
491
|
+
<code><a href="#//api/name/expressions"> expressions</a></code>
|
492
|
+
<span class="tooltip"><ul>
|
493
|
+
<li>The list of <a href="../Classes/NSFNanoExpression.html">NSFNanoExpression</a> objects used for searching.</li>
|
494
|
+
</ul>
|
495
|
+
</span>
|
496
|
+
</span>
|
497
|
+
<span class="task-item-suffix">property</span>
|
498
|
+
|
499
|
+
</li><li>
|
500
|
+
<span class="tooltip">
|
501
|
+
<code><a href="#//api/name/groupValues"> groupValues</a></code>
|
502
|
+
<span class="tooltip"><ul>
|
503
|
+
<li>If set to YES, specifying NSFReturnKeys applies the DISTINCT function and groups the values.</li>
|
504
|
+
</ul>
|
505
|
+
</span>
|
506
|
+
</span>
|
507
|
+
<span class="task-item-suffix">property</span>
|
508
|
+
|
509
|
+
</li><li>
|
510
|
+
<span class="tooltip">
|
511
|
+
<code><a href="#//api/name/sql"> sql</a></code>
|
512
|
+
<span class="tooltip"><ul>
|
513
|
+
<li>The SQL statement used for searching. Set when <a href="#//api/name/executeSQL:">executeSQL:</a> is invoked.</li>
|
514
|
+
</ul>
|
515
|
+
</span>
|
516
|
+
</span>
|
517
|
+
<span class="task-item-suffix">property</span>
|
518
|
+
|
519
|
+
</li><li>
|
520
|
+
<span class="tooltip">
|
521
|
+
<code><a href="#//api/name/sort"> sort</a></code>
|
522
|
+
<span class="tooltip"><ul>
|
523
|
+
<li>The sort holds an array of one or more sort descriptors of type \link <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> \endlink.</li>
|
524
|
+
</ul>
|
525
|
+
</span>
|
526
|
+
</span>
|
527
|
+
<span class="task-item-suffix">property</span>
|
528
|
+
|
529
|
+
</li><li>
|
530
|
+
<span class="tooltip">
|
531
|
+
<code><a href="#//api/name/filterClass"> filterClass</a></code>
|
532
|
+
<span class="tooltip"><ul>
|
533
|
+
<li>The filterClass allows to filter the results based on a specific object class.</li>
|
534
|
+
</ul>
|
535
|
+
</span>
|
536
|
+
</span>
|
537
|
+
<span class="task-item-suffix">property</span>
|
538
|
+
|
539
|
+
</li><li>
|
540
|
+
<span class="tooltip">
|
541
|
+
<code><a href="#//api/name/offset"> offset</a></code>
|
542
|
+
<span class="tooltip"><ul>
|
543
|
+
<li>If an expression has an offset clause, then the first M rows are omitted from the result set returned by the search operation and the next N rows are returned, where M and N are the values that the offset and <a href="#//api/name/limit">limit</a> clauses evaluate to, respectively. Or, if the search would return less than M+N rows if it did not have a <a href="#//api/name/limit">limit</a> clause, then the first M rows are skipped and the remaining rows (if any) are returned.</li>
|
544
|
+
</ul>
|
545
|
+
</span>
|
546
|
+
</span>
|
547
|
+
<span class="task-item-suffix">property</span>
|
548
|
+
|
549
|
+
</li><li>
|
550
|
+
<span class="tooltip">
|
551
|
+
<code><a href="#//api/name/limit"> limit</a></code>
|
552
|
+
<span class="tooltip"><ul>
|
553
|
+
<li>The limit clause is used to place an upper bound on the number of rows returned by a Search operation.</li>
|
554
|
+
</ul>
|
555
|
+
</span>
|
556
|
+
</span>
|
557
|
+
<span class="task-item-suffix">property</span>
|
558
|
+
|
559
|
+
</li><li>
|
560
|
+
<span class="tooltip">
|
561
|
+
<code><a href="#//api/name/bag"> bag</a></code>
|
562
|
+
<span class="tooltip"><ul>
|
563
|
+
<li><a href="#//api/name/limit">limit</a> a Search to a particular bag.</li>
|
564
|
+
</ul>
|
565
|
+
</span>
|
566
|
+
</span>
|
567
|
+
<span class="task-item-suffix">property</span>
|
568
|
+
|
569
|
+
</li>
|
570
|
+
</ul>
|
571
|
+
|
572
|
+
|
573
|
+
<a title="Creating and Initializing a Search" name="task_Creating and Initializing a Search"></a>
|
574
|
+
<h3 class="subsubtitle task-title">Creating and Initializing a Search</h3>
|
575
|
+
|
576
|
+
<ul class="task-list">
|
577
|
+
<li>
|
578
|
+
<span class="tooltip">
|
579
|
+
<code><a href="#//api/name/searchWithStore:">+ searchWithStore:</a></code>
|
580
|
+
<span class="tooltip"><p>Creates and returns a search element for a given document store.</p></span>
|
581
|
+
</span>
|
582
|
+
|
583
|
+
|
584
|
+
</li><li>
|
585
|
+
<span class="tooltip">
|
586
|
+
<code><a href="#//api/name/initWithStore:">– initWithStore:</a></code>
|
587
|
+
<span class="tooltip"><p>Initializes a newly allocated search element for a given document store.</p></span>
|
588
|
+
</span>
|
589
|
+
|
590
|
+
|
591
|
+
</li>
|
592
|
+
</ul>
|
593
|
+
|
594
|
+
|
595
|
+
<a title="Searching" name="task_Searching"></a>
|
596
|
+
<h3 class="subsubtitle task-title">Searching</h3>
|
597
|
+
|
598
|
+
<ul class="task-list">
|
599
|
+
<li>
|
600
|
+
<span class="tooltip">
|
601
|
+
<code><a href="#//api/name/searchObjectsWithReturnType:error:">– searchObjectsWithReturnType:error:</a></code>
|
602
|
+
<span class="tooltip"><p>Performs a search using the values of the properties.</p></span>
|
603
|
+
</span>
|
604
|
+
|
605
|
+
|
606
|
+
</li><li>
|
607
|
+
<span class="tooltip">
|
608
|
+
<code><a href="#//api/name/searchObjectsAdded:date:returnType:error:">– searchObjectsAdded:date:returnType:error:</a></code>
|
609
|
+
<span class="tooltip"><p>Performs a search using the values of the properties before, on or after a given date.</p></span>
|
610
|
+
</span>
|
611
|
+
|
612
|
+
|
613
|
+
</li><li>
|
614
|
+
<span class="tooltip">
|
615
|
+
<code><a href="#//api/name/aggregateOperation:onAttribute:">– aggregateOperation:onAttribute:</a></code>
|
616
|
+
<span class="tooltip"><ul>
|
617
|
+
<li>Returns the result of the aggregate function.</li>
|
618
|
+
<li>@param theFunctionType is the function type to be applied.</li>
|
619
|
+
<li>@param theAttribute is the <a href="#//api/name/attribute">attribute</a> used in the function.</li>
|
620
|
+
<li>@returns An NSNumber containing the result of the aggregate function.</li>
|
621
|
+
<li>@details <b>Example:</b>
|
622
|
+
@code</li>
|
623
|
+
<li><a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];
|
624
|
+
*</li>
|
625
|
+
<li>// Assume we have saved data to the document store</li>
|
626
|
+
<li>…</li>
|
627
|
+
<li>…
|
628
|
+
*</li>
|
629
|
+
<li>// Get the average for the <a href="#//api/name/attribute">attribute</a> named ‘SomeNumber’</li>
|
630
|
+
<li>NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</li>
|
631
|
+
<li>NSNumber *result = [search aggregateOperation:NSFAverage onAttribute:@“SomeNumber”];
|
632
|
+
@endcode</li>
|
633
|
+
</ul>
|
634
|
+
</span>
|
635
|
+
</span>
|
636
|
+
|
637
|
+
|
638
|
+
</li><li>
|
639
|
+
<span class="tooltip">
|
640
|
+
<code><a href="#//api/name/executeSQL:returnType:error:">– executeSQL:returnType:error:</a></code>
|
641
|
+
<span class="tooltip"><p>Performs a search with a given SQL statement.</p></span>
|
642
|
+
</span>
|
643
|
+
|
644
|
+
|
645
|
+
</li><li>
|
646
|
+
<span class="tooltip">
|
647
|
+
<code><a href="#//api/name/executeSQL:">– executeSQL:</a></code>
|
648
|
+
<span class="tooltip"><p>Performs a search with a given SQL statement.</p></span>
|
649
|
+
</span>
|
650
|
+
|
651
|
+
|
652
|
+
</li><li>
|
653
|
+
<span class="tooltip">
|
654
|
+
<code><a href="#//api/name/explainSQL:">– explainSQL:</a></code>
|
655
|
+
<span class="tooltip"><p>Performs an analysis of the given SQL statement.</p></span>
|
656
|
+
</span>
|
657
|
+
|
658
|
+
|
659
|
+
</li>
|
660
|
+
</ul>
|
661
|
+
|
662
|
+
|
663
|
+
<a title="Resetting Values" name="task_Resetting Values"></a>
|
664
|
+
<h3 class="subsubtitle task-title">Resetting Values</h3>
|
665
|
+
|
666
|
+
<ul class="task-list">
|
667
|
+
<li>
|
668
|
+
<span class="tooltip">
|
669
|
+
<code><a href="#//api/name/reset">– reset</a></code>
|
670
|
+
<span class="tooltip"><p>Resets the values to a know, default state.
|
671
|
+
– <a href="#//api/name/key">key</a> = nil;
|
672
|
+
– <a href="#//api/name/attribute">attribute</a> = nil;
|
673
|
+
– <a href="#//api/name/value">value</a> = nil;
|
674
|
+
– <a href="#//api/name/match">match</a> = NSFContains;
|
675
|
+
– object type = NSFReturnObjects;
|
676
|
+
– <a href="#//api/name/groupValues">groupValues</a> = NO;
|
677
|
+
– attributesReturned = nil;
|
678
|
+
– type returned = NSFReturnObjects;
|
679
|
+
– <a href="#//api/name/sql">sql</a> = nil;
|
680
|
+
– <a href="#//api/name/sort">sort</a> = nil;</p></span>
|
681
|
+
</span>
|
682
|
+
|
683
|
+
|
684
|
+
</li><li>
|
685
|
+
<span class="tooltip">
|
686
|
+
<code><a href="#//api/name/description">– description</a></code>
|
687
|
+
<span class="tooltip"><p>Returns a string representation of the search.</p></span>
|
688
|
+
</span>
|
689
|
+
|
690
|
+
|
691
|
+
</li><li>
|
692
|
+
<span class="tooltip">
|
693
|
+
<code><a href="#//api/name/JSONDescription">– JSONDescription</a></code>
|
694
|
+
<span class="tooltip"><p>Returns a JSON representation of the search.</p></span>
|
695
|
+
</span>
|
696
|
+
|
697
|
+
|
698
|
+
</li>
|
699
|
+
</ul>
|
700
|
+
|
701
|
+
|
702
|
+
<a title="Private Methods" name="task_Private Methods"></a>
|
703
|
+
<h3 class="subsubtitle task-title">Private Methods</h3>
|
704
|
+
|
705
|
+
<ul class="task-list">
|
706
|
+
<li>
|
707
|
+
<span class="tooltip">
|
708
|
+
<code><a href="#//api/name/_retrieveDataWithError:">– _retrieveDataWithError:</a></code>
|
709
|
+
|
710
|
+
</span>
|
711
|
+
|
712
|
+
|
713
|
+
</li><li>
|
714
|
+
<span class="tooltip">
|
715
|
+
<code><a href="#//api/name/_dataWithKey:attribute:value:matching:">– _dataWithKey:attribute:value:matching:</a></code>
|
716
|
+
|
717
|
+
</span>
|
718
|
+
|
719
|
+
|
720
|
+
</li><li>
|
721
|
+
<span class="tooltip">
|
722
|
+
<code><a href="#//api/name/_dataWithKey:attribute:value:matching:returning:">– _dataWithKey:attribute:value:matching:returning:</a></code>
|
723
|
+
|
724
|
+
</span>
|
725
|
+
|
726
|
+
|
727
|
+
</li><li>
|
728
|
+
<span class="tooltip">
|
729
|
+
<code><a href="#//api/name/_retrieveDataAdded:calendarDate:error:">– _retrieveDataAdded:calendarDate:error:</a></code>
|
730
|
+
|
731
|
+
</span>
|
732
|
+
|
733
|
+
|
734
|
+
</li><li>
|
735
|
+
<span class="tooltip">
|
736
|
+
<code><a href="#//api/name/_preparedSQL">– _preparedSQL</a></code>
|
737
|
+
|
738
|
+
</span>
|
739
|
+
|
740
|
+
|
741
|
+
</li><li>
|
742
|
+
<span class="tooltip">
|
743
|
+
<code><a href="#//api/name/_prepareSQLQueryStringWithKey:attribute:value:matching:">– _prepareSQLQueryStringWithKey:attribute:value:matching:</a></code>
|
744
|
+
|
745
|
+
</span>
|
746
|
+
|
747
|
+
|
748
|
+
</li><li>
|
749
|
+
<span class="tooltip">
|
750
|
+
<code><a href="#//api/name/_prepareSQLQueryStringWithExpressions:">– _prepareSQLQueryStringWithExpressions:</a></code>
|
751
|
+
|
752
|
+
</span>
|
753
|
+
|
754
|
+
|
755
|
+
</li><li>
|
756
|
+
<span class="tooltip">
|
757
|
+
<code><a href="#//api/name/_resultsFromSQLQuery:">– _resultsFromSQLQuery:</a></code>
|
758
|
+
|
759
|
+
</span>
|
760
|
+
|
761
|
+
|
762
|
+
</li><li>
|
763
|
+
<span class="tooltip">
|
764
|
+
<code><a href="#//api/name/_prepareSQLQueryStringWithKeys:">+ _prepareSQLQueryStringWithKeys:</a></code>
|
765
|
+
|
766
|
+
</span>
|
767
|
+
|
768
|
+
|
769
|
+
</li><li>
|
770
|
+
<span class="tooltip">
|
771
|
+
<code><a href="#//api/name/_querySegmentForColumn:value:matching:">+ _querySegmentForColumn:value:matching:</a></code>
|
772
|
+
|
773
|
+
</span>
|
774
|
+
|
775
|
+
|
776
|
+
</li><li>
|
777
|
+
<span class="tooltip">
|
778
|
+
<code><a href="#//api/name/_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:">+ _querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:</a></code>
|
779
|
+
|
780
|
+
</span>
|
781
|
+
|
782
|
+
|
783
|
+
</li><li>
|
784
|
+
<span class="tooltip">
|
785
|
+
<code><a href="#//api/name/_dictionaryForKeyPath:value:">– _dictionaryForKeyPath:value:</a></code>
|
786
|
+
|
787
|
+
</span>
|
788
|
+
|
789
|
+
|
790
|
+
</li><li>
|
791
|
+
<span class="tooltip">
|
792
|
+
<code><a href="#//api/name/_quoteStrings:joiningWithDelimiter:">+ _quoteStrings:joiningWithDelimiter:</a></code>
|
793
|
+
|
794
|
+
</span>
|
795
|
+
|
796
|
+
|
797
|
+
</li><li>
|
798
|
+
<span class="tooltip">
|
799
|
+
<code><a href="#//api/name/_sortResultsIfApplicable:returnType:">– _sortResultsIfApplicable:returnType:</a></code>
|
800
|
+
|
801
|
+
</span>
|
802
|
+
|
803
|
+
|
804
|
+
</li>
|
805
|
+
</ul>
|
806
|
+
|
807
|
+
</div>
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
<div class="section section-methods">
|
814
|
+
<a title="Properties" name="properties"></a>
|
815
|
+
<h2 class="subtitle subtitle-methods">Properties</h2>
|
816
|
+
|
817
|
+
<div class="section-method">
|
818
|
+
<a name="//api/name/attribute" title="attribute"></a>
|
819
|
+
<h3 class="subsubtitle method-title">attribute</h3>
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
<div class="method-subsection brief-description">
|
824
|
+
<ul>
|
825
|
+
<li>The attribute used for searching.</li>
|
826
|
+
</ul>
|
827
|
+
|
828
|
+
</div>
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readwrite) NSString *attribute</code></div>
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
<div class="method-subsection discussion-section">
|
843
|
+
<h4 class="method-subtitle">Discussion</h4>
|
844
|
+
<ul>
|
845
|
+
<li>The attribute used for searching.</li>
|
846
|
+
</ul>
|
847
|
+
|
848
|
+
</div>
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
|
855
|
+
|
856
|
+
<div class="method-subsection declared-in-section">
|
857
|
+
<h4 class="method-subtitle">Declared In</h4>
|
858
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
859
|
+
</div>
|
860
|
+
|
861
|
+
|
862
|
+
</div>
|
863
|
+
|
864
|
+
<div class="section-method">
|
865
|
+
<a name="//api/name/attributesToBeReturned" title="attributesToBeReturned"></a>
|
866
|
+
<h3 class="subsubtitle method-title">attributesToBeReturned</h3>
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
<div class="method-subsection brief-description">
|
871
|
+
<ul>
|
872
|
+
<li>The set of attributes to be returned on matching objects.</li>
|
873
|
+
</ul>
|
874
|
+
|
875
|
+
</div>
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readwrite) NSArray *attributesToBeReturned</code></div>
|
880
|
+
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
<div class="method-subsection discussion-section">
|
890
|
+
<h4 class="method-subtitle">Discussion</h4>
|
891
|
+
<ul>
|
892
|
+
<li>The set of attributes to be returned on matching objects.</li>
|
893
|
+
</ul>
|
894
|
+
|
895
|
+
</div>
|
896
|
+
|
897
|
+
|
898
|
+
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
<div class="method-subsection declared-in-section">
|
904
|
+
<h4 class="method-subtitle">Declared In</h4>
|
905
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
906
|
+
</div>
|
907
|
+
|
908
|
+
|
909
|
+
</div>
|
910
|
+
|
911
|
+
<div class="section-method">
|
912
|
+
<a name="//api/name/bag" title="bag"></a>
|
913
|
+
<h3 class="subsubtitle method-title">bag</h3>
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
<div class="method-subsection brief-description">
|
918
|
+
<ul>
|
919
|
+
<li><a href="#//api/name/limit">limit</a> a Search to a particular bag.</li>
|
920
|
+
</ul>
|
921
|
+
|
922
|
+
</div>
|
923
|
+
|
924
|
+
|
925
|
+
|
926
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) NSFNanoBag *bag</code></div>
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
<div class="method-subsection discussion-section">
|
937
|
+
<h4 class="method-subtitle">Discussion</h4>
|
938
|
+
<ul>
|
939
|
+
<li><a href="#//api/name/limit">limit</a> a Search to a particular bag.</li>
|
940
|
+
</ul>
|
941
|
+
|
942
|
+
</div>
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
<div class="method-subsection declared-in-section">
|
951
|
+
<h4 class="method-subtitle">Declared In</h4>
|
952
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
953
|
+
</div>
|
954
|
+
|
955
|
+
|
956
|
+
</div>
|
957
|
+
|
958
|
+
<div class="section-method">
|
959
|
+
<a name="//api/name/expressions" title="expressions"></a>
|
960
|
+
<h3 class="subsubtitle method-title">expressions</h3>
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
<div class="method-subsection brief-description">
|
965
|
+
<ul>
|
966
|
+
<li>The list of <a href="../Classes/NSFNanoExpression.html">NSFNanoExpression</a> objects used for searching.</li>
|
967
|
+
</ul>
|
968
|
+
|
969
|
+
</div>
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readwrite) NSArray *expressions</code></div>
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
<div class="method-subsection discussion-section">
|
984
|
+
<h4 class="method-subtitle">Discussion</h4>
|
985
|
+
<ul>
|
986
|
+
<li>The list of <a href="../Classes/NSFNanoExpression.html">NSFNanoExpression</a> objects used for searching.</li>
|
987
|
+
</ul>
|
988
|
+
|
989
|
+
</div>
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
<div class="method-subsection declared-in-section">
|
998
|
+
<h4 class="method-subtitle">Declared In</h4>
|
999
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1000
|
+
</div>
|
1001
|
+
|
1002
|
+
|
1003
|
+
</div>
|
1004
|
+
|
1005
|
+
<div class="section-method">
|
1006
|
+
<a name="//api/name/filterClass" title="filterClass"></a>
|
1007
|
+
<h3 class="subsubtitle method-title">filterClass</h3>
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
<div class="method-subsection brief-description">
|
1012
|
+
<ul>
|
1013
|
+
<li>The filterClass allows to filter the results based on a specific object class.</li>
|
1014
|
+
</ul>
|
1015
|
+
|
1016
|
+
</div>
|
1017
|
+
|
1018
|
+
|
1019
|
+
|
1020
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readwrite) NSString *filterClass</code></div>
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
<div class="method-subsection discussion-section">
|
1031
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1032
|
+
<ul>
|
1033
|
+
<li>The filterClass allows to filter the results based on a specific object class.</li>
|
1034
|
+
</ul>
|
1035
|
+
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
<div class="method-subsection declared-in-section">
|
1045
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1046
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1047
|
+
</div>
|
1048
|
+
|
1049
|
+
|
1050
|
+
</div>
|
1051
|
+
|
1052
|
+
<div class="section-method">
|
1053
|
+
<a name="//api/name/groupValues" title="groupValues"></a>
|
1054
|
+
<h3 class="subsubtitle method-title">groupValues</h3>
|
1055
|
+
|
1056
|
+
|
1057
|
+
|
1058
|
+
<div class="method-subsection brief-description">
|
1059
|
+
<ul>
|
1060
|
+
<li>If set to YES, specifying NSFReturnKeys applies the DISTINCT function and groups the values.</li>
|
1061
|
+
</ul>
|
1062
|
+
|
1063
|
+
</div>
|
1064
|
+
|
1065
|
+
|
1066
|
+
|
1067
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) BOOL groupValues</code></div>
|
1068
|
+
|
1069
|
+
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
<div class="method-subsection discussion-section">
|
1078
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1079
|
+
<ul>
|
1080
|
+
<li>If set to YES, specifying NSFReturnKeys applies the DISTINCT function and groups the values.</li>
|
1081
|
+
</ul>
|
1082
|
+
|
1083
|
+
</div>
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
<div class="method-subsection declared-in-section">
|
1092
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1093
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1094
|
+
</div>
|
1095
|
+
|
1096
|
+
|
1097
|
+
</div>
|
1098
|
+
|
1099
|
+
<div class="section-method">
|
1100
|
+
<a name="//api/name/key" title="key"></a>
|
1101
|
+
<h3 class="subsubtitle method-title">key</h3>
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
<div class="method-subsection brief-description">
|
1106
|
+
<ul>
|
1107
|
+
<li>The key used for searching.</li>
|
1108
|
+
</ul>
|
1109
|
+
|
1110
|
+
</div>
|
1111
|
+
|
1112
|
+
|
1113
|
+
|
1114
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readwrite) NSString *key</code></div>
|
1115
|
+
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
|
1124
|
+
<div class="method-subsection discussion-section">
|
1125
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1126
|
+
<ul>
|
1127
|
+
<li>The key used for searching.</li>
|
1128
|
+
</ul>
|
1129
|
+
|
1130
|
+
</div>
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
|
1138
|
+
<div class="method-subsection declared-in-section">
|
1139
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1140
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1141
|
+
</div>
|
1142
|
+
|
1143
|
+
|
1144
|
+
</div>
|
1145
|
+
|
1146
|
+
<div class="section-method">
|
1147
|
+
<a name="//api/name/limit" title="limit"></a>
|
1148
|
+
<h3 class="subsubtitle method-title">limit</h3>
|
1149
|
+
|
1150
|
+
|
1151
|
+
|
1152
|
+
<div class="method-subsection brief-description">
|
1153
|
+
<ul>
|
1154
|
+
<li>The limit clause is used to place an upper bound on the number of rows returned by a Search operation.</li>
|
1155
|
+
</ul>
|
1156
|
+
|
1157
|
+
</div>
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) NSUInteger limit</code></div>
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
|
1171
|
+
<div class="method-subsection discussion-section">
|
1172
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1173
|
+
<ul>
|
1174
|
+
<li>The limit clause is used to place an upper bound on the number of rows returned by a Search operation.</li>
|
1175
|
+
</ul>
|
1176
|
+
|
1177
|
+
</div>
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
|
1182
|
+
|
1183
|
+
|
1184
|
+
|
1185
|
+
<div class="method-subsection declared-in-section">
|
1186
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1187
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1188
|
+
</div>
|
1189
|
+
|
1190
|
+
|
1191
|
+
</div>
|
1192
|
+
|
1193
|
+
<div class="section-method">
|
1194
|
+
<a name="//api/name/match" title="match"></a>
|
1195
|
+
<h3 class="subsubtitle method-title">match</h3>
|
1196
|
+
|
1197
|
+
|
1198
|
+
|
1199
|
+
<div class="method-subsection brief-description">
|
1200
|
+
<ul>
|
1201
|
+
<li>The comparison operator used for searching.</li>
|
1202
|
+
</ul>
|
1203
|
+
|
1204
|
+
</div>
|
1205
|
+
|
1206
|
+
|
1207
|
+
|
1208
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) NSFMatchType match</code></div>
|
1209
|
+
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1217
|
+
|
1218
|
+
<div class="method-subsection discussion-section">
|
1219
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1220
|
+
<ul>
|
1221
|
+
<li>The comparison operator used for searching.</li>
|
1222
|
+
</ul>
|
1223
|
+
|
1224
|
+
</div>
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
<div class="method-subsection declared-in-section">
|
1233
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1234
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1235
|
+
</div>
|
1236
|
+
|
1237
|
+
|
1238
|
+
</div>
|
1239
|
+
|
1240
|
+
<div class="section-method">
|
1241
|
+
<a name="//api/name/nanoStore" title="nanoStore"></a>
|
1242
|
+
<h3 class="subsubtitle method-title">nanoStore</h3>
|
1243
|
+
|
1244
|
+
|
1245
|
+
|
1246
|
+
<div class="method-subsection brief-description">
|
1247
|
+
<ul>
|
1248
|
+
<li>The document store used for searching.</li>
|
1249
|
+
</ul>
|
1250
|
+
|
1251
|
+
</div>
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, weak, readonly) NSFNanoStore *nanoStore</code></div>
|
1256
|
+
|
1257
|
+
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
<div class="method-subsection discussion-section">
|
1266
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1267
|
+
<ul>
|
1268
|
+
<li>The document store used for searching.</li>
|
1269
|
+
</ul>
|
1270
|
+
|
1271
|
+
</div>
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
|
1276
|
+
|
1277
|
+
|
1278
|
+
|
1279
|
+
<div class="method-subsection declared-in-section">
|
1280
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1281
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1282
|
+
</div>
|
1283
|
+
|
1284
|
+
|
1285
|
+
</div>
|
1286
|
+
|
1287
|
+
<div class="section-method">
|
1288
|
+
<a name="//api/name/offset" title="offset"></a>
|
1289
|
+
<h3 class="subsubtitle method-title">offset</h3>
|
1290
|
+
|
1291
|
+
|
1292
|
+
|
1293
|
+
<div class="method-subsection brief-description">
|
1294
|
+
<ul>
|
1295
|
+
<li>If an expression has an offset clause, then the first M rows are omitted from the result set returned by the search operation and the next N rows are returned, where M and N are the values that the offset and <a href="#//api/name/limit">limit</a> clauses evaluate to, respectively. Or, if the search would return less than M+N rows if it did not have a <a href="#//api/name/limit">limit</a> clause, then the first M rows are skipped and the remaining rows (if any) are returned.</li>
|
1296
|
+
</ul>
|
1297
|
+
|
1298
|
+
</div>
|
1299
|
+
|
1300
|
+
|
1301
|
+
|
1302
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) NSUInteger offset</code></div>
|
1303
|
+
|
1304
|
+
|
1305
|
+
|
1306
|
+
|
1307
|
+
|
1308
|
+
|
1309
|
+
|
1310
|
+
|
1311
|
+
|
1312
|
+
<div class="method-subsection discussion-section">
|
1313
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1314
|
+
<ul>
|
1315
|
+
<li>If an expression has an offset clause, then the first M rows are omitted from the result set returned by the search operation and the next N rows are returned, where M and N are the values that the offset and <a href="#//api/name/limit">limit</a> clauses evaluate to, respectively. Or, if the search would return less than M+N rows if it did not have a <a href="#//api/name/limit">limit</a> clause, then the first M rows are skipped and the remaining rows (if any) are returned.</li>
|
1316
|
+
</ul>
|
1317
|
+
|
1318
|
+
</div>
|
1319
|
+
|
1320
|
+
|
1321
|
+
|
1322
|
+
|
1323
|
+
|
1324
|
+
|
1325
|
+
|
1326
|
+
<div class="method-subsection declared-in-section">
|
1327
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1328
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1329
|
+
</div>
|
1330
|
+
|
1331
|
+
|
1332
|
+
</div>
|
1333
|
+
|
1334
|
+
<div class="section-method">
|
1335
|
+
<a name="//api/name/sort" title="sort"></a>
|
1336
|
+
<h3 class="subsubtitle method-title">sort</h3>
|
1337
|
+
|
1338
|
+
|
1339
|
+
|
1340
|
+
<div class="method-subsection brief-description">
|
1341
|
+
<ul>
|
1342
|
+
<li>The sort holds an array of one or more sort descriptors of type \link <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> \endlink.</li>
|
1343
|
+
</ul>
|
1344
|
+
|
1345
|
+
</div>
|
1346
|
+
|
1347
|
+
|
1348
|
+
|
1349
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readwrite) NSArray *sort</code></div>
|
1350
|
+
|
1351
|
+
|
1352
|
+
|
1353
|
+
|
1354
|
+
|
1355
|
+
|
1356
|
+
|
1357
|
+
|
1358
|
+
|
1359
|
+
<div class="method-subsection discussion-section">
|
1360
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1361
|
+
<ul>
|
1362
|
+
<li>The sort holds an array of one or more sort descriptors of type \link <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> <a href="../Classes/NSFNanoSortDescriptor.html">NSFNanoSortDescriptor</a> \endlink.</li>
|
1363
|
+
</ul>
|
1364
|
+
|
1365
|
+
</div>
|
1366
|
+
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1373
|
+
<div class="method-subsection declared-in-section">
|
1374
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1375
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1376
|
+
</div>
|
1377
|
+
|
1378
|
+
|
1379
|
+
</div>
|
1380
|
+
|
1381
|
+
<div class="section-method">
|
1382
|
+
<a name="//api/name/sql" title="sql"></a>
|
1383
|
+
<h3 class="subsubtitle method-title">sql</h3>
|
1384
|
+
|
1385
|
+
|
1386
|
+
|
1387
|
+
<div class="method-subsection brief-description">
|
1388
|
+
<ul>
|
1389
|
+
<li>The SQL statement used for searching. Set when <a href="#//api/name/executeSQL:">executeSQL:</a> is invoked.</li>
|
1390
|
+
</ul>
|
1391
|
+
|
1392
|
+
</div>
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readonly) NSString *sql</code></div>
|
1397
|
+
|
1398
|
+
|
1399
|
+
|
1400
|
+
|
1401
|
+
|
1402
|
+
|
1403
|
+
|
1404
|
+
|
1405
|
+
|
1406
|
+
<div class="method-subsection discussion-section">
|
1407
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1408
|
+
<ul>
|
1409
|
+
<li>The SQL statement used for searching. Set when <a href="#//api/name/executeSQL:">executeSQL:</a> is invoked.</li>
|
1410
|
+
</ul>
|
1411
|
+
|
1412
|
+
</div>
|
1413
|
+
|
1414
|
+
|
1415
|
+
|
1416
|
+
|
1417
|
+
|
1418
|
+
|
1419
|
+
|
1420
|
+
<div class="method-subsection declared-in-section">
|
1421
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1422
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1423
|
+
</div>
|
1424
|
+
|
1425
|
+
|
1426
|
+
</div>
|
1427
|
+
|
1428
|
+
<div class="section-method">
|
1429
|
+
<a name="//api/name/value" title="value"></a>
|
1430
|
+
<h3 class="subsubtitle method-title">value</h3>
|
1431
|
+
|
1432
|
+
|
1433
|
+
|
1434
|
+
<div class="method-subsection brief-description">
|
1435
|
+
<ul>
|
1436
|
+
<li>The value used for searching.</li>
|
1437
|
+
</ul>
|
1438
|
+
|
1439
|
+
</div>
|
1440
|
+
|
1441
|
+
|
1442
|
+
|
1443
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readwrite) id value</code></div>
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
|
1450
|
+
|
1451
|
+
|
1452
|
+
|
1453
|
+
<div class="method-subsection discussion-section">
|
1454
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1455
|
+
<ul>
|
1456
|
+
<li>The value used for searching.</li>
|
1457
|
+
</ul>
|
1458
|
+
|
1459
|
+
</div>
|
1460
|
+
|
1461
|
+
|
1462
|
+
|
1463
|
+
|
1464
|
+
|
1465
|
+
|
1466
|
+
|
1467
|
+
<div class="method-subsection declared-in-section">
|
1468
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1469
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1470
|
+
</div>
|
1471
|
+
|
1472
|
+
|
1473
|
+
</div>
|
1474
|
+
|
1475
|
+
</div>
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
<div class="section section-methods">
|
1480
|
+
<a title="Class Methods" name="class_methods"></a>
|
1481
|
+
<h2 class="subtitle subtitle-methods">Class Methods</h2>
|
1482
|
+
|
1483
|
+
<div class="section-method">
|
1484
|
+
<a name="//api/name/_prepareSQLQueryStringWithKeys:" title="_prepareSQLQueryStringWithKeys:"></a>
|
1485
|
+
<h3 class="subsubtitle method-title">_prepareSQLQueryStringWithKeys:</h3>
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1489
|
+
<div class="method-subsection method-declaration"><code>+ (NSString *)_prepareSQLQueryStringWithKeys:(NSArray *)<em>someKeys</em></code></div>
|
1490
|
+
|
1491
|
+
|
1492
|
+
</div>
|
1493
|
+
|
1494
|
+
<div class="section-method">
|
1495
|
+
<a name="//api/name/_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:" title="_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:"></a>
|
1496
|
+
<h3 class="subsubtitle method-title">_querySegmentForAttributeColumnWithValue:matching:valueColumnWithValue:</h3>
|
1497
|
+
|
1498
|
+
|
1499
|
+
|
1500
|
+
<div class="method-subsection method-declaration"><code>+ (NSString *)_querySegmentForAttributeColumnWithValue:(id)<em>anAttributeValue</em> matching:(NSFMatchType)<em>match</em> valueColumnWithValue:(id)<em>aValue</em></code></div>
|
1501
|
+
|
1502
|
+
|
1503
|
+
</div>
|
1504
|
+
|
1505
|
+
<div class="section-method">
|
1506
|
+
<a name="//api/name/_querySegmentForColumn:value:matching:" title="_querySegmentForColumn:value:matching:"></a>
|
1507
|
+
<h3 class="subsubtitle method-title">_querySegmentForColumn:value:matching:</h3>
|
1508
|
+
|
1509
|
+
|
1510
|
+
|
1511
|
+
<div class="method-subsection method-declaration"><code>+ (NSString *)_querySegmentForColumn:(NSString *)<em>aColumn</em> value:(id)<em>aValue</em> matching:(NSFMatchType)<em>match</em></code></div>
|
1512
|
+
|
1513
|
+
|
1514
|
+
</div>
|
1515
|
+
|
1516
|
+
<div class="section-method">
|
1517
|
+
<a name="//api/name/_quoteStrings:joiningWithDelimiter:" title="_quoteStrings:joiningWithDelimiter:"></a>
|
1518
|
+
<h3 class="subsubtitle method-title">_quoteStrings:joiningWithDelimiter:</h3>
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1522
|
+
<div class="method-subsection method-declaration"><code>+ (NSString *)_quoteStrings:(NSArray *)<em>strings</em> joiningWithDelimiter:(NSString *)<em>delimiter</em></code></div>
|
1523
|
+
|
1524
|
+
|
1525
|
+
</div>
|
1526
|
+
|
1527
|
+
<div class="section-method">
|
1528
|
+
<a name="//api/name/searchWithStore:" title="searchWithStore:"></a>
|
1529
|
+
<h3 class="subsubtitle method-title">searchWithStore:</h3>
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
<div class="method-subsection brief-description">
|
1534
|
+
<p>Creates and returns a search element for a given document store.</p>
|
1535
|
+
</div>
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
<div class="method-subsection method-declaration"><code>+ (NSFNanoSearch *)searchWithStore:(NSFNanoStore *)<em>theNanoStore</em></code></div>
|
1540
|
+
|
1541
|
+
|
1542
|
+
|
1543
|
+
<div class="method-subsection arguments-section parameters">
|
1544
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
1545
|
+
|
1546
|
+
<dl class="argument-def parameter-def">
|
1547
|
+
<dt><em>theNanoStore</em></dt>
|
1548
|
+
<dd><p>the document store where the search will be performed. Must not be nil.</p></dd>
|
1549
|
+
</dl>
|
1550
|
+
|
1551
|
+
</div>
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
<div class="method-subsection return">
|
1556
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
1557
|
+
<p>An search element upon success, nil otherwise.</p>
|
1558
|
+
</div>
|
1559
|
+
|
1560
|
+
|
1561
|
+
|
1562
|
+
|
1563
|
+
|
1564
|
+
<div class="method-subsection discussion-section">
|
1565
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1566
|
+
<p>Creates and returns a search element for a given document store.</p>
|
1567
|
+
</div>
|
1568
|
+
|
1569
|
+
|
1570
|
+
|
1571
|
+
|
1572
|
+
|
1573
|
+
<div class="method-subsection see-also-section">
|
1574
|
+
<h4 class="method-subtitle">See Also</h4>
|
1575
|
+
<ul>
|
1576
|
+
|
1577
|
+
<li><code><p>\link <a href="#//api/name/initWithStore:">– initWithStore:</a> – (id)<a href="#//api/name/initWithStore:">– initWithStore:</a>(<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *)theNanoStore \endlink</p></code></li>
|
1578
|
+
|
1579
|
+
</ul>
|
1580
|
+
</div>
|
1581
|
+
|
1582
|
+
|
1583
|
+
|
1584
|
+
<div class="method-subsection declared-in-section">
|
1585
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1586
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1587
|
+
</div>
|
1588
|
+
|
1589
|
+
|
1590
|
+
</div>
|
1591
|
+
|
1592
|
+
</div>
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
<div class="section section-methods">
|
1597
|
+
<a title="Instance Methods" name="instance_methods"></a>
|
1598
|
+
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
|
1599
|
+
|
1600
|
+
<div class="section-method">
|
1601
|
+
<a name="//api/name/JSONDescription" title="JSONDescription"></a>
|
1602
|
+
<h3 class="subsubtitle method-title">JSONDescription</h3>
|
1603
|
+
|
1604
|
+
|
1605
|
+
|
1606
|
+
<div class="method-subsection brief-description">
|
1607
|
+
<p>Returns a JSON representation of the search.</p>
|
1608
|
+
</div>
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)JSONDescription</code></div>
|
1613
|
+
|
1614
|
+
|
1615
|
+
|
1616
|
+
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
<div class="method-subsection discussion-section">
|
1623
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1624
|
+
<p>Returns a JSON representation of the search.</p>
|
1625
|
+
</div>
|
1626
|
+
|
1627
|
+
|
1628
|
+
|
1629
|
+
|
1630
|
+
|
1631
|
+
|
1632
|
+
|
1633
|
+
<div class="method-subsection declared-in-section">
|
1634
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1635
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1636
|
+
</div>
|
1637
|
+
|
1638
|
+
|
1639
|
+
</div>
|
1640
|
+
|
1641
|
+
<div class="section-method">
|
1642
|
+
<a name="//api/name/_dataWithKey:attribute:value:matching:" title="_dataWithKey:attribute:value:matching:"></a>
|
1643
|
+
<h3 class="subsubtitle method-title">_dataWithKey:attribute:value:matching:</h3>
|
1644
|
+
|
1645
|
+
|
1646
|
+
|
1647
|
+
<div class="method-subsection method-declaration"><code>- (NSArray *)_dataWithKey:(NSString *)<em>aKey</em> attribute:(NSString *)<em>anAttribute</em> value:(NSString *)<em>aValue</em> matching:(NSFMatchType)<em>match</em></code></div>
|
1648
|
+
|
1649
|
+
|
1650
|
+
</div>
|
1651
|
+
|
1652
|
+
<div class="section-method">
|
1653
|
+
<a name="//api/name/_dataWithKey:attribute:value:matching:returning:" title="_dataWithKey:attribute:value:matching:returning:"></a>
|
1654
|
+
<h3 class="subsubtitle method-title">_dataWithKey:attribute:value:matching:returning:</h3>
|
1655
|
+
|
1656
|
+
|
1657
|
+
|
1658
|
+
<div class="method-subsection method-declaration"><code>- (NSArray *)_dataWithKey:(NSString *)<em>aKey</em> attribute:(NSString *)<em>anAttribute</em> value:(NSString *)<em>aValue</em> matching:(NSFMatchType)<em>match</em> returning:(NSFReturnType)<em>returnedObjectType</em></code></div>
|
1659
|
+
|
1660
|
+
|
1661
|
+
</div>
|
1662
|
+
|
1663
|
+
<div class="section-method">
|
1664
|
+
<a name="//api/name/_dictionaryForKeyPath:value:" title="_dictionaryForKeyPath:value:"></a>
|
1665
|
+
<h3 class="subsubtitle method-title">_dictionaryForKeyPath:value:</h3>
|
1666
|
+
|
1667
|
+
|
1668
|
+
|
1669
|
+
<div class="method-subsection method-declaration"><code>- (NSDictionary *)_dictionaryForKeyPath:(NSString *)<em>keyPath</em> value:(id)<em>value</em></code></div>
|
1670
|
+
|
1671
|
+
|
1672
|
+
</div>
|
1673
|
+
|
1674
|
+
<div class="section-method">
|
1675
|
+
<a name="//api/name/_prepareSQLQueryStringWithExpressions:" title="_prepareSQLQueryStringWithExpressions:"></a>
|
1676
|
+
<h3 class="subsubtitle method-title">_prepareSQLQueryStringWithExpressions:</h3>
|
1677
|
+
|
1678
|
+
|
1679
|
+
|
1680
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)_prepareSQLQueryStringWithExpressions:(NSArray *)<em>someExpressions</em></code></div>
|
1681
|
+
|
1682
|
+
|
1683
|
+
</div>
|
1684
|
+
|
1685
|
+
<div class="section-method">
|
1686
|
+
<a name="//api/name/_prepareSQLQueryStringWithKey:attribute:value:matching:" title="_prepareSQLQueryStringWithKey:attribute:value:matching:"></a>
|
1687
|
+
<h3 class="subsubtitle method-title">_prepareSQLQueryStringWithKey:attribute:value:matching:</h3>
|
1688
|
+
|
1689
|
+
|
1690
|
+
|
1691
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)_prepareSQLQueryStringWithKey:(NSString *)<em>aKey</em> attribute:(NSString *)<em>anAttribute</em> value:(id)<em>aValue</em> matching:(NSFMatchType)<em>match</em></code></div>
|
1692
|
+
|
1693
|
+
|
1694
|
+
</div>
|
1695
|
+
|
1696
|
+
<div class="section-method">
|
1697
|
+
<a name="//api/name/_preparedSQL" title="_preparedSQL"></a>
|
1698
|
+
<h3 class="subsubtitle method-title">_preparedSQL</h3>
|
1699
|
+
|
1700
|
+
|
1701
|
+
|
1702
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)_preparedSQL</code></div>
|
1703
|
+
|
1704
|
+
|
1705
|
+
</div>
|
1706
|
+
|
1707
|
+
<div class="section-method">
|
1708
|
+
<a name="//api/name/_resultsFromSQLQuery:" title="_resultsFromSQLQuery:"></a>
|
1709
|
+
<h3 class="subsubtitle method-title">_resultsFromSQLQuery:</h3>
|
1710
|
+
|
1711
|
+
|
1712
|
+
|
1713
|
+
<div class="method-subsection method-declaration"><code>- (NSArray *)_resultsFromSQLQuery:(NSString *)<em>theSQLStatement</em></code></div>
|
1714
|
+
|
1715
|
+
|
1716
|
+
</div>
|
1717
|
+
|
1718
|
+
<div class="section-method">
|
1719
|
+
<a name="//api/name/_retrieveDataAdded:calendarDate:error:" title="_retrieveDataAdded:calendarDate:error:"></a>
|
1720
|
+
<h3 class="subsubtitle method-title">_retrieveDataAdded:calendarDate:error:</h3>
|
1721
|
+
|
1722
|
+
|
1723
|
+
|
1724
|
+
<div class="method-subsection method-declaration"><code>- (NSDictionary *)_retrieveDataAdded:(NSFDateMatchType)<em>aDateMatch</em> calendarDate:(NSDate *)<em>aDate</em> error:(out NSError **)<em>outError</em></code></div>
|
1725
|
+
|
1726
|
+
|
1727
|
+
</div>
|
1728
|
+
|
1729
|
+
<div class="section-method">
|
1730
|
+
<a name="//api/name/_retrieveDataWithError:" title="_retrieveDataWithError:"></a>
|
1731
|
+
<h3 class="subsubtitle method-title">_retrieveDataWithError:</h3>
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1735
|
+
<div class="method-subsection method-declaration"><code>- (NSDictionary *)_retrieveDataWithError:(out NSError **)<em>outError</em></code></div>
|
1736
|
+
|
1737
|
+
|
1738
|
+
</div>
|
1739
|
+
|
1740
|
+
<div class="section-method">
|
1741
|
+
<a name="//api/name/_sortResultsIfApplicable:returnType:" title="_sortResultsIfApplicable:returnType:"></a>
|
1742
|
+
<h3 class="subsubtitle method-title">_sortResultsIfApplicable:returnType:</h3>
|
1743
|
+
|
1744
|
+
|
1745
|
+
|
1746
|
+
<div class="method-subsection method-declaration"><code>- (id)_sortResultsIfApplicable:(NSDictionary *)<em>results</em> returnType:(NSFReturnType)<em>theReturnType</em></code></div>
|
1747
|
+
|
1748
|
+
|
1749
|
+
</div>
|
1750
|
+
|
1751
|
+
<div class="section-method">
|
1752
|
+
<a name="//api/name/aggregateOperation:onAttribute:" title="aggregateOperation:onAttribute:"></a>
|
1753
|
+
<h3 class="subsubtitle method-title">aggregateOperation:onAttribute:</h3>
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1757
|
+
<div class="method-subsection brief-description">
|
1758
|
+
<ul>
|
1759
|
+
<li>Returns the result of the aggregate function.</li>
|
1760
|
+
<li>@param theFunctionType is the function type to be applied.</li>
|
1761
|
+
<li>@param theAttribute is the <a href="#//api/name/attribute">attribute</a> used in the function.</li>
|
1762
|
+
<li>@returns An NSNumber containing the result of the aggregate function.</li>
|
1763
|
+
<li>@details <b>Example:</b>
|
1764
|
+
@code</li>
|
1765
|
+
<li><a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];
|
1766
|
+
*</li>
|
1767
|
+
<li>// Assume we have saved data to the document store</li>
|
1768
|
+
<li>…</li>
|
1769
|
+
<li>…
|
1770
|
+
*</li>
|
1771
|
+
<li>// Get the average for the <a href="#//api/name/attribute">attribute</a> named ‘SomeNumber’</li>
|
1772
|
+
<li>NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</li>
|
1773
|
+
<li>NSNumber *result = [search aggregateOperation:NSFAverage onAttribute:@“SomeNumber”];
|
1774
|
+
@endcode</li>
|
1775
|
+
</ul>
|
1776
|
+
|
1777
|
+
</div>
|
1778
|
+
|
1779
|
+
|
1780
|
+
|
1781
|
+
<div class="method-subsection method-declaration"><code>- (NSNumber *)aggregateOperation:(NSFAggregateFunctionType)<em>theFunctionType</em> onAttribute:(NSString *)<em>theAttribute</em></code></div>
|
1782
|
+
|
1783
|
+
|
1784
|
+
|
1785
|
+
|
1786
|
+
|
1787
|
+
|
1788
|
+
|
1789
|
+
|
1790
|
+
|
1791
|
+
<div class="method-subsection discussion-section">
|
1792
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1793
|
+
<ul>
|
1794
|
+
<li>Returns the result of the aggregate function.</li>
|
1795
|
+
<li>@param theFunctionType is the function type to be applied.</li>
|
1796
|
+
<li>@param theAttribute is the <a href="#//api/name/attribute">attribute</a> used in the function.</li>
|
1797
|
+
<li>@returns An NSNumber containing the result of the aggregate function.</li>
|
1798
|
+
<li>@details <b>Example:</b>
|
1799
|
+
@code</li>
|
1800
|
+
<li><a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];
|
1801
|
+
*</li>
|
1802
|
+
<li>// Assume we have saved data to the document store</li>
|
1803
|
+
<li>…</li>
|
1804
|
+
<li>…
|
1805
|
+
*</li>
|
1806
|
+
<li>// Get the average for the <a href="#//api/name/attribute">attribute</a> named ‘SomeNumber’</li>
|
1807
|
+
<li>NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</li>
|
1808
|
+
<li>NSNumber *result = [search aggregateOperation:NSFAverage onAttribute:@“SomeNumber”];
|
1809
|
+
@endcode</li>
|
1810
|
+
</ul>
|
1811
|
+
<div class="note"><p><strong>Note:</strong> The <a href="#//api/name/sort">sort</a> descriptor will be ignored when executing aggregate operations.</p></div>
|
1812
|
+
</div>
|
1813
|
+
|
1814
|
+
|
1815
|
+
|
1816
|
+
|
1817
|
+
|
1818
|
+
|
1819
|
+
|
1820
|
+
<div class="method-subsection declared-in-section">
|
1821
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1822
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1823
|
+
</div>
|
1824
|
+
|
1825
|
+
|
1826
|
+
</div>
|
1827
|
+
|
1828
|
+
<div class="section-method">
|
1829
|
+
<a name="//api/name/description" title="description"></a>
|
1830
|
+
<h3 class="subsubtitle method-title">description</h3>
|
1831
|
+
|
1832
|
+
|
1833
|
+
|
1834
|
+
<div class="method-subsection brief-description">
|
1835
|
+
<p>Returns a string representation of the search.</p>
|
1836
|
+
</div>
|
1837
|
+
|
1838
|
+
|
1839
|
+
|
1840
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)description</code></div>
|
1841
|
+
|
1842
|
+
|
1843
|
+
|
1844
|
+
|
1845
|
+
|
1846
|
+
|
1847
|
+
|
1848
|
+
|
1849
|
+
|
1850
|
+
<div class="method-subsection discussion-section">
|
1851
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1852
|
+
<p>Returns a string representation of the search.</p>
|
1853
|
+
</div>
|
1854
|
+
|
1855
|
+
|
1856
|
+
|
1857
|
+
|
1858
|
+
|
1859
|
+
|
1860
|
+
|
1861
|
+
<div class="method-subsection declared-in-section">
|
1862
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1863
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1864
|
+
</div>
|
1865
|
+
|
1866
|
+
|
1867
|
+
</div>
|
1868
|
+
|
1869
|
+
<div class="section-method">
|
1870
|
+
<a name="//api/name/executeSQL:" title="executeSQL:"></a>
|
1871
|
+
<h3 class="subsubtitle method-title">executeSQL:</h3>
|
1872
|
+
|
1873
|
+
|
1874
|
+
|
1875
|
+
<div class="method-subsection brief-description">
|
1876
|
+
<p>Performs a search with a given SQL statement.</p>
|
1877
|
+
</div>
|
1878
|
+
|
1879
|
+
|
1880
|
+
|
1881
|
+
<div class="method-subsection method-declaration"><code>- (NSFNanoResult *)executeSQL:(NSString *)<em>theSQLStatement</em></code></div>
|
1882
|
+
|
1883
|
+
|
1884
|
+
|
1885
|
+
<div class="method-subsection arguments-section parameters">
|
1886
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
1887
|
+
|
1888
|
+
<dl class="argument-def parameter-def">
|
1889
|
+
<dt><em>theSQLStatement</em></dt>
|
1890
|
+
<dd><p>is the SQL statement to be executed. Must not be nil or an empty string.</p></dd>
|
1891
|
+
</dl>
|
1892
|
+
|
1893
|
+
</div>
|
1894
|
+
|
1895
|
+
|
1896
|
+
|
1897
|
+
<div class="method-subsection return">
|
1898
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
1899
|
+
<p>Returns a <a href="../Classes/NSFNanoResult.html">NSFNanoResult</a>.
|
1900
|
+
@note
|
1901
|
+
Use this method when you need to perform more advanced SQL statements. If you just want to query NanoObjects using your own SQL statement,
|
1902
|
+
you may want to use \link <a href="#//api/name/executeSQL:returnType:error:">executeSQL:returnType:error:</a> – (id)executeSQL:(NSString <em>)theSQLStatement returnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink instead.
|
1903
|
+
@par
|
1904
|
+
The <a href="#//api/name/key">key</a> difference between this method and \link <a href="#//api/name/executeSQL:returnType:error:">executeSQL:returnType:error:</a> – (id)executeSQL:(NSString </em>)theSQLStatement returnType:(NSFReturnType)theReturnType error:(out NSError <em>*)outError \endlink
|
1905
|
+
is that this method doesn’t perform any check at all. The SQL statement will be sent verbatim to SQLite.
|
1906
|
+
@details <b>Example:</b>
|
1907
|
+
@code
|
1908
|
+
// Prepare a document store
|
1909
|
+
<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> </em><a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];</p>
|
1910
|
+
|
1911
|
+
<p>// Prepare some data and wrap it in a NanoObject
|
1912
|
+
NSString <em><a href="#//api/name/key">key</a> = @“ABC-123”;
|
1913
|
+
NSDictionary </em>info = …;
|
1914
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> *nanoObject = [NSFNanoObject nanoObjectWithDictionary:info];</p>
|
1915
|
+
|
1916
|
+
<p>// Add it to the document store
|
1917
|
+
[nanoStore addObjectsFromArray:[NSArray arrayWithObject:nanoObject] error:nil];</p>
|
1918
|
+
|
1919
|
+
<p>// Instantiate a search and specify the <a href="#//api/name/attribute">attribute</a>(s) we want to search for
|
1920
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
1921
|
+
|
1922
|
+
<p>// Perform the search
|
1923
|
+
<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> <em>result = [search executeSQL:@“SELECT COUNT(</em>) FROM NSFKEYS”];
|
1924
|
+
@endcode</p>
|
1925
|
+
</div>
|
1926
|
+
|
1927
|
+
|
1928
|
+
|
1929
|
+
|
1930
|
+
|
1931
|
+
<div class="method-subsection discussion-section">
|
1932
|
+
<h4 class="method-subtitle">Discussion</h4>
|
1933
|
+
<p>Performs a search with a given SQL statement.</p><div class="note"><p><strong>Note:</strong> The <a href="#//api/name/sort">sort</a> descriptor will be ignored when executing custom SQL statements.</p></div>
|
1934
|
+
</div>
|
1935
|
+
|
1936
|
+
|
1937
|
+
|
1938
|
+
|
1939
|
+
|
1940
|
+
<div class="method-subsection see-also-section">
|
1941
|
+
<h4 class="method-subtitle">See Also</h4>
|
1942
|
+
<ul>
|
1943
|
+
|
1944
|
+
<li><code><p>\link <a href="#//api/name/executeSQL:returnType:error:">– executeSQL:returnType:error:</a> – (id)<a href="#//api/name/executeSQL:">– executeSQL:</a>(NSString *)theSQLStatement returnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink</p></code></li>
|
1945
|
+
|
1946
|
+
</ul>
|
1947
|
+
</div>
|
1948
|
+
|
1949
|
+
|
1950
|
+
|
1951
|
+
<div class="method-subsection declared-in-section">
|
1952
|
+
<h4 class="method-subtitle">Declared In</h4>
|
1953
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
1954
|
+
</div>
|
1955
|
+
|
1956
|
+
|
1957
|
+
</div>
|
1958
|
+
|
1959
|
+
<div class="section-method">
|
1960
|
+
<a name="//api/name/executeSQL:returnType:error:" title="executeSQL:returnType:error:"></a>
|
1961
|
+
<h3 class="subsubtitle method-title">executeSQL:returnType:error:</h3>
|
1962
|
+
|
1963
|
+
|
1964
|
+
|
1965
|
+
<div class="method-subsection brief-description">
|
1966
|
+
<p>Performs a search with a given SQL statement.</p>
|
1967
|
+
</div>
|
1968
|
+
|
1969
|
+
|
1970
|
+
|
1971
|
+
<div class="method-subsection method-declaration"><code>- (id)executeSQL:(NSString *)<em>theSQLStatement</em> returnType:(NSFReturnType)<em>theReturnType</em> error:(out NSError **)<em>outError</em></code></div>
|
1972
|
+
|
1973
|
+
|
1974
|
+
|
1975
|
+
<div class="method-subsection arguments-section parameters">
|
1976
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
1977
|
+
|
1978
|
+
<dl class="argument-def parameter-def">
|
1979
|
+
<dt><em>theSQLStatement</em></dt>
|
1980
|
+
<dd><p>is the SQL statement to be executed. Must not be nil or an empty string.</p></dd>
|
1981
|
+
</dl>
|
1982
|
+
|
1983
|
+
<dl class="argument-def parameter-def">
|
1984
|
+
<dt><em>theReturnType</em></dt>
|
1985
|
+
<dd><p>the type of object to be returned. Can be \link Globals::NSFReturnObjects NSFReturnObjects \endlink or \link Globals::NSFReturnKeys NSFReturnKeys \endlink.</p></dd>
|
1986
|
+
</dl>
|
1987
|
+
|
1988
|
+
<dl class="argument-def parameter-def">
|
1989
|
+
<dt><em>outError</em></dt>
|
1990
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
1991
|
+
</dl>
|
1992
|
+
|
1993
|
+
</div>
|
1994
|
+
|
1995
|
+
|
1996
|
+
|
1997
|
+
<div class="method-subsection return">
|
1998
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
1999
|
+
<p>If theReturnType is \link Globals::NSFReturnObjects NSFReturnObjects \endlink, a dictionary is returned. Otherwise, an array is returned.
|
2000
|
+
@note
|
2001
|
+
Use this method when performing search on NanoObjects. If you need to perform more advanced SQL statements, you may want to use
|
2002
|
+
\link <a href="#//api/name/executeSQL:">executeSQL:</a> – (<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> <em>)<a href="#//api/name/executeSQL:">executeSQL:</a>(NSString </em>)theSQLStatement \endlink instead.
|
2003
|
+
@par
|
2004
|
+
The <a href="#//api/name/key">key</a> difference between this method and \link <a href="#//api/name/executeSQL:">executeSQL:</a> – (<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> <em>)<a href="#//api/name/executeSQL:">executeSQL:</a>(NSString </em>)theSQLStatement \endlink is that this method performs
|
2005
|
+
a check to make sure the columns specified <a href="#//api/name/match">match</a> the ones required by the \link Globals::NSFReturnType NSFReturnType \endlink type selected. If the column selection is wrong,
|
2006
|
+
NanoStore rewrites the query by specifying the right set of columns while honoring the rest of the query.
|
2007
|
+
@details <b>Example:</b>
|
2008
|
+
@code
|
2009
|
+
// Prepare a document store
|
2010
|
+
<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];</p>
|
2011
|
+
|
2012
|
+
<p>// Prepare some data and wrap it in a NanoObject
|
2013
|
+
NSString <em><a href="#//api/name/key">key</a> = @“ABC-123”;
|
2014
|
+
NSDictionary </em>info = …;
|
2015
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> *nanoObject = [NSFNanoObject nanoObjectWithDictionary:info];</p>
|
2016
|
+
|
2017
|
+
<p>// Add it to the document store
|
2018
|
+
[nanoStore addObjectsFromArray:[NSArray arrayWithObject:nanoObject] error:nil];</p>
|
2019
|
+
|
2020
|
+
<p>// Instantiate a search and specify the <a href="#//api/name/attribute">attribute</a>(s) we want to search for
|
2021
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
2022
|
+
|
2023
|
+
<p>// Perform the search
|
2024
|
+
// The query will be rewritten as @“SELECT NSFKey, NSFKeyedArchive, NSFObjectClass FROM NSFKeys”
|
2025
|
+
NSDictionary *results = [search executeSQL:@“SELECT foo, bar FROM NSFKeys” returnType:NSFReturnObjects error:nil];
|
2026
|
+
@endcode</p>
|
2027
|
+
</div>
|
2028
|
+
|
2029
|
+
|
2030
|
+
|
2031
|
+
|
2032
|
+
|
2033
|
+
<div class="method-subsection discussion-section">
|
2034
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2035
|
+
<p>Performs a search with a given SQL statement.</p><div class="note"><p><strong>Note:</strong> The <a href="#//api/name/sort">sort</a> descriptor will be ignored when executing custom SQL statements.</p></div>
|
2036
|
+
</div>
|
2037
|
+
|
2038
|
+
|
2039
|
+
|
2040
|
+
|
2041
|
+
|
2042
|
+
<div class="method-subsection see-also-section">
|
2043
|
+
<h4 class="method-subtitle">See Also</h4>
|
2044
|
+
<ul>
|
2045
|
+
|
2046
|
+
<li><code><p>\link <a href="#//api/name/executeSQL:">– executeSQL:</a> – (<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> <em>)<a href="#//api/name/executeSQL:">– executeSQL:</a>(NSString </em>)theSQLStatement \endlink</p></code></li>
|
2047
|
+
|
2048
|
+
</ul>
|
2049
|
+
</div>
|
2050
|
+
|
2051
|
+
|
2052
|
+
|
2053
|
+
<div class="method-subsection declared-in-section">
|
2054
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2055
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2056
|
+
</div>
|
2057
|
+
|
2058
|
+
|
2059
|
+
</div>
|
2060
|
+
|
2061
|
+
<div class="section-method">
|
2062
|
+
<a name="//api/name/explainSQL:" title="explainSQL:"></a>
|
2063
|
+
<h3 class="subsubtitle method-title">explainSQL:</h3>
|
2064
|
+
|
2065
|
+
|
2066
|
+
|
2067
|
+
<div class="method-subsection brief-description">
|
2068
|
+
<p>Performs an analysis of the given SQL statement.</p>
|
2069
|
+
</div>
|
2070
|
+
|
2071
|
+
|
2072
|
+
|
2073
|
+
<div class="method-subsection method-declaration"><code>- (NSFNanoResult *)explainSQL:(NSString *)<em>theSQLStatement</em></code></div>
|
2074
|
+
|
2075
|
+
|
2076
|
+
|
2077
|
+
<div class="method-subsection arguments-section parameters">
|
2078
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
2079
|
+
|
2080
|
+
<dl class="argument-def parameter-def">
|
2081
|
+
<dt><em>theSQLStatement</em></dt>
|
2082
|
+
<dd><p>is the SQL statement to be analyzed. Must not be nil or an empty string.</p></dd>
|
2083
|
+
</dl>
|
2084
|
+
|
2085
|
+
</div>
|
2086
|
+
|
2087
|
+
|
2088
|
+
|
2089
|
+
<div class="method-subsection return">
|
2090
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
2091
|
+
<p>Returns a NSFNanoResult.
|
2092
|
+
@note
|
2093
|
+
Returns the sequence of virtual machine instructions with high-level information about what indices would have been used if the SQL statement had
|
2094
|
+
been executed.</p>
|
2095
|
+
|
2096
|
+
<p>@warning
|
2097
|
+
The analysis generated by this method is intended for interactive analysis and troubleshooting only. The details of the output format
|
2098
|
+
are subject to change from one release of SQLite to the next. Applications should not use this method in production code since the exact behavior
|
2099
|
+
is undocumented, unspecified, and variable.</p>
|
2100
|
+
|
2101
|
+
<p>For additional information about SQLite’s Virtual Machine Opcodes, see <a href="http://www.sqlite.org/opcode.html">http://www.sqlite.org/opcode.html</a></p>
|
2102
|
+
|
2103
|
+
<p>The tutorial Virtual Database Engine of SQLite is available here: <a href="http://www.sqlite.org/vdbe.html">http://www.sqlite.org/vdbe.html</a></p>
|
2104
|
+
|
2105
|
+
<p>@details <b>Example:</b>
|
2106
|
+
@code
|
2107
|
+
// Prepare a document store
|
2108
|
+
<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *<a href="#//api/name/nanoStore">nanoStore</a> = [<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];</p>
|
2109
|
+
|
2110
|
+
<p>// Instantiate a search object
|
2111
|
+
NSFNanoSearch *search = [NSFNanoSearch searchWithStore:nanoStore];</p>
|
2112
|
+
|
2113
|
+
<p>// Perform the analysis
|
2114
|
+
<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> *results = [search explainSQL:@“SELECT * FROM NSFValues”];
|
2115
|
+
@endcode</p>
|
2116
|
+
</div>
|
2117
|
+
|
2118
|
+
|
2119
|
+
|
2120
|
+
|
2121
|
+
|
2122
|
+
<div class="method-subsection discussion-section">
|
2123
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2124
|
+
<p>Performs an analysis of the given SQL statement.</p>
|
2125
|
+
</div>
|
2126
|
+
|
2127
|
+
|
2128
|
+
|
2129
|
+
|
2130
|
+
|
2131
|
+
<div class="method-subsection see-also-section">
|
2132
|
+
<h4 class="method-subtitle">See Also</h4>
|
2133
|
+
<ul>
|
2134
|
+
|
2135
|
+
<li><code><p>\link <a href="#//api/name/executeSQL:">– executeSQL:</a> – (<a href="../Classes/NSFNanoResult.html">NSFNanoResult</a> <em>)<a href="#//api/name/executeSQL:">– executeSQL:</a>(NSString </em>)theSQLStatement \endlink</p></code></li>
|
2136
|
+
|
2137
|
+
<li><code><p>\link <a href="#//api/name/executeSQL:returnType:error:">– executeSQL:returnType:error:</a> – (id)<a href="#//api/name/executeSQL:">– executeSQL:</a>(NSString *)theSQLStatement returnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink</p></code></li>
|
2138
|
+
|
2139
|
+
</ul>
|
2140
|
+
</div>
|
2141
|
+
|
2142
|
+
|
2143
|
+
|
2144
|
+
<div class="method-subsection declared-in-section">
|
2145
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2146
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2147
|
+
</div>
|
2148
|
+
|
2149
|
+
|
2150
|
+
</div>
|
2151
|
+
|
2152
|
+
<div class="section-method">
|
2153
|
+
<a name="//api/name/initWithStore:" title="initWithStore:"></a>
|
2154
|
+
<h3 class="subsubtitle method-title">initWithStore:</h3>
|
2155
|
+
|
2156
|
+
|
2157
|
+
|
2158
|
+
<div class="method-subsection brief-description">
|
2159
|
+
<p>Initializes a newly allocated search element for a given document store.</p>
|
2160
|
+
</div>
|
2161
|
+
|
2162
|
+
|
2163
|
+
|
2164
|
+
<div class="method-subsection method-declaration"><code>- (id)initWithStore:(NSFNanoStore *)<em>theNanoStore</em></code></div>
|
2165
|
+
|
2166
|
+
|
2167
|
+
|
2168
|
+
<div class="method-subsection arguments-section parameters">
|
2169
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
2170
|
+
|
2171
|
+
<dl class="argument-def parameter-def">
|
2172
|
+
<dt><em>theNanoStore</em></dt>
|
2173
|
+
<dd><p>the document store where the search will be performed. Must not be nil.</p></dd>
|
2174
|
+
</dl>
|
2175
|
+
|
2176
|
+
</div>
|
2177
|
+
|
2178
|
+
|
2179
|
+
|
2180
|
+
<div class="method-subsection return">
|
2181
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
2182
|
+
<p>An search element upon success, nil otherwise.</p>
|
2183
|
+
</div>
|
2184
|
+
|
2185
|
+
|
2186
|
+
|
2187
|
+
|
2188
|
+
|
2189
|
+
<div class="method-subsection discussion-section">
|
2190
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2191
|
+
<p>Initializes a newly allocated search element for a given document store.</p>
|
2192
|
+
</div>
|
2193
|
+
|
2194
|
+
|
2195
|
+
|
2196
|
+
|
2197
|
+
|
2198
|
+
<div class="method-subsection see-also-section">
|
2199
|
+
<h4 class="method-subtitle">See Also</h4>
|
2200
|
+
<ul>
|
2201
|
+
|
2202
|
+
<li><code><p>\link <a href="#//api/name/searchWithStore:">+ searchWithStore:</a> + (NSFNanoSearch <em>)<a href="#//api/name/searchWithStore:">+ searchWithStore:</a>(<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> </em>)theNanoStore \endlink</p></code></li>
|
2203
|
+
|
2204
|
+
</ul>
|
2205
|
+
</div>
|
2206
|
+
|
2207
|
+
|
2208
|
+
|
2209
|
+
<div class="method-subsection declared-in-section">
|
2210
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2211
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2212
|
+
</div>
|
2213
|
+
|
2214
|
+
|
2215
|
+
</div>
|
2216
|
+
|
2217
|
+
<div class="section-method">
|
2218
|
+
<a name="//api/name/reset" title="reset"></a>
|
2219
|
+
<h3 class="subsubtitle method-title">reset</h3>
|
2220
|
+
|
2221
|
+
|
2222
|
+
|
2223
|
+
<div class="method-subsection brief-description">
|
2224
|
+
<p>Resets the values to a know, default state.
|
2225
|
+
– <a href="#//api/name/key">key</a> = nil;
|
2226
|
+
– <a href="#//api/name/attribute">attribute</a> = nil;
|
2227
|
+
– <a href="#//api/name/value">value</a> = nil;
|
2228
|
+
– <a href="#//api/name/match">match</a> = NSFContains;
|
2229
|
+
– object type = NSFReturnObjects;
|
2230
|
+
– <a href="#//api/name/groupValues">groupValues</a> = NO;
|
2231
|
+
– attributesReturned = nil;
|
2232
|
+
– type returned = NSFReturnObjects;
|
2233
|
+
– <a href="#//api/name/sql">sql</a> = nil;
|
2234
|
+
– <a href="#//api/name/sort">sort</a> = nil;</p>
|
2235
|
+
</div>
|
2236
|
+
|
2237
|
+
|
2238
|
+
|
2239
|
+
<div class="method-subsection method-declaration"><code>- (void)reset</code></div>
|
2240
|
+
|
2241
|
+
|
2242
|
+
|
2243
|
+
|
2244
|
+
|
2245
|
+
|
2246
|
+
|
2247
|
+
|
2248
|
+
|
2249
|
+
<div class="method-subsection discussion-section">
|
2250
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2251
|
+
<p>Resets the values to a know, default state.
|
2252
|
+
– <a href="#//api/name/key">key</a> = nil;
|
2253
|
+
– <a href="#//api/name/attribute">attribute</a> = nil;
|
2254
|
+
– <a href="#//api/name/value">value</a> = nil;
|
2255
|
+
– <a href="#//api/name/match">match</a> = NSFContains;
|
2256
|
+
– object type = NSFReturnObjects;
|
2257
|
+
– <a href="#//api/name/groupValues">groupValues</a> = NO;
|
2258
|
+
– attributesReturned = nil;
|
2259
|
+
– type returned = NSFReturnObjects;
|
2260
|
+
– <a href="#//api/name/sql">sql</a> = nil;
|
2261
|
+
– <a href="#//api/name/sort">sort</a> = nil;</p>
|
2262
|
+
|
2263
|
+
<p>@note
|
2264
|
+
When invoked, it sets the values of search to its initial state. Resetting and performing a search will select all records.</p>
|
2265
|
+
</div>
|
2266
|
+
|
2267
|
+
|
2268
|
+
|
2269
|
+
|
2270
|
+
|
2271
|
+
|
2272
|
+
|
2273
|
+
<div class="method-subsection declared-in-section">
|
2274
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2275
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2276
|
+
</div>
|
2277
|
+
|
2278
|
+
|
2279
|
+
</div>
|
2280
|
+
|
2281
|
+
<div class="section-method">
|
2282
|
+
<a name="//api/name/searchObjectsAdded:date:returnType:error:" title="searchObjectsAdded:date:returnType:error:"></a>
|
2283
|
+
<h3 class="subsubtitle method-title">searchObjectsAdded:date:returnType:error:</h3>
|
2284
|
+
|
2285
|
+
|
2286
|
+
|
2287
|
+
<div class="method-subsection brief-description">
|
2288
|
+
<p>Performs a search using the values of the properties before, on or after a given date.</p>
|
2289
|
+
</div>
|
2290
|
+
|
2291
|
+
|
2292
|
+
|
2293
|
+
<div class="method-subsection method-declaration"><code>- (id)searchObjectsAdded:(NSFDateMatchType)<em>theDateMatch</em> date:(NSDate *)<em>theDate</em> returnType:(NSFReturnType)<em>theReturnType</em> error:(out NSError **)<em>outError</em></code></div>
|
2294
|
+
|
2295
|
+
|
2296
|
+
|
2297
|
+
<div class="method-subsection arguments-section parameters">
|
2298
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
2299
|
+
|
2300
|
+
<dl class="argument-def parameter-def">
|
2301
|
+
<dt><em>theDateMatch</em></dt>
|
2302
|
+
<dd><p>the type of date comparison. Can be \link Globals::NSFBeforeDate NSFBeforeDate \endlink, \link Globals::NSFOnDate NSFOnDate \endlink or \link Globals::NSFAfterDate NSFAfterDate \endlink.</p></dd>
|
2303
|
+
</dl>
|
2304
|
+
|
2305
|
+
<dl class="argument-def parameter-def">
|
2306
|
+
<dt><em>theDate</em></dt>
|
2307
|
+
<dd><p>the date to use as a pivot during the search.</p></dd>
|
2308
|
+
</dl>
|
2309
|
+
|
2310
|
+
<dl class="argument-def parameter-def">
|
2311
|
+
<dt><em>theReturnType</em></dt>
|
2312
|
+
<dd><p>the type of object to be returned. Can be \link Globals::NSFReturnObjects NSFReturnObjects \endlink or \link Globals::NSFReturnKeys NSFReturnKeys \endlink.</p></dd>
|
2313
|
+
</dl>
|
2314
|
+
|
2315
|
+
<dl class="argument-def parameter-def">
|
2316
|
+
<dt><em>outError</em></dt>
|
2317
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
2318
|
+
</dl>
|
2319
|
+
|
2320
|
+
</div>
|
2321
|
+
|
2322
|
+
|
2323
|
+
|
2324
|
+
<div class="method-subsection return">
|
2325
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
2326
|
+
<p>If theReturnType is \link Globals::NSFReturnObjects NSFReturnObjects \endlink, a dictionary is returned. Otherwise, an array is returned.</p>
|
2327
|
+
</div>
|
2328
|
+
|
2329
|
+
|
2330
|
+
|
2331
|
+
|
2332
|
+
|
2333
|
+
<div class="method-subsection discussion-section">
|
2334
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2335
|
+
<p>Performs a search using the values of the properties before, on or after a given date.</p><div class="note"><p><strong>Note:</strong> The <a href="#//api/name/sort">sort</a> descriptor will be ignored when the return type is NSFReturnKeys.</p></div>
|
2336
|
+
</div>
|
2337
|
+
|
2338
|
+
|
2339
|
+
|
2340
|
+
|
2341
|
+
|
2342
|
+
<div class="method-subsection see-also-section">
|
2343
|
+
<h4 class="method-subtitle">See Also</h4>
|
2344
|
+
<ul>
|
2345
|
+
|
2346
|
+
<li><code><p>\link <a href="#//api/name/searchObjectsWithReturnType:error:">– searchObjectsWithReturnType:error:</a> – (id)searchObjectsWithReturnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink</p></code></li>
|
2347
|
+
|
2348
|
+
</ul>
|
2349
|
+
</div>
|
2350
|
+
|
2351
|
+
|
2352
|
+
|
2353
|
+
<div class="method-subsection declared-in-section">
|
2354
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2355
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2356
|
+
</div>
|
2357
|
+
|
2358
|
+
|
2359
|
+
</div>
|
2360
|
+
|
2361
|
+
<div class="section-method">
|
2362
|
+
<a name="//api/name/searchObjectsWithReturnType:error:" title="searchObjectsWithReturnType:error:"></a>
|
2363
|
+
<h3 class="subsubtitle method-title">searchObjectsWithReturnType:error:</h3>
|
2364
|
+
|
2365
|
+
|
2366
|
+
|
2367
|
+
<div class="method-subsection brief-description">
|
2368
|
+
<p>Performs a search using the values of the properties.</p>
|
2369
|
+
</div>
|
2370
|
+
|
2371
|
+
|
2372
|
+
|
2373
|
+
<div class="method-subsection method-declaration"><code>- (id)searchObjectsWithReturnType:(NSFReturnType)<em>theReturnType</em> error:(out NSError **)<em>outError</em></code></div>
|
2374
|
+
|
2375
|
+
|
2376
|
+
|
2377
|
+
<div class="method-subsection arguments-section parameters">
|
2378
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
2379
|
+
|
2380
|
+
<dl class="argument-def parameter-def">
|
2381
|
+
<dt><em>theReturnType</em></dt>
|
2382
|
+
<dd><p>the type of object to be returned. Can be \link Globals::NSFReturnObjects NSFReturnObjects \endlink or \link Globals::NSFReturnKeys NSFReturnKeys \endlink.</p></dd>
|
2383
|
+
</dl>
|
2384
|
+
|
2385
|
+
<dl class="argument-def parameter-def">
|
2386
|
+
<dt><em>outError</em></dt>
|
2387
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
2388
|
+
</dl>
|
2389
|
+
|
2390
|
+
</div>
|
2391
|
+
|
2392
|
+
|
2393
|
+
|
2394
|
+
<div class="method-subsection return">
|
2395
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
2396
|
+
<p>An array is returned if: 1) the <a href="#//api/name/sort">sort</a> has been specified or 2) the return type is \link Globals::NSFReturnKeys NSFReturnKeys \endlink. Otherwise, a dictionary is returned.</p>
|
2397
|
+
</div>
|
2398
|
+
|
2399
|
+
|
2400
|
+
|
2401
|
+
|
2402
|
+
|
2403
|
+
<div class="method-subsection discussion-section">
|
2404
|
+
<h4 class="method-subtitle">Discussion</h4>
|
2405
|
+
<p>Performs a search using the values of the properties.</p><div class="note"><p><strong>Note:</strong> The <a href="#//api/name/sort">sort</a> descriptor will be ignored when the return type is NSFReturnKeys.</p></div>
|
2406
|
+
</div>
|
2407
|
+
|
2408
|
+
|
2409
|
+
|
2410
|
+
|
2411
|
+
|
2412
|
+
<div class="method-subsection see-also-section">
|
2413
|
+
<h4 class="method-subtitle">See Also</h4>
|
2414
|
+
<ul>
|
2415
|
+
|
2416
|
+
<li><code><p>\link <a href="#//api/name/searchObjectsAdded:date:returnType:error:">– searchObjectsAdded:date:returnType:error:</a> – (id)searchObjectsAdded:(NSFDateMatchType)theDateMatch date:(NSDate *)theDate returnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink</p></code></li>
|
2417
|
+
|
2418
|
+
</ul>
|
2419
|
+
</div>
|
2420
|
+
|
2421
|
+
|
2422
|
+
|
2423
|
+
<div class="method-subsection declared-in-section">
|
2424
|
+
<h4 class="method-subtitle">Declared In</h4>
|
2425
|
+
<code class="declared-in-ref">NSFNanoSearch.h</code><br />
|
2426
|
+
</div>
|
2427
|
+
|
2428
|
+
|
2429
|
+
</div>
|
2430
|
+
|
2431
|
+
</div>
|
2432
|
+
|
2433
|
+
|
2434
|
+
</div>
|
2435
|
+
<div class="main-navigation navigation-bottom">
|
2436
|
+
<ul>
|
2437
|
+
<li><a href="../index.html">Index</a></li>
|
2438
|
+
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
2439
|
+
</ul>
|
2440
|
+
</div>
|
2441
|
+
<div id="footer">
|
2442
|
+
<hr />
|
2443
|
+
<div class="footer-copyright">
|
2444
|
+
<p><span class="copyright">© 2013 Tito Ciuro. All rights reserved. (Last updated: 2013-01-22)</span><br />
|
2445
|
+
|
2446
|
+
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
|
2447
|
+
|
2448
|
+
</div>
|
2449
|
+
</div>
|
2450
|
+
</div>
|
2451
|
+
</article>
|
2452
|
+
<script type="text/javascript">
|
2453
|
+
function jumpToChange()
|
2454
|
+
{
|
2455
|
+
window.location.hash = this.options[this.selectedIndex].value;
|
2456
|
+
}
|
2457
|
+
|
2458
|
+
function toggleTOC()
|
2459
|
+
{
|
2460
|
+
var contents = document.getElementById('contents');
|
2461
|
+
var tocContainer = document.getElementById('tocContainer');
|
2462
|
+
|
2463
|
+
if (this.getAttribute('class') == 'open')
|
2464
|
+
{
|
2465
|
+
this.setAttribute('class', '');
|
2466
|
+
contents.setAttribute('class', '');
|
2467
|
+
tocContainer.setAttribute('class', '');
|
2468
|
+
|
2469
|
+
window.name = "hideTOC";
|
2470
|
+
}
|
2471
|
+
else
|
2472
|
+
{
|
2473
|
+
this.setAttribute('class', 'open');
|
2474
|
+
contents.setAttribute('class', 'isShowingTOC');
|
2475
|
+
tocContainer.setAttribute('class', 'isShowingTOC');
|
2476
|
+
|
2477
|
+
window.name = "";
|
2478
|
+
}
|
2479
|
+
return false;
|
2480
|
+
}
|
2481
|
+
|
2482
|
+
function toggleTOCEntryChildren(e)
|
2483
|
+
{
|
2484
|
+
e.stopPropagation();
|
2485
|
+
var currentClass = this.getAttribute('class');
|
2486
|
+
if (currentClass == 'children') {
|
2487
|
+
this.setAttribute('class', 'children open');
|
2488
|
+
}
|
2489
|
+
else if (currentClass == 'children open') {
|
2490
|
+
this.setAttribute('class', 'children');
|
2491
|
+
}
|
2492
|
+
return false;
|
2493
|
+
}
|
2494
|
+
|
2495
|
+
function tocEntryClick(e)
|
2496
|
+
{
|
2497
|
+
e.stopPropagation();
|
2498
|
+
return true;
|
2499
|
+
}
|
2500
|
+
|
2501
|
+
function init()
|
2502
|
+
{
|
2503
|
+
var selectElement = document.getElementById('jumpTo');
|
2504
|
+
selectElement.addEventListener('change', jumpToChange, false);
|
2505
|
+
|
2506
|
+
var tocButton = document.getElementById('table_of_contents');
|
2507
|
+
tocButton.addEventListener('click', toggleTOC, false);
|
2508
|
+
|
2509
|
+
var taskTreeItem = document.getElementById('task_treeitem');
|
2510
|
+
if (taskTreeItem.getElementsByTagName('li').length > 0)
|
2511
|
+
{
|
2512
|
+
taskTreeItem.setAttribute('class', 'children');
|
2513
|
+
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
|
2514
|
+
}
|
2515
|
+
|
2516
|
+
var tocList = document.getElementById('toc');
|
2517
|
+
|
2518
|
+
var tocEntries = tocList.getElementsByTagName('li');
|
2519
|
+
for (var i = 0; i < tocEntries.length; i++) {
|
2520
|
+
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
|
2521
|
+
}
|
2522
|
+
|
2523
|
+
var tocLinks = tocList.getElementsByTagName('a');
|
2524
|
+
for (var i = 0; i < tocLinks.length; i++) {
|
2525
|
+
tocLinks[i].addEventListener('click', tocEntryClick, false);
|
2526
|
+
}
|
2527
|
+
|
2528
|
+
if (window.name == "hideTOC") {
|
2529
|
+
toggleTOC.call(tocButton);
|
2530
|
+
}
|
2531
|
+
}
|
2532
|
+
|
2533
|
+
window.onload = init;
|
2534
|
+
|
2535
|
+
// If showing in Xcode, hide the TOC and Header
|
2536
|
+
if (navigator.userAgent.match(/xcode/i)) {
|
2537
|
+
document.getElementById("contents").className = "hideInXcode"
|
2538
|
+
document.getElementById("tocContainer").className = "hideInXcode"
|
2539
|
+
document.getElementById("top_header").className = "hideInXcode"
|
2540
|
+
}
|
2541
|
+
|
2542
|
+
</script>
|
2543
|
+
</body>
|
2544
|
+
</html>
|