]> err.no Git - sope/blob - sope-gdl1/SQLite3/SQLiteValues.h
Added SQLite3 adaptor, bumped version informations
[sope] / sope-gdl1 / SQLite3 / SQLiteValues.h
1 /* 
2    SQLiteValues.h
3
4    Copyright (C) 1999-2005 MDlink online service center GmbH and Helge Hess
5
6    Author: Helge Hess (helge@mdlink.de)
7
8    This file is part of the SQLite Adaptor Library
9
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Library General Public
12    License as published by the Free Software Foundation; either
13    version 2 of the License, or (at your option) any later version.
14
15    This library is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    Library General Public License for more details.
19
20    You should have received a copy of the GNU Library General Public
21    License along with this library; see the file COPYING.LIB.
22    If not, write to the Free Software Foundation,
23    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 */
25
26 #ifndef ___SQLite_Values_H___
27 #define ___SQLite_Values_H___
28
29 #import <Foundation/NSObject.h>
30 #import <Foundation/NSString.h>
31 #import <Foundation/NSData.h>
32 #import <Foundation/NSDate.h>
33 #import <GDLAccess/EONull.h>
34 #import "SQLiteException.h"
35
36 @class EOAttribute;
37 @class SQLiteChannel;
38
39 @interface SQLiteDataTypeMappingException : SQLiteException
40
41 - (id)initWithObject:(id)_obj
42   forAttribute:(EOAttribute *)_attr
43   andSQLite3Type:(NSString *)_dt
44   inChannel:(SQLiteChannel *)_channel;
45
46 @end
47
48 @protocol SQLiteValues
49
50 - (NSString *)stringValueForSQLite3Type:(NSString *)_type
51   attribute:(EOAttribute *)_attribute;
52
53 @end
54
55 @interface NSObject(SQLiteValues)
56
57 - (id)initWithSQLiteInt:(int)_value;
58 - (id)initWithSQLiteText:(const unsigned char *)_value;
59 - (id)initWithSQLiteDouble:(double)_value;
60 - (id)initWithSQLiteData:(const void *)_data length:(int)_length;
61
62 @end
63
64 @interface NSString(SQLiteValues) < SQLiteValues >
65 @end
66
67 @interface NSNumber(SQLiteValues) < SQLiteValues >
68 @end
69
70 @interface NSData(SQLiteValues) < SQLiteValues >
71 @end
72
73 @interface NSCalendarDate(SQLiteValues) < SQLiteValues >
74 @end
75
76 @interface EONull(SQLiteValues)
77
78 - (NSString *)stringValueForSQLite3Type:(NSString *)_type
79   attribute:(EOAttribute *)_attribute;
80
81 @end
82
83 #endif /* ___SQLite_Values_H___ */