Developer Documentation
PATH  WebObjects 4.5 Documentation > ODBCEOAdaptor Reference

Table of Contents

ODBCSQLExpression


Inherits from: EOSQLExpression : NSObject
Package: com.apple.yellow.odbceoadaptor


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.




Static Methods



bindVariableDictionaryForAttribute

public NSMutableDictionary bindVariableDictionaryForAttribute( com.apple.yellow.eoaccess.EOAttribute attribute, Object 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

public String 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

public boolean 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

public boolean 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