]> err.no Git - sope/blob - sope-gdl1/FrontBase2/FBChannel.h
fix for lF
[sope] / sope-gdl1 / FrontBase2 / FBChannel.h
1 /* 
2    FBChannel.h
3
4    Copyright (C) 1999 MDlink online service center GmbH and Helge Hess
5
6    Author: Helge Hess (helge.hess@mdlink.de)
7
8    This file is part of the FB 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: FBChannel.h 1 2004-08-20 10:38:46Z znek $
26
27 #ifndef ___FB_Channel_H___
28 #define ___FB_Channel_H___
29
30 #import <GDLAccess/EOAdaptorChannel.h>
31 #import "FBHeaders.h"
32
33 @class NSArray, NSString, NSMutableDictionary;
34
35 struct _FBColumnData;
36
37 @interface FrontBaseChannel : EOAdaptorChannel
38 {
39 @public
40   /* connection is valid after an openChannel call */
41   FBCDatabaseConnection *fbdc;
42   void                  **rawRows;
43   FBCRowHandler         *rowHandler;
44   FBCMetaData           *cmdMetaData;
45   char                  *fetchHandle;
46   BOOL                  isFirstInBatch;
47
48   /* these variables are valid only during an evaluation */
49   int                currentRow;
50   int                numberOfColumns; // number of columns in result set
51   int                *datatypeCodes;
52   int                rowsAffected;
53   unsigned           txVersion;
54   NSArray            *selectedAttributes; // contains the real select order
55
56   /* turns on/off channel debugging */
57   BOOL isDebuggingEnabled;
58   NSString *sqlLogFile;
59
60   /* caching */
61   NSMutableDictionary *_primaryKeysNamesForTableName;
62   NSMutableDictionary *_attributesForTableName;
63 }
64
65 - (void)setDebugEnabled:(BOOL)_flag;
66 - (BOOL)isDebugEnabled;
67
68 - (BOOL)isOpen;
69 - (BOOL)openChannel;
70 - (void)closeChannel;
71 - (void)primaryCloseChannel; // private
72
73 - (NSMutableDictionary *)primaryFetchAttributes:(NSArray *)_attributes
74   withZone:(NSZone *)_zone;
75
76 - (BOOL)evaluateExpression:(NSString *)_expression;
77
78 // cancelFetch is always called to terminate a fetch
79 // (even by primaryFetchAttributes)
80 // it frees all fetch-local variables
81 - (void)cancelFetch;
82
83 // uses type information to create EOAttribute objects
84 - (NSArray *)describeResults;
85
86 @end
87
88 #endif