ftp.nice.ch/peanuts/GeneralData/Documents/developer/dbkit/AdaptorDocu.tar.gz#/AdaptorDocu/Documentation/DBBasicAdaptorContext.rtf

This is DBBasicAdaptorContext.rtf in view mode; [Download] [Up]

Release 3.0 Copyright ©1992 by NeXT Computer, Inc.  All Rights Reserved.
(Preliminary draft, Thurs Apr 16 16:12:34 PDT 1992)






DBBasicAdaptorContext





Inherits From:	Object

Declared In:	dbkit/DBBasicAdaptor.h





Class Description

DBBasicAdaptorContext is the abstract superclass for objects that are used in adaptor context management.  Basically, the context object provides a place to locate special accounting structures (such as cursors) used in the interpretation of query languages.  The objects are used as though the adaptor delegates every call to evaluateString:using: and fetchData: to its context objects.

Context objects are allocated as follows:  adaptors have a single "shared context" which is used for the potentially destructive operations insert, update, evaluate, and delete.  Contexts for select, on the other hand, are allocated on a per-binder basis, unless the binder has had its sharesContext flag set.  If the binder returns YES to sharesContext, then all operations, including select, will use the adaptor's "shared context".  Semantically, a select on a shared context should lock the selected data if possible -- a select on a shared context is normally followed quickly by an update.

Of course, the context allocation scheme can be completely altered by reimplementing the DBBasicAdaptor -- it is not a requirement of the DBKit that it behave this way.





Instance Variables

None declared in this class.





Method Types

Creating a context	- initForAdaptor:
Evaluating expressions	- evaluateString:using:
- fetchData:

Instance Methods

initForAdaptor:
- initForAdaptor:anAdaptor

This method should prepare any data structures that the context will later need for execution.




evaluateString:using:
- (BOOL)evaluateString:(const unsigned char*)aString using:(DBBinder*)aBinder

This method is called with a query expression as aString.  The method should return its success in evaluating this expression.




fetchData:
- (BOOL)fetchData:(DBBinder*)aBinder

This method is called after potentially data-producing operations.  It should place the next available "row" of data into aBinder.




These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.