home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEPLOY / SYBASEAD.Z / SybaseColumn.h < prev    next >
Text File  |  1996-09-09  |  2KB  |  57 lines

  1. // SybaseColumn.h
  2. // Copyright (c) 1994, NeXT Software, Inc.  All rights reserved.
  3.  
  4. #import <EOAccess/EOAccess.h>
  5. #import "SybaseAdaptor.h"
  6.  
  7. @class SybaseChannel;
  8.  
  9. // This class is used internally by the Sybase adaptor to maintain state
  10. // needed to fetch data.
  11.  
  12. @interface SybaseColumn : NSObject
  13. {
  14.     long _dataType;
  15.     long _format;
  16.     long _columnSize;    
  17.     void  *_buffer;
  18.     long  *_copied;
  19.     short *_indicator;
  20.     EOAttribute *_attribute;
  21.     NSStringEncoding _encoding;
  22.     EOAdaptorValueType _adaptorValueType;
  23. }
  24.  
  25. + columnClassForAttribute:(EOAttribute*)attribute;
  26.     // Return the class for representing the [attribute externalType]
  27. + columnForAttribute:(EOAttribute *)att channel:(SybaseChannel *)channel;
  28.     // returns nil if column could not be created to map between sourceType
  29.     // and attribute type.  Caller should log error.
  30.  
  31. - initWithAttribute:(EOAttribute*)attribute channel:(SybaseChannel *)channel;
  32.     // Create a SybaseColumn for the specified attribute
  33.  
  34. - bindAt:(int)columnIndex rowCapacity:(unsigned)rowCapacity withCmd:(void*)cmd;
  35.     // Bind this column into the select list at position "columnIndex"
  36.  
  37. - (long)getDataAt:(int)columnIndex withCmd:(void*)cmd;
  38.     // Get the next value for this column using the ct_get_data() call.
  39.     // This method must be used if the list of selected attributes includes
  40.     // a column of type TEXT or IMAGE.
  41. - fetchFromIndex:(unsigned)rowIndex withZone:(NSZone *)zone;
  42.     // Extract the next value and create the objective-c object for it.
  43.  
  44. - (long)dataType;
  45.     // Return the type code for this column.
  46. - (unsigned)columnSize;
  47.     // Return the size of an individual item for this column.
  48. - (EOAttribute *)attribute;
  49.     // Return the EOAttribute for which this column was created.
  50.  
  51. - (BOOL)sendParameter:(id)value withCmd:(void*)cmd;
  52.     // Used by the SybaseStoredProcedure implementation.
  53.     // Take the given value, and using the type mapping information in the
  54.     // column and attribute, pass the appropriate set of bytes to the
  55.     // server using the ct_param() call in the sybase client library.
  56. @end
  57.