]> err.no Git - sope/blob - sope-gdl1/PostgreSQL/PostgreSQL72Values.h
renamed PostgreSQL72 to PostgreSQL, install in Library/GDLAdaptors-1.1
[sope] / sope-gdl1 / PostgreSQL / PostgreSQL72Values.h
1 /* 
2    PostgreSQL72Values.h
3
4    Copyright (C) 1999 MDlink online service center GmbH and Helge Hess
5
6    Author: Helge Hess (helge@mdlink.de)
7
8    This file is part of the PostgreSQL72 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 // $Id: PostgreSQL72Values.h 1 2004-08-20 10:38:46Z znek $
26
27 #ifndef ___PostgreSQL72_Values_H___
28 #define ___PostgreSQL72_Values_H___
29
30 #import <Foundation/NSObject.h>
31 #import <Foundation/NSString.h>
32 #import <Foundation/NSData.h>
33 #import <Foundation/NSDate.h>
34 #import <GDLAccess/EONull.h>
35 #import "PostgreSQL72Exception.h"
36
37 @class EOAttribute;
38 @class PostgreSQL72Channel;
39
40 @interface PostgreSQL72DataTypeMappingException : PostgreSQL72Exception
41
42 - (id)initWithObject:(id)_obj
43   forAttribute:(EOAttribute *)_attr
44   andPostgreSQLType:(NSString *)_dt
45   inChannel:(PostgreSQL72Channel *)_channel;
46
47 @end
48
49 @protocol PostgreSQL72Values
50
51 + (id)valueFromCString:(const char *)_cstr length:(int)_length
52   postgreSQLType:(NSString *)_type
53   attribute:(EOAttribute *)_attribute
54   adaptorChannel:(PostgreSQL72Channel *)_channel;
55
56 + (id)valueFromBytes:(const void *)_bytes length:(int)_length
57   postgreSQLType:(NSString *)_type
58   attribute:(EOAttribute *)_attribute
59   adaptorChannel:(PostgreSQL72Channel *)_channel;
60
61 - (NSString *)stringValueForPostgreSQLType:(NSString *)_type
62   attribute:(EOAttribute *)_attribute;
63
64 @end
65
66 @interface NSString(PostgreSQL72Values) < PostgreSQL72Values >
67 @end
68
69 @interface NSNumber(PostgreSQL72Values) < PostgreSQL72Values >
70 @end
71
72 @interface NSData(PostgreSQL72Values) < PostgreSQL72Values >
73 @end
74
75 @interface NSCalendarDate(PostgreSQL72Values) < PostgreSQL72Values >
76 @end
77
78 @interface EONull(PostgreSQL72Values)
79
80 - (NSString *)stringValueForPostgreSQLType:(NSString *)_type
81   attribute:(EOAttribute *)_attribute;
82
83 @end
84
85 #endif