4 Copyright (C) 1999 MDlink online service center GmbH and Helge Hess
6 Author: Helge Hess (helge@mdlink.de)
8 This file is part of the PostgreSQL72 Adaptor Library
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.
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.
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.
25 // $Id: PostgreSQL72Values.h 1 2004-08-20 10:38:46Z znek $
27 #ifndef ___PostgreSQL72_Values_H___
28 #define ___PostgreSQL72_Values_H___
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"
38 @class PostgreSQL72Channel;
40 @interface PostgreSQL72DataTypeMappingException : PostgreSQL72Exception
42 - (id)initWithObject:(id)_obj
43 forAttribute:(EOAttribute *)_attr
44 andPostgreSQLType:(NSString *)_dt
45 inChannel:(PostgreSQL72Channel *)_channel;
49 @protocol PostgreSQL72Values
51 + (id)valueFromCString:(const char *)_cstr length:(int)_length
52 postgreSQLType:(NSString *)_type
53 attribute:(EOAttribute *)_attribute
54 adaptorChannel:(PostgreSQL72Channel *)_channel;
56 + (id)valueFromBytes:(const void *)_bytes length:(int)_length
57 postgreSQLType:(NSString *)_type
58 attribute:(EOAttribute *)_attribute
59 adaptorChannel:(PostgreSQL72Channel *)_channel;
61 - (NSString *)stringValueForPostgreSQLType:(NSString *)_type
62 attribute:(EOAttribute *)_attribute;
66 @interface NSString(PostgreSQL72Values) < PostgreSQL72Values >
69 @interface NSNumber(PostgreSQL72Values) < PostgreSQL72Values >
72 @interface NSData(PostgreSQL72Values) < PostgreSQL72Values >
75 @interface NSCalendarDate(PostgreSQL72Values) < PostgreSQL72Values >
78 @interface EONull(PostgreSQL72Values)
80 - (NSString *)stringValueForPostgreSQLType:(NSString *)_type
81 attribute:(EOAttribute *)_attribute;