Check-in [5627099a85]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:5627099a857db0dd1e44cb5bb92ff1b670b7ac67
Date: 2009-10-17 23:53:10
User: dmitry
Comment:Put everything into just two files CRDatabase.[h]m.
Tags And Properties
Changes

Deleted CRDB.xcodeproj/dmitry.pbxuser

Old (009dc339a1965f75) New ()
1 // !$*UTF8*$! <
2 { <
3 08FB7793FE84155DC02AAC07 /* Project object */ = { <
4 activeBuildConfigurationName = Debug; <
5 activeExecutable = 0ACEBDEC106E7A1F007FCDBD /* CRDB */; <
6 activeTarget = 8DD76F960486AA7600D96B5E /* CRDB */; <
7 addToTargets = ( <
8 ); <
9 breakpoints = ( <
10 ); <
11 codeSenseManager = 0ACEBDF1106E7A3E007FCDBD /* Code sense */; <
12 executables = ( <
13 0ACEBDEC106E7A1F007FCDBD /* CRDB */, <
14 ); <
15 perUserDictionary = { <
16 "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = { <
17 PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; <
18 PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID; <
19 PBXFileTableDataSourceColumnWidthsKey = ( <
20 20, <
21 20, <
22 198, <
23 20, <
24 99, <
25 99, <
26 29, <
27 20, <
28 ); <
29 PBXFileTableDataSourceColumnsKey = ( <
30 PBXBreakpointsDataSource_ActionID, <
31 PBXBreakpointsDataSource_TypeID, <
32 PBXBreakpointsDataSource_BreakpointID, <
33 PBXBreakpointsDataSource_UseID, <
34 PBXBreakpointsDataSource_LocationID, <
35 PBXBreakpointsDataSource_ConditionID, <
36 PBXBreakpointsDataSource_IgnoreCountID, <
37 PBXBreakpointsDataSource_ContinueID, <
38 ); <
39 }; <
40 PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { <
41 PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; <
42 PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; <
43 PBXFileTableDataSourceColumnWidthsKey = ( <
44 22, <
45 300, <
46 424, <
47 ); <
48 PBXFileTableDataSourceColumnsKey = ( <
49 PBXExecutablesDataSource_ActiveFlagID, <
50 PBXExecutablesDataSource_NameID, <
51 PBXExecutablesDataSource_CommentsID, <
52 ); <
53 }; <
54 PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { <
55 PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; <
56 PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; <
57 PBXFileTableDataSourceColumnWidthsKey = ( <
58 20, <
59 536, <
60 20, <
61 48, <
62 43, <
63 43, <
64 20, <
65 ); <
66 PBXFileTableDataSourceColumnsKey = ( <
67 PBXFileDataSource_FiletypeID, <
68 PBXFileDataSource_Filename_ColumnID, <
69 PBXFileDataSource_Built_ColumnID, <
70 PBXFileDataSource_ObjectSize_ColumnID, <
71 PBXFileDataSource_Errors_ColumnID, <
72 PBXFileDataSource_Warnings_ColumnID, <
73 PBXFileDataSource_Target_ColumnID, <
74 ); <
75 }; <
76 PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { <
77 PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; <
78 PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; <
79 PBXFileTableDataSourceColumnWidthsKey = ( <
80 20, <
81 496, <
82 60, <
83 20, <
84 48, <
85 43, <
86 43, <
87 ); <
88 PBXFileTableDataSourceColumnsKey = ( <
89 PBXFileDataSource_FiletypeID, <
90 PBXFileDataSource_Filename_ColumnID, <
91 PBXTargetDataSource_PrimaryAttribute, <
92 PBXFileDataSource_Built_ColumnID, <
93 PBXFileDataSource_ObjectSize_ColumnID, <
94 PBXFileDataSource_Errors_ColumnID, <
95 PBXFileDataSource_Warnings_ColumnID, <
96 ); <
97 }; <
98 PBXPerProjectTemplateStateSaveDate = 275738438; <
99 PBXWorkspaceStateSaveDate = 275738438; <
100 }; <
101 perUserProjectItems = { <
102 0A76B5BC106E949F0048097B /* PBXTextBookmark */ = 0A76B5BC106E949F0048097B /* PBXTextBookmark */; <
103 0A76B658106EA6530048097B /* PBXTextBookmark */ = 0A76B658106EA6530048097B /* PBXTextBookmark */; <
104 0A76B660106EA6530048097B /* PBXTextBookmark */ = 0A76B660106EA6530048097B /* PBXTextBookmark */; <
105 0A76B742106EAFBF0048097B /* PBXTextBookmark */ = 0A76B742106EAFBF0048097B /* PBXTextBookmark */; <
106 0A76B745106EAFBF0048097B /* PBXTextBookmark */ = 0A76B745106EAFBF0048097B /* PBXTextBookmark */; <
107 0A76B7D6106EC13E0048097B /* PBXTextBookmark */ = 0A76B7D6106EC13E0048097B /* PBXTextBookmark */; <
108 0A76B912106EE11E0048097B /* PBXTextBookmark */ = 0A76B912106EE11E0048097B /* PBXTextBookmark */; <
109 0A76B95C106F6F020048097B /* PBXTextBookmark */ = 0A76B95C106F6F020048097B /* PBXTextBookmark */; <
110 0A76B95D106F6F020048097B /* PBXTextBookmark */ = 0A76B95D106F6F020048097B /* PBXTextBookmark */; <
111 0A76B95E106F6F020048097B /* PBXTextBookmark */ = 0A76B95E106F6F020048097B /* PBXTextBookmark */; <
112 0A76B95F106F6F020048097B /* PBXTextBookmark */ = 0A76B95F106F6F020048097B /* PBXTextBookmark */; <
113 0A76B960106F6F020048097B /* PBXTextBookmark */ = 0A76B960106F6F020048097B /* PBXTextBookmark */; <
114 0A76B961106F6F020048097B /* PBXTextBookmark */ = 0A76B961106F6F020048097B /* PBXTextBookmark */; <
115 0A76B977106F73D90048097B /* PBXTextBookmark */ = 0A76B977106F73D90048097B /* PBXTextBookmark */; <
116 0A76B978106F73D90048097B /* PBXTextBookmark */ = 0A76B978106F73D90048097B /* PBXTextBookmark */; <
117 0A76B979106F73D90048097B /* PBXTextBookmark */ = 0A76B979106F73D90048097B /* PBXTextBookmark */; <
118 0A76B97A106F73D90048097B /* PBXTextBookmark */ = 0A76B97A106F73D90048097B /* PBXTextBookmark */; <
119 }; <
120 sourceControlManager = 0ACEBDF0106E7A3E007FCDBD /* Source Control */; <
121 userBuildSettings = { <
122 }; <
123 }; <
124 08FB7796FE84155DC02AAC07 /* CRDB.m */ = { <
125 uiCtxt = { <
126 sepNavIntBoundsRect = "{{0, 0}, {439, 806}}"; <
127 sepNavSelRange = "{1550, 0}"; <
128 sepNavVisRange = "{1299, 282}"; <
129 }; <
130 }; <
131 0A76B5BC106E949F0048097B /* PBXTextBookmark */ = { <
132 isa = PBXTextBookmark; <
133 fRef = 0A76B5BD106E949F0048097B /* stdarg.h */; <
134 name = "stdarg.h: 105"; <
135 rLen = 32; <
136 rLoc = 3650; <
137 rType = 0; <
138 vrLen = 1432; <
139 vrLoc = 2801; <
140 }; <
141 0A76B5BD106E949F0048097B /* stdarg.h */ = { <
142 isa = PBXFileReference; <
143 lastKnownFileType = sourcecode.c.h; <
144 name = stdarg.h; <
145 path = "/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdarg.h"; <
146 sourceTree = "<absolute>"; <
147 }; <
148 0A76B658106EA6530048097B /* PBXTextBookmark */ = { <
149 isa = PBXTextBookmark; <
150 fRef = 32A70AAB03705E1F00C91783 /* CRDB_Prefix.pch */; <
151 name = "CRDB_Prefix.pch: 1"; <
152 rLen = 0; <
153 rLoc = 0; <
154 rType = 0; <
155 vrLen = 152; <
156 vrLoc = 0; <
157 }; <
158 0A76B65D106EA6530048097B /* sqlite3.h */ = { <
159 isa = PBXFileReference; <
160 lastKnownFileType = sourcecode.c.h; <
161 name = sqlite3.h; <
162 path = /Developer/SDKs/MacOSX10.6.sdk/usr/include/sqlite3.h; <
163 sourceTree = "<absolute>"; <
164 }; <
165 0A76B660106EA6530048097B /* PBXTextBookmark */ = { <
166 isa = PBXTextBookmark; <
167 fRef = 0A76B661106EA6530048097B /* NSPathUtilities.h */; <
168 name = "NSPathUtilities.h: 34"; <
169 rLen = 51; <
170 rLoc = 992; <
171 rType = 0; <
172 vrLen = 1387; <
173 vrLoc = 0; <
174 }; <
175 0A76B661106EA6530048097B /* NSPathUtilities.h */ = { <
176 isa = PBXFileReference; <
177 lastKnownFileType = sourcecode.c.h; <
178 name = NSPathUtilities.h; <
179 path = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSPathUtilities.h; <
180 sourceTree = "<absolute>"; <
181 }; <
182 0A76B742106EAFBF0048097B /* PBXTextBookmark */ = { <
183 isa = PBXTextBookmark; <
184 fRef = 0A76B743106EAFBF0048097B /* EGODatabase.m */; <
185 name = "EGODatabase.m: 242"; <
186 rLen = 4; <
187 rLoc = 6592; <
188 rType = 0; <
189 vrLen = 1117; <
190 vrLoc = 6127; <
191 }; <
192 0A76B743106EAFBF0048097B /* EGODatabase.m */ = { <
193 isa = PBXFileReference; <
194 lastKnownFileType = sourcecode.c.objc; <
195 name = EGODatabase.m; <
196 path = /Users/dmitry/Projects/egodatabase/EGODatabase.m; <
197 sourceTree = "<absolute>"; <
198 }; <
199 0A76B745106EAFBF0048097B /* PBXTextBookmark */ = { <
200 isa = PBXTextBookmark; <
201 fRef = 0A76B746106EAFBF0048097B /* queue.h */; <
202 name = "queue.h: 334"; <
203 rLen = 54; <
204 rLoc = 10530; <
205 rType = 0; <
206 vrLen = 1625; <
207 vrLoc = 9723; <
208 }; <
209 0A76B746106EAFBF0048097B /* queue.h */ = { <
210 isa = PBXFileReference; <
211 lastKnownFileType = sourcecode.c.h; <
212 name = queue.h; <
213 path = /Developer/SDKs/MacOSX10.6.sdk/usr/include/dispatch/queue.h; <
214 sourceTree = "<absolute>"; <
215 }; <
216 0A76B7D6106EC13E0048097B /* PBXTextBookmark */ = { <
217 isa = PBXTextBookmark; <
218 fRef = 0A76B7D7106EC13E0048097B /* NSObjCRuntime.h */; <
219 name = "NSObjCRuntime.h: 218"; <
220 rLen = 34; <
221 rLoc = 7437; <
222 rType = 0; <
223 vrLen = 1168; <
224 vrLoc = 6804; <
225 }; <
226 0A76B7D7106EC13E0048097B /* NSObjCRuntime.h */ = { <
227 isa = PBXFileReference; <
228 lastKnownFileType = sourcecode.c.h; <
229 name = NSObjCRuntime.h; <
230 path = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObjCRuntime.h; <
231 sourceTree = "<absolute>"; <
232 }; <
233 0A76B912106EE11E0048097B /* PBXTextBookmark */ = { <
234 isa = PBXTextBookmark; <
235 fRef = 0A76B65D106EA6530048097B /* sqlite3.h */; <
236 name = "sqlite3.h: 1209"; <
237 rLen = 51; <
238 rLoc = 55138; <
239 rType = 0; <
240 vrLen = 2202; <
241 vrLoc = 52987; <
242 }; <
243 0A76B950106F68230048097B /* LICENSE */ = { <
244 uiCtxt = { <
245 sepNavIntBoundsRect = "{{0, 0}, {714, 633}}"; <
246 sepNavSelRange = "{64, 0}"; <
247 sepNavVisRange = "{0, 1153}"; <
248 }; <
249 }; <
250 0A76B95C106F6F020048097B /* PBXTextBookmark */ = { <
251 isa = PBXTextBookmark; <
252 fRef = 0A76B950106F68230048097B /* LICENSE */; <
253 name = "LICENSE: 4"; <
254 rLen = 0; <
255 rLoc = 64; <
256 rType = 0; <
257 vrLen = 1153; <
258 vrLoc = 0; <
259 }; <
260 0A76B95D106F6F020048097B /* PBXTextBookmark */ = { <
261 isa = PBXTextBookmark; <
262 fRef = 0ACEBE03106E7AD8007FCDBD /* README */; <
263 name = "README: 54"; <
264 rLen = 0; <
265 rLoc = 1472; <
266 rType = 0; <
267 vrLen = 1412; <
268 vrLoc = 0; <
269 }; <
270 0A76B95E106F6F020048097B /* PBXTextBookmark */ = { <
271 isa = PBXTextBookmark; <
272 fRef = 0ACEBE02106E7AD8007FCDBD /* CRDatabaseRow.m */; <
273 name = "CRDatabaseRow.m: 3"; <
274 rLen = 0; <
275 rLoc = 29; <
276 rType = 0; <
277 vrLen = 1079; <
278 vrLoc = 0; <
279 }; <
280 0A76B95F106F6F020048097B /* PBXTextBookmark */ = { <
281 isa = PBXTextBookmark; <
282 fRef = 0ACEBE01106E7AD8007FCDBD /* CRDatabaseRow.h */; <
283 name = "CRDatabaseRow.h: 5"; <
284 rLen = 0; <
285 rLoc = 41; <
286 rType = 0; <
287 vrLen = 1172; <
288 vrLoc = 0; <
289 }; <
290 0A76B960106F6F020048097B /* PBXTextBookmark */ = { <
291 isa = PBXTextBookmark; <
292 fRef = 0ACEBE00106E7AD8007FCDBD /* CRDatabaseResult.m */; <
293 name = "CRDatabaseResult.m: 5"; <
294 rLen = 0; <
295 rLoc = 44; <
296 rType = 0; <
297 vrLen = 1001; <
298 vrLoc = 0; <
299 }; <
300 0A76B961106F6F020048097B /* PBXTextBookmark */ = { <
301 isa = PBXTextBookmark; <
302 fRef = 0ACEBDFF106E7AD8007FCDBD /* CRDatabaseResult.h */; <
303 name = "CRDatabaseResult.h: 5"; <
304 rLen = 0; <
305 rLoc = 44; <
306 rType = 0; <
307 vrLen = 650; <
308 vrLoc = 0; <
309 }; <
310 0A76B977106F73D90048097B /* PBXTextBookmark */ = { <
311 isa = PBXTextBookmark; <
312 fRef = 08FB7796FE84155DC02AAC07 /* CRDB.m */; <
313 name = "CRDB.m: 46"; <
314 rLen = 0; <
315 rLoc = 1325; <
316 rType = 0; <
317 vrLen = 1323; <
318 vrLoc = 0; <
319 }; <
320 0A76B978106F73D90048097B /* PBXTextBookmark */ = { <
321 isa = PBXTextBookmark; <
322 fRef = 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */; <
323 name = "CRDatabase.m: 3"; <
324 rLen = 0; <
325 rLoc = 34; <
326 rType = 0; <
327 vrLen = 1483; <
328 vrLoc = 2468; <
329 }; <
330 0A76B979106F73D90048097B /* PBXTextBookmark */ = { <
331 isa = PBXTextBookmark; <
332 fRef = 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */; <
333 name = "CRDatabase.h: 41"; <
334 rLen = 0; <
335 rLoc = 1007; <
336 rType = 0; <
337 vrLen = 1640; <
338 vrLoc = 38; <
339 }; <
340 0A76B97A106F73D90048097B /* PBXTextBookmark */ = { <
341 isa = PBXTextBookmark; <
342 fRef = 0ACEBE03106E7AD8007FCDBD /* README */; <
343 name = "README: 8"; <
344 rLen = 0; <
345 rLoc = 190; <
346 rType = 0; <
347 vrLen = 1411; <
348 vrLoc = 0; <
349 }; <
350 0ACEBDEC106E7A1F007FCDBD /* CRDB */ = { <
351 isa = PBXExecutable; <
352 activeArgIndices = ( <
353 ); <
354 argumentStrings = ( <
355 ); <
356 autoAttachOnCrash = 1; <
357 breakpointsEnabled = 0; <
358 configStateDict = { <
359 }; <
360 customDataFormattersEnabled = 1; <
361 dataTipCustomDataFormattersEnabled = 1; <
362 dataTipShowTypeColumn = 1; <
363 dataTipSortType = 0; <
364 debuggerPlugin = GDBDebugging; <
365 disassemblyDisplayState = 0; <
366 dylibVariantSuffix = ""; <
367 enableDebugStr = 1; <
368 environmentEntries = ( <
369 ); <
370 executableSystemSymbolLevel = 0; <
371 executableUserSymbolLevel = 0; <
372 libgmallocEnabled = 0; <
373 name = CRDB; <
374 savedGlobals = { <
375 }; <
376 showTypeColumn = 0; <
377 sourceDirectories = ( <
378 ); <
379 variableFormatDictionary = { <
380 }; <
381 }; <
382 0ACEBDF0106E7A3E007FCDBD /* Source Control */ = { <
383 isa = PBXSourceControlManager; <
384 fallbackIsa = XCSourceControlManager; <
385 isSCMEnabled = 0; <
386 scmConfiguration = { <
387 repositoryNamesForRoots = { <
388 "" = ""; <
389 }; <
390 }; <
391 }; <
392 0ACEBDF1106E7A3E007FCDBD /* Code sense */ = { <
393 isa = PBXCodeSenseManager; <
394 indexTemplatePath = ""; <
395 }; <
396 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */ = { <
397 uiCtxt = { <
398 sepNavIntBoundsRect = "{{0, 0}, {714, 819}}"; <
399 sepNavSelRange = "{1007, 0}"; <
400 sepNavVisRange = "{38, 1640}"; <
401 }; <
402 }; <
403 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */ = { <
404 uiCtxt = { <
405 sepNavIntBoundsRect = "{{0, 0}, {714, 4966}}"; <
406 sepNavSelRange = "{34, 0}"; <
407 sepNavVisRange = "{2468, 1483}"; <
408 sepNavWindowFrame = "{{15, 83}, {791, 690}}"; <
409 }; <
410 }; <
411 0ACEBDFF106E7AD8007FCDBD /* CRDatabaseResult.h */ = { <
412 uiCtxt = { <
413 sepNavIntBoundsRect = "{{0, 0}, {714, 633}}"; <
414 sepNavSelRange = "{44, 0}"; <
415 sepNavVisRange = "{0, 650}"; <
416 }; <
417 }; <
418 0ACEBE00106E7AD8007FCDBD /* CRDatabaseResult.m */ = { <
419 uiCtxt = { <
420 sepNavIntBoundsRect = "{{0, 0}, {714, 715}}"; <
421 sepNavSelRange = "{44, 0}"; <
422 sepNavVisRange = "{0, 1001}"; <
423 }; <
424 }; <
425 0ACEBE01106E7AD8007FCDBD /* CRDatabaseRow.h */ = { <
426 uiCtxt = { <
427 sepNavIntBoundsRect = "{{0, 0}, {714, 633}}"; <
428 sepNavSelRange = "{41, 0}"; <
429 sepNavVisRange = "{0, 1172}"; <
430 }; <
431 }; <
432 0ACEBE02106E7AD8007FCDBD /* CRDatabaseRow.m */ = { <
433 uiCtxt = { <
434 sepNavIntBoundsRect = "{{0, 0}, {714, 1885}}"; <
435 sepNavSelRange = "{29, 0}"; <
436 sepNavVisRange = "{0, 1079}"; <
437 }; <
438 }; <
439 0ACEBE03106E7AD8007FCDBD /* README */ = { <
440 uiCtxt = { <
441 sepNavIntBoundsRect = "{{0, 0}, {714, 702}}"; <
442 sepNavSelRange = "{190, 0}"; <
443 sepNavVisRange = "{0, 1411}"; <
444 }; <
445 }; <
446 32A70AAB03705E1F00C91783 /* CRDB_Prefix.pch */ = { <
447 uiCtxt = { <
448 sepNavIntBoundsRect = "{{0, 0}, {714, 633}}"; <
449 sepNavSelRange = "{0, 0}"; <
450 sepNavVisRange = "{0, 152}"; <
451 }; <
452 }; <
453 8DD76F960486AA7600D96B5E /* CRDB */ = { <
454 activeExec = 0; <
455 executables = ( <
456 0ACEBDEC106E7A1F007FCDBD /* CRDB */, <
457 ); <
458 }; <
459 } <

Changes to CRDB.xcodeproj/project.pbxproj

Old (3fcb85846ebc30b6) New (7ed60bb7e048add0)
1 // !$*UTF8*$! 1 // !$*UTF8*$!
2 { 2 {
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 objectVersion = 45; 6 objectVersion = 45;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 0ACEBE04106E7AD9007FCDBD /* CRDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */; }; 10 0ACEBE04106E7AD9007FCDBD /* CRDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */; };
11 0ACEBE05106E7AD9007FCDBD /* CRDatabaseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACEBE00106E7AD8007FCDBD /* CRDatabaseResult.m */; }; <
12 0ACEBE06106E7AD9007FCDBD /* CRDatabaseRow.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACEBE02106E7AD8007FCDBD /* CRDatabaseRow.m */; }; <
13 0ACEBF74106E7B66007FCDBD /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACEBF73106E7B66007FCDBD /* libsqlite3.0.dylib */; }; 11 0ACEBF74106E7B66007FCDBD /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACEBF73106E7B66007FCDBD /* libsqlite3.0.dylib */; };
14 8DD76F9A0486AA7600D96B5E /* CRDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* CRDB.m */; settings = {ATTRIBUTES = (); }; }; 12 8DD76F9A0486AA7600D96B5E /* CRDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* CRDB.m */; settings = {ATTRIBUTES = (); }; };
15 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; 13 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
16 /* End PBXBuildFile section */ 14 /* End PBXBuildFile section */
17 15
13 hidden lines
31 08FB7796FE84155DC02AAC07 /* CRDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDB.m; sourceTree = "<group>"; }; 29 08FB7796FE84155DC02AAC07 /* CRDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDB.m; sourceTree = "<group>"; };
32 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; 30 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
33 0A76B950106F68230048097B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 31 0A76B950106F68230048097B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
34 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDatabase.h; sourceTree = "<group>"; }; 32 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDatabase.h; sourceTree = "<group>"; };
35 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDatabase.m; sourceTree = "<group>"; }; 33 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDatabase.m; sourceTree = "<group>"; };
36 0ACEBDFF106E7AD8007FCDBD /* CRDatabaseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDatabaseResult.h; sourceTree = "<group>"; }; <
37 0ACEBE00106E7AD8007FCDBD /* CRDatabaseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDatabaseResult.m; sourceTree = "<group>"; }; <
38 0ACEBE01106E7AD8007FCDBD /* CRDatabaseRow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDatabaseRow.h; sourceTree = "<group>"; }; <
39 0ACEBE02106E7AD8007FCDBD /* CRDatabaseRow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRDatabaseRow.m; sourceTree = "<group>"; }; <
40 0ACEBE03106E7AD8007FCDBD /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; 34 0ACEBE03106E7AD8007FCDBD /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
41 0ACEBF73106E7B66007FCDBD /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = /usr/lib/libsqlite3.0.dylib; sourceTree = "<absolute>"; }; 35 0ACEBF73106E7B66007FCDBD /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = /usr/lib/libsqlite3.0.dylib; sourceTree = "<absolute>"; };
42 32A70AAB03705E1F00C91783 /* CRDB_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDB_Prefix.pch; sourceTree = "<group>"; }; 36 32A70AAB03705E1F00C91783 /* CRDB_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRDB_Prefix.pch; sourceTree = "<group>"; };
43 8DD76FA10486AA7600D96B5E /* CRDB */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CRDB; sourceTree = BUILT_PRODUCTS_DIR; }; 37 8DD76FA10486AA7600D96B5E /* CRDB */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CRDB; sourceTree = BUILT_PRODUCTS_DIR; };
44 /* End PBXFileReference section */ 38 /* End PBXFileReference section */
43 hidden lines
88 0ACEBDF5106E7ACA007FCDBD /* CRDatabase */ = { 82 0ACEBDF5106E7ACA007FCDBD /* CRDatabase */ = {
89 isa = PBXGroup; 83 isa = PBXGroup;
90 children = ( 84 children = (
91 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */, 85 0ACEBDFD106E7AD8007FCDBD /* CRDatabase.h */,
92 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */, 86 0ACEBDFE106E7AD8007FCDBD /* CRDatabase.m */,
93 0ACEBDFF106E7AD8007FCDBD /* CRDatabaseResult.h */, <
94 0ACEBE00106E7AD8007FCDBD /* CRDatabaseResult.m */, <
95 0ACEBE01106E7AD8007FCDBD /* CRDatabaseRow.h */, <
96 0ACEBE02106E7AD8007FCDBD /* CRDatabaseRow.m */, <
97 0ACEBE03106E7AD8007FCDBD /* README */, 87 0ACEBE03106E7AD8007FCDBD /* README */,
98 0A76B950106F68230048097B /* LICENSE */, 88 0A76B950106F68230048097B /* LICENSE */,
99 ); 89 );
100 name = CRDatabase; 90 name = CRDatabase;
101 sourceTree = "<group>"; 91 sourceTree = "<group>";
49 hidden lines
151 isa = PBXSourcesBuildPhase; 141 isa = PBXSourcesBuildPhase;
152 buildActionMask = 2147483647; 142 buildActionMask = 2147483647;
153 files = ( 143 files = (
154 8DD76F9A0486AA7600D96B5E /* CRDB.m in Sources */, 144 8DD76F9A0486AA7600D96B5E /* CRDB.m in Sources */,
155 0ACEBE04106E7AD9007FCDBD /* CRDatabase.m in Sources */, 145 0ACEBE04106E7AD9007FCDBD /* CRDatabase.m in Sources */,
156 0ACEBE05106E7AD9007FCDBD /* CRDatabaseResult.m in Sources */, <
157 0ACEBE06106E7AD9007FCDBD /* CRDatabaseRow.m in Sources */, <
158 ); 146 );
159 runOnlyForDeploymentPostprocessing = 0; 147 runOnlyForDeploymentPostprocessing = 0;
160 }; 148 };
161 /* End PBXSourcesBuildPhase section */ 149 /* End PBXSourcesBuildPhase section */
162 150
80 hidden lines
243 }; 231 };
244 /* End XCConfigurationList section */ 232 /* End XCConfigurationList section */
245 }; 233 };
246 rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; 234 rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
247 } 235 }

Changes to CRDatabase.h

Old (936dc300eac94487) New (6cf43e0edc6a98e7)
1 // 1 //
2 // CRDatabase.h 2 // CRDatabase.h
3 // CRDatabase 3 // CRDatabase
4 // 4 //
5 5
6 #import <Foundation/Foundation.h> 6 #import <Foundation/Foundation.h>
7 #import "CRDatabaseResult.h" <
8 #import "CRDatabaseRow.h" <
9 #import <sqlite3.h> 7 #import <sqlite3.h>
10 8
> 9 @class CRDatabaseRow;
> 10 @class CRDatabaseResult;
11 11
12 @interface CRDatabase : NSObject { 12 @interface CRDatabase : NSObject {
13 @protected 13 @protected
14 NSURL* databaseURL_; 14 NSURL* databaseURL_;
15 dispatch_queue_t lockQueue_; 15 dispatch_queue_t lockQueue_;
46 hidden lines
62 // Do not use the following methods with threads! 62 // Do not use the following methods with threads!
63 // CRDatabaseResult contains these values if you need them 63 // CRDatabaseResult contains these values if you need them
64 - (NSString*)lastErrorMessage; 64 - (NSString*)lastErrorMessage;
65 - (BOOL)hadError; 65 - (BOOL)hadError;
66 - (int)lastErrorCode; 66 - (int)lastErrorCode;
> 67
> 68 @end
> 69
> 70 // --------------------------------------------------------------------------
> 71 #pragma mark -
> 72
> 73 @interface CRDatabaseResult : NSObject<NSFastEnumeration> {
> 74 @private
> 75 int errorCode_;
> 76 NSString *errorMessage_;
> 77 NSMutableArray *columnNames_;
> 78 NSMutableArray *columnTypes_;
> 79 NSMutableArray *rows_;
> 80 }
> 81 @property(nonatomic,assign) int errorCode;
> 82 @property(nonatomic,copy) NSString *errorMessage;
> 83 @property(readonly) NSMutableArray *columnNames;
> 84 @property(readonly) NSMutableArray *columnTypes;
> 85 @property(readonly) NSMutableArray *rows;
> 86
> 87 - (void)addRow:(CRDatabaseRow *)row;
> 88 - (CRDatabaseRow *)rowAtIndex:(NSUInteger)index;
> 89 - (NSUInteger)count;
> 90
> 91 @end
> 92
> 93 // --------------------------------------------------------------------------
> 94 #pragma mark -
> 95
> 96 @interface CRDatabaseRow : NSObject {
> 97 @private
> 98 NSMutableArray* columnData_;
> 99 CRDatabaseResult* result;
> 100 }
> 101 @property(readonly) NSMutableArray* columnData;
> 102
> 103 - (id)initWithDatabaseResult:(CRDatabaseResult *)aResult;
> 104
> 105 - (NSInteger)integerForColumn:(NSString *)columnName;
> 106 - (NSInteger)integerForColumnIndex:(NSUInteger)columnIndex;
> 107
> 108 - (int)intForColumn:(NSString *)columnName;
> 109 - (int)intForColumnIndex:(NSUInteger)columnIdx;
> 110
> 111 - (long long)longLongForColumn:(NSString *)columnName;
> 112 - (long long)longLongForColumnIndex:(NSUInteger)columnIdx;
> 113
> 114 - (BOOL)boolForColumn:(NSString *)columnName;
> 115 - (BOOL)boolForColumnIndex:(NSUInteger)columnIdx;
> 116
> 117 - (double)doubleForColumn:(NSString *)columnName;
> 118 - (double)doubleForColumnIndex:(NSUInteger)columnIdx;
> 119
> 120 - (NSString *)stringForColumn:(NSString *)columnName;
> 121 - (NSString *)stringForColumnIndex:(NSUInteger)columnIdx;
> 122
> 123 - (NSDate *)dateForColumn:(NSString *)columnName;
> 124 - (NSDate *)dateForColumnIndex:(NSUInteger)columnIdx;
> 125
> 126 - (NSData *)dataForColumn:(NSString *)columnName;
> 127 - (NSData *)dataForColumnIndex:(NSUInteger)columnIndex;
67 128
68 @end 129 @end

Changes to CRDatabase.m

Old (04019fa0f46eeaec) New (890aaf6f1d6d4ab2)
1 // 1 //
2 // CRDatabase.m 2 // CRDatabase.m
3 // CRDatabase 3 // CRDatabase
4 // 4 //
5 5
361 hidden lines
367 - (void)finalize 367 - (void)finalize
368 { 368 {
369 [self close]; 369 [self close];
370 dispatch_release(lockQueue_); 370 dispatch_release(lockQueue_);
371 [super finalize]; 371 [super finalize];
> 372 }
> 373
> 374 @end
> 375
> 376 // --------------------------------------------------------------------------
> 377 #pragma mark -
> 378
> 379 @implementation CRDatabaseResult
> 380
> 381 @synthesize errorCode = errorCode_;
> 382 @synthesize errorMessage = errorMessage_;
> 383 @synthesize columnNames = columnNames_;
> 384 @synthesize columnTypes = columnTypes_;
> 385 @synthesize rows = rows_;
> 386
> 387 - (id)init {
> 388 if (![super init])
> 389 return nil;
> 390 errorCode_ = 0;
> 391 columnNames_ = [[NSMutableArray alloc] init];
> 392 columnTypes_ = [[NSMutableArray alloc] init];
> 393 rows_ = [[NSMutableArray alloc] init];
> 394 return self;
> 395 }
> 396
> 397 - (void)addRow:(CRDatabaseRow *)row
> 398 {
> 399 [rows_ addObject:row];
> 400 }
> 401
> 402 - (CRDatabaseRow *)rowAtIndex:(NSUInteger)index
> 403 {
> 404 return [rows_ objectAtIndex:index];
> 405 }
> 406
> 407 - (NSUInteger)count
> 408 {
> 409 return rows_.count;
> 410 }
> 411
> 412 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
> 413 objects:(id *)stackbuf count:(NSUInteger)len
> 414 {
> 415 return [rows_ countByEnumeratingWithState:state objects:stackbuf count:len];
> 416 }
> 417
> 418 - (void)dealloc
> 419 {
> 420 [rows_ release];
> 421 [errorMessage_ release];
> 422 [columnNames_ release];
> 423 [columnTypes_ release];
> 424 [super dealloc];
> 425 }
> 426
> 427 @end
> 428
> 429 // --------------------------------------------------------------------------
> 430 #pragma mark -
> 431
> 432 @implementation CRDatabaseRow
> 433
> 434 @synthesize columnData = columnData_;
> 435
> 436 - (id)initWithDatabaseResult:(CRDatabaseResult *)aResult
> 437 {
> 438 if (![super init])
> 439 return nil;
> 440 columnData_ = [[NSMutableArray alloc] init];
> 441 result = aResult;
> 442 return self;
> 443 }
> 444
> 445 - (NSUInteger)columnIndexForName:(NSString *)columnName
> 446 {
> 447 return [result.columnNames indexOfObject:columnName];
> 448 }
> 449
> 450 - (NSInteger)integerForColumn:(NSString *)columnName
> 451 {
> 452 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 453 if (columnIndex == NSNotFound)
> 454 return 0;
> 455 return [self integerForColumnIndex:columnIndex];
> 456 }
> 457
> 458 - (NSInteger)integerForColumnIndex:(NSUInteger)columnIndex
> 459 {
> 460 id value = [columnData_ objectAtIndex:columnIndex];
> 461 if (![value isKindOfClass:[NSNumber class]]) // convert other values
> 462 return [[self stringForColumnIndex:columnIndex] integerValue];
> 463 return [value integerValue];
> 464 }
> 465
> 466 - (int)intForColumn:(NSString*)columnName
> 467 {
> 468 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 469 if (columnIndex == NSNotFound)
> 470 return 0;
> 471 return [self intForColumnIndex:columnIndex];
> 472 }
> 473
> 474
> 475 - (int)intForColumnIndex:(NSUInteger)columnIndex
> 476 {
> 477 id value = [columnData_ objectAtIndex:columnIndex];
> 478 if (![value isKindOfClass:[NSNumber class]]) // convert other values
> 479 return [[self stringForColumnIndex:columnIndex] intValue];
> 480 return [value intValue];
> 481 }
> 482
> 483 - (long long)longLongForColumn:(NSString*)columnName
> 484 {
> 485 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 486 if (columnIndex == NSNotFound)
> 487 return 0;
> 488 return [self longLongForColumnIndex:columnIndex];
> 489 }
> 490
> 491 - (long long)longLongForColumnIndex:(NSUInteger)columnIndex
> 492 {
> 493 id value = [columnData_ objectAtIndex:columnIndex];
> 494 if (![value isKindOfClass:[NSNumber class]]) // convert other values
> 495 return [[self stringForColumnIndex:columnIndex] longLongValue];
> 496 return [value longLongValue];
> 497 }
> 498
> 499 - (BOOL)boolForColumn:(NSString *)columnName
> 500 {
> 501 return ([self intForColumn:columnName] != 0);
> 502 }
> 503
> 504 - (BOOL)boolForColumnIndex:(NSUInteger)columnIndex
> 505 {
> 506 return ([self intForColumnIndex:columnIndex] != 0);
> 507 }
> 508
> 509 - (double)doubleForColumn:(NSString*)columnName
> 510 {
> 511 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 512 if (columnIndex == NSNotFound)
> 513 return 0;
> 514 return [self doubleForColumnIndex:columnIndex];
> 515 }
> 516
> 517 - (double)doubleForColumnIndex:(NSUInteger)columnIndex
> 518 {
> 519 id value = [columnData_ objectAtIndex:columnIndex];
> 520 if (![value isKindOfClass:[NSNumber class]]) // convert other values
> 521 return [[self stringForColumnIndex:columnIndex] doubleValue];
> 522 return [value doubleValue];
> 523 }
> 524
> 525 - (NSString *)stringForColumn:(NSString *)columnName
> 526 {
> 527 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 528 if (columnIndex == NSNotFound)
> 529 return @"";
> 530 return [self stringForColumnIndex:columnIndex];
> 531 }
> 532
> 533 - (NSString *)stringForColumnIndex:(NSUInteger)columnIndex
> 534 {
> 535 id value = [columnData_ objectAtIndex:columnIndex];
> 536 if ([value isKindOfClass:[NSString class]]) // convert other values
> 537 return value;
> 538 else if ([value isKindOfClass:[NSData class]])
> 539 return [[NSString alloc] initWithData:[columnData_ objectAtIndex:columnIndex]
> 540 encoding:NSUTF8StringEncoding];
> 541 else if ([value isKindOfClass:[NSNumber class]])
> 542 return [value stringValue];
> 543 else
> 544 return nil; // unknown type of value, shouldn't happen
> 545 }
> 546
> 547 - (NSDate *)dateForColumn:(NSString*)columnName
> 548 {
> 549 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 550 if (columnIndex == NSNotFound)
> 551 return nil;
> 552 return [NSDate dateWithTimeIntervalSince1970:[self doubleForColumnIndex:columnIndex]];
> 553 }
> 554
> 555 - (NSDate *)dateForColumnIndex:(NSUInteger)columnIndex
> 556 {
> 557 return [NSDate dateWithTimeIntervalSince1970:[self doubleForColumnIndex:columnIndex]];
> 558 }
> 559
> 560 - (NSData *)dataForColumn:(NSString *)columnName;
> 561 {
> 562 NSUInteger columnIndex = [self columnIndexForName:columnName];
> 563 if (columnIndex == NSNotFound)
> 564 return nil;
> 565 return [self dataForColumnIndex:columnIndex];
> 566 }
> 567
> 568 - (NSData *)dataForColumnIndex:(NSUInteger)columnIndex;
> 569 {
> 570 return [columnData_ objectAtIndex:columnIndex];
> 571 }
> 572
> 573 - (void)dealloc
> 574 {
> 575 // [result release];
> 576 [columnData_ release];
> 577 [super dealloc];
372 } 578 }
373 579
374 @end 580 @end

Deleted CRDatabaseResult.h

Old (16924eaf988424c7) New ()
1 // <
2 // CRDatabaseResult.h <
3 // CRDatabase <
4 // <
5 <
6 #import <Foundation/Foundation.h> <
7 <
8 @class CRDatabaseRow; <
9 <
10 @interface CRDatabaseResult : NSObject<NSFastEnumeration> { <
11 @private <
12 int errorCode_; <
13 NSString *errorMessage_; <
14 NSMutableArray *columnNames_; <
15 NSMutableArray *columnTypes_; <
16 NSMutableArray *rows_; <
17 } <
18 @property(nonatomic,assign) int errorCode; <
19 @property(nonatomic,copy) NSString *errorMessage; <
20 @property(readonly) NSMutableArray *columnNames; <
21 @property(readonly) NSMutableArray *columnTypes; <
22 @property(readonly) NSMutableArray *rows; <
23 <
24 - (void)addRow:(CRDatabaseRow *)row; <
25 - (CRDatabaseRow *)rowAtIndex:(NSUInteger)index; <
26 - (NSUInteger)count; <
27 <
28 @end <

Deleted CRDatabaseResult.m

Old (783bc0602ab9c6bf) New ()
1 // <
2 // CRDatabaseResult.m <
3 // CRDatabase <
4 // <
5 <
6 #import "CRDatabaseResult.h" <
7 <
8 <
9 @implementation CRDatabaseResult <
10 @synthesize errorCode = errorCode_; <
11 @synthesize errorMessage = errorMessage_; <
12 @synthesize columnNames = columnNames_; <
13 @synthesize columnTypes = columnTypes_; <
14 @synthesize rows = rows_; <
15 <
16 - (id)init { <
17 if (![super init]) <
18 return nil; <
19 errorCode_ = 0; <
20 columnNames_ = [[NSMutableArray alloc] init]; <
21 columnTypes_ = [[NSMutableArray alloc] init]; <
22 rows_ = [[NSMutableArray alloc] init]; <
23 return self; <
24 } <
25 <
26 - (void)addRow:(CRDatabaseRow *)row <
27 { <
28 [rows_ addObject:row]; <
29 } <
30 <
31 - (CRDatabaseRow *)rowAtIndex:(NSUInteger)index <
32 { <
33 return [rows_ objectAtIndex:index]; <
34 } <
35 <
36 - (NSUInteger)count <
37 { <
38 return rows_.count; <
39 } <
40 <
41 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state <
42 objects:(id *)stackbuf count:(NSUInteger)len <
43 { <
44 return [rows_ countByEnumeratingWithState:state objects:stackbuf count:len]; <
45 } <
46 <
47 - (void)dealloc <
48 { <
49 [rows_ release]; <
50 [errorMessage_ release]; <
51 [columnNames_ release]; <
52 [columnTypes_ release]; <
53 [super dealloc]; <
54 } <
55 <
56 @end <

Deleted CRDatabaseRow.h

Old (e65d576916cd70b0) New ()
1 // <
2 // CRDatabaseRow.h <
3 // CRDatabase <
4 // <
5 <
6 #import <Foundation/Foundation.h> <
7 <
8 @class CRDatabaseResult; <
9 <
10 @interface CRDatabaseRow : NSObject { <
11 @private <
12 NSMutableArray* columnData_; <
13 CRDatabaseResult* result; <
14 } <
15 @property(readonly) NSMutableArray* columnData; <
16 <
17 - (id)initWithDatabaseResult:(CRDatabaseResult *)aResult; <
18 <
19 - (NSInteger)integerForColumn:(NSString *)columnName; <
20 - (NSInteger)integerForColumnIndex:(NSUInteger)columnIndex; <
21 <
22 - (int)intForColumn:(NSString *)columnName; <
23 - (int)intForColumnIndex:(NSUInteger)columnIdx; <
24 <
25 - (long long)longLongForColumn:(NSString *)columnName; <
26 - (long long)longLongForColumnIndex:(NSUInteger)columnIdx; <
27 <
28 - (BOOL)boolForColumn:(NSString *)columnName; <
29 - (BOOL)boolForColumnIndex:(NSUInteger)columnIdx; <
30 <
31 - (double)doubleForColumn:(NSString *)columnName; <
32 - (double)doubleForColumnIndex:(NSUInteger)columnIdx; <
33 <
34 - (NSString *)stringForColumn:(NSString *)columnName; <
35 - (NSString *)stringForColumnIndex:(NSUInteger)columnIdx; <
36 <
37 - (NSDate *)dateForColumn:(NSString *)columnName; <
38 - (NSDate *)dateForColumnIndex:(NSUInteger)columnIdx; <
39 <
40 - (NSData *)dataForColumn:(NSString *)columnName; <
41 - (NSData *)dataForColumnIndex:(NSUInteger)columnIndex; <
42 <
43 @end <

Deleted CRDatabaseRow.m

Old (0284ae895f69a0a1) New ()
1 // <
2 // CRDatabaseRow.m <
3 // CRDatabase <
4 // <
5 <
6 #import "CRDatabaseRow.h" <
7 #import "CRDatabaseResult.h" <
8 <
9 <
10 @implementation CRDatabaseRow <
11 @synthesize columnData = columnData_; <
12 <
13 - (id)initWithDatabaseResult:(CRDatabaseResult *)aResult <
14 { <
15 if (![super init]) <
16 return nil; <
17 columnData_ = [[NSMutableArray alloc] init]; <
18 result = aResult; <
19 return self; <
20 } <
21 <
22 - (NSUInteger)columnIndexForName:(NSString *)columnName <
23 { <
24 return [result.columnNames indexOfObject:columnName]; <
25 } <
26 <
27 - (NSInteger)integerForColumn:(NSString *)columnName <
28 { <
29 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
30 if (columnIndex == NSNotFound) <
31 return 0; <
32 return [self integerForColumnIndex:columnIndex]; <
33 } <
34 <
35 - (NSInteger)integerForColumnIndex:(NSUInteger)columnIndex <
36 { <
37 id value = [columnData_ objectAtIndex:columnIndex]; <
38 if (![value isKindOfClass:[NSNumber class]]) // convert other values <
39 return [[self stringForColumnIndex:columnIndex] integerValue]; <
40 return [value integerValue]; <
41 } <
42 <
43 - (int)intForColumn:(NSString*)columnName <
44 { <
45 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
46 if (columnIndex == NSNotFound) <
47 return 0; <
48 return [self intForColumnIndex:columnIndex]; <
49 } <
50 <
51 <
52 - (int)intForColumnIndex:(NSUInteger)columnIndex <
53 { <
54 id value = [columnData_ objectAtIndex:columnIndex]; <
55 if (![value isKindOfClass:[NSNumber class]]) // convert other values <
56 return [[self stringForColumnIndex:columnIndex] intValue]; <
57 return [value intValue]; <
58 } <
59 <
60 - (long long)longLongForColumn:(NSString*)columnName <
61 { <
62 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
63 if (columnIndex == NSNotFound) <
64 return 0; <
65 return [self longLongForColumnIndex:columnIndex]; <
66 } <
67 <
68 - (long long)longLongForColumnIndex:(NSUInteger)columnIndex <
69 { <
70 id value = [columnData_ objectAtIndex:columnIndex]; <
71 if (![value isKindOfClass:[NSNumber class]]) // convert other values <
72 return [[self stringForColumnIndex:columnIndex] longLongValue]; <
73 return [value longLongValue]; <
74 } <
75 <
76 - (BOOL)boolForColumn:(NSString *)columnName <
77 { <
78 return ([self intForColumn:columnName] != 0); <
79 } <
80 <
81 - (BOOL)boolForColumnIndex:(NSUInteger)columnIndex <
82 { <
83 return ([self intForColumnIndex:columnIndex] != 0); <
84 } <
85 <
86 - (double)doubleForColumn:(NSString*)columnName <
87 { <
88 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
89 if (columnIndex == NSNotFound) <
90 return 0; <
91 return [self doubleForColumnIndex:columnIndex]; <
92 } <
93 <
94 - (double)doubleForColumnIndex:(NSUInteger)columnIndex <
95 { <
96 id value = [columnData_ objectAtIndex:columnIndex]; <
97 if (![value isKindOfClass:[NSNumber class]]) // convert other values <
98 return [[self stringForColumnIndex:columnIndex] doubleValue]; <
99 return [value doubleValue]; <
100 } <
101 <
102 - (NSString *)stringForColumn:(NSString *)columnName <
103 { <
104 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
105 if (columnIndex == NSNotFound) <
106 return @""; <
107 return [self stringForColumnIndex:columnIndex]; <
108 } <
109 <
110 - (NSString *)stringForColumnIndex:(NSUInteger)columnIndex <
111 { <
112 id value = [columnData_ objectAtIndex:columnIndex]; <
113 if ([value isKindOfClass:[NSString class]]) // convert other values <
114 return value; <
115 else if ([value isKindOfClass:[NSData class]]) <
116 return [[NSString alloc] initWithData:[columnData_ objectAtIndex:columnIndex] <
117 encoding:NSUTF8StringEncoding]; <
118 else if ([value isKindOfClass:[NSNumber class]]) <
119 return [value stringValue]; <
120 else <
121 return nil; // unknown type of value, shouldn't happen <
122 } <
123 <
124 - (NSDate *)dateForColumn:(NSString*)columnName <
125 { <
126 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
127 if (columnIndex == NSNotFound) <
128 return nil; <
129 return [NSDate dateWithTimeIntervalSince1970:[self doubleForColumnIndex:columnIndex]]; <
130 } <
131 <
132 - (NSDate *)dateForColumnIndex:(NSUInteger)columnIndex <
133 { <
134 return [NSDate dateWithTimeIntervalSince1970:[self doubleForColumnIndex:columnIndex]]; <
135 } <
136 <
137 - (NSData *)dataForColumn:(NSString *)columnName; <
138 { <
139 NSUInteger columnIndex = [self columnIndexForName:columnName]; <
140 if (columnIndex == NSNotFound) <
141 return nil; <
142 return [self dataForColumnIndex:columnIndex]; <
143 } <
144 <
145 - (NSData *)dataForColumnIndex:(NSUInteger)columnIndex; <
146 { <
147 return [columnData_ objectAtIndex:columnIndex]; <
148 } <
149 <
150 - (void)dealloc <
151 { <
152 // [result release]; <
153 [columnData_ release]; <
154 [super dealloc]; <
155 } <
156 <
157 @end <