]> err.no Git - sope/blob - sope-gdl1/SQLite3/SQLiteAdaptor.h
added prototypical SQLite3 adaptor
[sope] / sope-gdl1 / SQLite3 / SQLiteAdaptor.h
1 /* 
2    SQLiteAdaptor.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 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_Adaptor_H___
27 #define ___SQLite_Adaptor_H___
28
29 /*
30   The SQLite adaptor.
31
32   The connection dictionary of this adaptor understands these keys:
33     databaseName
34   
35   The adaptor is based on libsqlite.
36 */
37
38 #import <Foundation/NSMapTable.h>
39 #import <GDLAccess/EOAdaptor.h>
40 #import <GDLAccess/EOAttribute.h>
41
42 @class NSString, NSMutableDictionary;
43
44 @interface SQLiteAdaptor : EOAdaptor
45 {
46 }
47
48 - (id)initWithName:(NSString *)_name;
49
50 // connection management
51
52 - (NSString *)databaseName;
53 - (NSString *)newKeyExpression;
54
55 // sequence for primary key generation
56
57 - (NSString *)primaryKeySequenceName;
58
59 // value formatting
60
61 - (id)formatValue:(id)value forAttribute:(EOAttribute *)attribute;
62
63 // attribute typing
64
65 - (BOOL)attributeAllowedInDistinctSelects:(EOAttribute *)_attr;
66
67 // classes used
68
69 - (Class)adaptorContextClass; // SQLiteContext
70 - (Class)adaptorChannelClass; // SQLiteChannel
71 - (Class)expressionClass;     // SQLiteExpression
72
73 @end
74
75 #endif