]> err.no Git - sope/blob - sope-gdl1/MySQL/MySQL4Adaptor.h
use %p for pointer formats
[sope] / sope-gdl1 / MySQL / MySQL4Adaptor.h
1 /* 
2    MySQL4Adaptor.h
3
4    Copyright (C) 2003-2005 SKYRIX Software AG
5
6    Author: Helge Hess (helge.hess@skyrix.com)
7
8    This file is part of the MySQL4 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 ___MySQL4_Adaptor_H___
27 #define ___MySQL4_Adaptor_H___
28
29 /*
30   The MySQL4 adaptor.
31
32   The connection dictionary of this adaptor understands these keys:
33     hostName
34     port
35     options
36     userName
37     password
38     databaseName
39 */
40
41 #import <Foundation/NSMapTable.h>
42 #import <GDLAccess/EOAdaptor.h>
43 #import <GDLAccess/EOAttribute.h>
44
45 @class NSString, NSMutableDictionary;
46
47 @interface MySQL4Adaptor : EOAdaptor
48 {
49 }
50
51 - (id)initWithName:(NSString *)_name;
52
53 // connection management
54
55 - (NSString *)serverName;
56 - (NSString *)loginName;
57 - (NSString *)loginPassword;
58 - (NSString *)databaseName;
59 - (NSString *)port;
60 - (NSString *)options;
61 - (NSString *)newKeyExpression;
62
63 // sequence for primary key generation
64
65 - (NSString *)primaryKeySequenceName;
66
67 // value formatting
68
69 - (id)formatValue:(id)value forAttribute:(EOAttribute *)attribute;
70
71 // attribute typing
72
73 - (BOOL)attributeAllowedInDistinctSelects:(EOAttribute *)_attr;
74
75 // classes used
76
77 - (Class)adaptorContextClass; // MySQL4Context
78 - (Class)adaptorChannelClass; // MySQL4Channel
79 - (Class)expressionClass;     // MySQL4Expression
80
81 @end
82
83 #endif