home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / dbkit / DBExpression.h < prev    next >
Text File  |  1992-03-27  |  2KB  |  48 lines

  1. /*
  2. **      DBExpression.h
  3. **$    F  Database Kit, Release 3.0
  4. **      Copyright (c) 1992, NeXT Computer, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import <dbkit/protocols.h>
  9.  
  10. /*
  11. ** The DBExpression represents a property of some DBDatabase; this property
  12. **  is expressed in the underlying query language.
  13. **
  14. ** initForEntity:fromDescription: results in a property that represents
  15. **  "derived" data -- it can contain formulae, functions, or anything that
  16. **  the underlying query language can support.  See DBQualifier.h for a
  17. **  description of the format string used by both.
  18. **
  19. ** initForEntity:fromName:usingType: results in a "simple" property that
  20. **  represents a property from the database -- but can have a type provided.
  21. **  So, for instance, if the underlying database supports a huge number
  22. **  format, which must be represented as a string in objective-C in order
  23. **  not to lose precision, this call could be used to generate a property
  24. **  of "*" type.  The name argument must represent a named property of the
  25. **  owner argument.
  26. */
  27. @interface DBExpression : Object <DBProperties, DBExpressionValues>
  28. {
  29. @private
  30.   id _entity;
  31.   id _property;
  32. }
  33.  
  34. - initForEntity:(id<DBEntities>)anEntity
  35.     fromDescription:(const unsigned char*)aFormatString, ... ;
  36. - initForEntity:(id<DBEntities>)anEntity
  37.     fromName:(const char*)aName usingType:(const char*)aType;
  38. - copyFromZone:(NXZone*)z;
  39. - free;
  40.  
  41. - setEntity:(id<DBEntities>)anEntity 
  42.     andDescription:(const unsigned char*)aFormatString, ...;
  43.  
  44. - read:(NXTypedStream*)ts;
  45. - write:(NXTypedStream*)ts;
  46.  
  47. @end
  48.