PATH  WebObjects 4.0 Documentation > SybaseEOAdaptor Reference

[TOC]  [Prev]  [Next]  [Show Frames]  [Hide Frames]

OracleSQLExpression

Inherits From:
EOSQLExpression : NSObject

Declared in: OracleEOAdaptor/OracleSQLExpression.h


Class Description

OracleSQLExpression defines how to build SQL statements for OracleChannels.


Method Types

Generating SQL for attributes and values
+ formatValue:forAttribute:
Getting the server type ID
+ serverTypeIdForName:
Working with no wait locks
+ setUseNoWaitLocks:
+ useNoWaitLocks
Getting the lock clause
- lockClause
Managing bind variables
- mustUseBindVariableForAttribute:
- shouldUseBindVariableForAttribute:
- bindVariableDictionaryForAttribute:value:

Class Methods


formatValue:forAttribute:

+ (NSString *)formatValue: (id)value forAttribute: (EOAttribute *)attribute

Overrides the EOSQLExpression method formatValue:forAttribute: to return a formatted string representation of value for attribute that is suitable for use in a SQL statement.


serverTypeIdForName:

+ (int)serverTypeIdForName: (NSString *)typeName

Returns the Oracle type code (such as OraVARCHAR2 or OraNumber) for typeName (such as "VARCHAR2" or "NUMBER").


setUseNoWaitLocks:

+ (void)setUseNoWaitLocks: (BOOL)flag

Sets according to flag whether the lock clause of the OracleSQLExpression is @"FOR UPDATE" (block until the row is available) or @"FOR UPDATE NOWAIT" (return an error immediately if an attempt to lock a row would block). By default OracleSQLExpression uses the clause @"FOR UPDATE"-that is, by default it does not use NOWAIT locks. This behavior is also controllable through the EOOracleUseNoWaitLocks user default.

See also: + useNoWaitLocks


useNoWaitLocks

+ (BOOL)useNoWaitLocks

Returns YES to indicate that the OracleSQLExpression uses NOWAIT locks, NO otherwise. The default is NO.

See also: + setUseNoWaitLocks:


Instance Methods


bindVariableDictionaryForAttribute:value:

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

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

See also: - mustUseBindVariableForAttribute:, - shouldUseBindVariableForAttribute:


lockClause

- (NSString *)lockClause

Overrides the EOSQLExpression method lockClause to return the SQL string used in a SELECT statement to lock selected rows. Queries the user default EOOracleUseNoWaitLocks. If this default is not set or if it is set to NO, this method returns the string @"FOR UPDATE". If the default is set to YES, this method returns @"FOR UPDATE NOWAIT".


mustUseBindVariableForAttribute:

- (BOOL)mustUseBindVariableForAttribute: (EOAttribute *)attribute

Overrides the EOSQLExpression method mustUseBindVariableForAttribute: to return YES if the receiver must use bind variables for attribute, NO otherwise. A returned value of YES indicates that the underlying RDBMS requires that bind variables be used for attributes with attribute's external type.

See also: - bindVariableDictionaryForAttribute:value:, - shouldUseBindVariableForAttribute:


shouldUseBindVariableForAttribute:

- (BOOL)shouldUseBindVariableForAttribute: (EOAttribute *)attribute

Overrides the EOSQLExpression method shouldUseBindVariableForAttribute: to return YES if the receiver can provide a bind variable dictionary for attribute, NO otherwise. A returned value of YES indicates that the receiver should use bind variables for attributes with attribute's external type.

See also: - bindVariableDictionaryForAttribute:value:, - mustUseBindVariableForAttribute:



[TOC] [Prev] [Next]

Copyright © 1998, Apple Computer, Inc. All rights reserved.