Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > ODBCEOAdaptor Reference

Table of Contents

ODBCSQLExpression


Inherits from: EOSQLExpression : NSObject
Declared in: ODBCEOAdaptor/ODBCSQLExpression.h




Class Description


ODBCSQLExpression defines how to build SQL statements for ODBCChannels.


Bind Variables

The ODBCAdaptor uses bind variables. A bind variable is a placeholder used in an SQL statement that is replaced with an actual value after the database server determines an execution plan. You use the following methods to operate on bind variables:

For more information on using bind variables, see the EOSQLExpression class specification.




Class Methods



bindVariableDictionaryForAttribute:value:

- (NSMutableDictionary *)bindVariableDictionaryForAttribute:(EOAttribute *)attribute value:value

Overrides the EOSQLExpression implementation to return the receiver's bind variable dictionaries. For more information on bind variables, see the discussion in the class description.

lockClause

- (NSString *)lockClause

Overrides the EOSQLExpression implementation to return the SQL string used in a SELECT statement to lock selected rows. If you're using the Microsoft SQL Server, this method returns @"HOLDLOCK". Otherwise, it returns @"FOR UPDATE".

mustUseBindVariableForAttribute:

- (BOOL)mustUseBindVariableForAttribute:(EOAttribute *)attribute

Overrides the EOSQLExpression implementation to return YES since in the ODBC adaptor, the receiver must always use bind variables for attribute. A returned value of YES indicates that the underlying RDBMS requires that bind variables be used for attributes with attribute's external type.

shouldUseBindVariableForAttribute:

- (BOOL)shouldUseBindVariableForAttribute:(EOAttribute *)attribute

Overrides the EOSQLExpression implementation to return YES since in the ODBC adaptor, the receiver must always be able to provide a bind variable dictionary for attribute. A returned value of YES indicates that the receiver should use bind variables for attributes with attribute's external type.


Table of Contents