Inherits From:
EOSQLExpression : NSObject
Inherits From:
com.apple.yellow.oracleeoadaptorjava
Class Description
OracleSQLExpression defines how to build SQL statements for OracleChannels.
formatValueForAttribute
(java.lang.Object value, com.apple.yellow.eoaccess.EOAttribute attribute)
Overrides the EOSQLExpression method formatValueForAttribute
to return a formatted string representation of value for attribute that is suitable for use in a SQL statement.
serverTypeIdForName
public static int serverTypeIdForName
(java.lang.String typeName)
Returns the Oracle type code (such as OraVARCHAR2 or OraNumber) for typeName (such as "VARCHAR2" or "NUMBER").
setUseNoWaitLocks
public static void setUseNoWaitLocks
(boolean 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
public static boolean useNoWaitLocks
()
Returns true
to indicate that the OracleSQLExpression uses NOWAIT locks, false
otherwise. The default is false
.
See also:
setUseNoWaitLocks
Instance Methods
bindVariableDictionaryForAttribute
public com.apple.yellow.foundation.NSMutableDictionary bindVariableDictionaryForAttribute
(com.apple.yellow.eoaccess.EOAttribute attribute, java.lang.Object value)
Overrides the EOSQLExpression method bindVariableDictionaryForAttribute
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
public java.lang.String 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 false
, this method returns the string "FOR UPDATE". If the default is set to true
, this method returns "FOR UPDATE NOWAIT".
mustUseBindVariableForAttribute
public boolean mustUseBindVariableForAttribute
(com.apple.yellow.eoaccess.EOAttribute attribute)
Overrides the EOSQLExpression method mustUseBindVariableForAttribute
to return true
if the receiver must use bind variables for attribute, false
otherwise. A returned value of true
indicates that the underlying RDBMS requires that bind variables be used for attributes with attribute's external type.
See also:
bindVariableDictionaryForAttribute
, shouldUseBindVariableForAttribute
shouldUseBindVariableForAttribute
public boolean shouldUseBindVariableForAttribute
(com.apple.yellow.eoaccess.EOAttribute attribute)
Overrides the EOSQLExpression method shouldUseBindVariableForAttribute
to return true
if the receiver can provide a bind variable dictionary for attribute, false
otherwise. A returned value of true
indicates that the receiver should use bind variables for attributes with attribute's external type.
See also:
bindVariableDictionaryForAttribute
, mustUseBindVariableForAttribute